How To Get One Swf Button To Play Another Swf's Timeline.
I have 2 swf's in my webpage. I need the button in one swf to advance the timeline in another swf's root timeline. I thought I could just do:
ActionScript Code: on (release) { tellTarget("clip.swf") { _root.play(); }}
but that doesn't work. Any suggestions?
ActionScript.org Forums > ActionScript Forums Group > ActionScript 1.0 (and below)
Posted on: 05-25-2005, 09:06 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
How To Play Root Timeline From Button.
sorry..simple question..waiting for my new MX books to come.
How do I play a the .root movie from a button deep inside two movie clips.
i have a hidden button on a graphic..and i want to do the on mouse click. play . root movie.
any flash MX tutorials links on this would be great.
also what is up with the with tag is that the new way to reference a movie clip on stage.
Can you not use the alt + F3 movie explorer to choose which movie clip you want to target when doing a button actionscripting properties..
thanks for your time and energy.
Ryan
Button To Play Main Timeline?
Hi, I have a button that I want to continue playing the main timeline and I cant seem to get it to work From my understanding it should be pretty simple.
Counting Button Clicks Then Play Timeline
im trying to get a script to count (or keep track of which) buttons on the stage that have been clicked.
i.e. play button on stage, timeline stopped, three generic buttons on stage also.
heres the trick: i need the play button to only become active (probably using a tellTarget combined with gotoandPlay to a frame in its movieclip timeline) when all three buttons have been clicked. the buttons can be clicked in any sequence, but im having trouble counting the clicks of the individual buttons into a global script.
any suggestions or hints would be greatly helpful and appreciated. i searched the movie/tutorial archive and havent seem to be able to find anything similar.
cheers-
m09
Is It Possible To Have A Pause And Play Button For The Entire Timeline?
Hello,
I have a presentation almost finished for an electronic business card. It's basically an animated slideshow with a voiceover. There are several graphs and charts that are pretty extensive, and the viewer needs to have the capability to pause the presentation to soak in all the info on the graphs. I have inserted 8 different mp3 files (one for each slide) in their own keyframe, and all of the work has been done in the main timeline. (no movie clips) I'm a graphic designer who's rather new at Flash development, so I appreciate your help.
How Do I Get A Button To Play A Movie Then Go To Different Part Of The Timeline And P
I'm building a Flash site that uses loader components. The timeline is divided into 5 sections each with its own loader component with its own Instance name. I've had no problem creating buttons on the main timeline that 'go to and stop' at a particular section and allow a movie to load and play. However, sometimes I want a single button to 'go to and stop' at one section, play the movie then 'go to and stop' at another section and play that movie. Surely there must be a simple piece of action script to give the button the function I need?
I have Flash MX 2004.
Below is what I'm currently doing:
Each loader component has its own Instance name and is set to:
autoload: true, content path: (the appropriate .swf movie), scaleContent: False
The timeline is divided into ten frame sections. Each had a 'stop' command in 'Actions'. Each has a Frame Label title. To create the button command, I select the button, then go to 'Behaviour' - 'Movie Clip' - 'Go to and stop at frame or label'. Where it says: 'Choose the movie clip ...' I leave it on 'this' and I also leave 'Relative' selected. Where it says: 'Enter the frame ...' I type in the Frame label title.
Any ideas?
Cheers
Nick
Button: Pause Timeline/play Movie
Hello, let me describe what I would like to happen on my page, and perhaps someone could suggest the actionscript to accomplish it.
Currently, I have an animation which plays on the timeline, and embedded in the sequence are buttons that periodically enter/exit the screen. In each button there is a short movie clip in the Down state that should play on top of the timeline animation when the button is clicked.
The action that I am having difficulty with is pausing the timeline while the clip (inside the button) plays. In addition, (if possible) I would like the button not only to play the short movie clip, and pause the timeline, but also, trigger a video to load in a flash player after the clip ends.
I hope this makes sense! Maybe my imagination has gotten ahead of my know-how. Any help appreciated.
How Do I Get A Button To Play A Movie Then Go To Different Part Of The Timeline And P
I'm building a Flash site that uses loader components. The timeline is divided into 5 sections each with its own loader component with its own Instance name. I've had no problem creating buttons on the main timeline that 'go to and stop' at a particular section and allow a movie to load and play. However, sometimes I want a single button to 'go to and stop' at one section, play the movie then 'go to and stop' at another section and play that movie. Surely there must be a simple piece of action script to give the button the function I need?
I have Flash MX 2004.
Below is what I'm currently doing:
Each loader component has its own Instance name and is set to:
autoload: true, content path: (the appropriate .swf movie), scaleContent: False
The timeline is divided into ten frame sections. Each had a 'stop' command in 'Actions'. Each has a Frame Label title. To create the button command, I select the button, then go to 'Behaviour' - 'Movie Clip' - 'Go to and stop at frame or label'. Where it says: 'Choose the movie clip ...' I leave it on 'this' and I also leave 'Relative' selected. Where it says: 'Enter the frame ...' I type in the Frame label title.
Any ideas?
Cheers
Nick
Pause/Play Button Referring To Main Timeline...
I'm working on a site that includes a button that says "pause" - when the viewer clicks it, it switches to say "play." Right now, it's a two-frame movie clip that has one button on each frame. I know I need to specify that the Pause/Play action refers to the main timeline (possibly using "_root"?) but I have no idea where to place that. Here's the script for both frames:
Frame 1:
on (release) {
stop ();
}
on (release) {
this.nextFrame();
}
Frame 2:
on (release) {
play ();
}
on (release) {
this.lastFrame();
}
Am I on the right track? Would _root go before or after the command? It's switching from "Pause" to "Play" and back perfectly....
Thanks for your help....
Julia
Button To Play MC & Goto Point On Main Timeline
Hi
I have a button on my scene. When clicked on, I would like to play a MC and go to a specific point on the main timeline.
However, the MC it will play will depend which frame the movie is on, when the button is pressed. I have the script, which will help to explain my question: -
on (release) {
if (frame = 10) {
_root.About.play();
_root.gotoAndPlay("Overview");
}
if (frame = 20) {
_root.Client.play();
_root.gotoAndPlay("Overview");
}
The script doesn't work! Can anybody advise?
Thanks
MERRY CHRISTMAS!!!
Making Main Timeline Play From Button Inside MC
Hello,
i think the title says it all.
I have done this a million times, but for some reason I seemed to have missed something.
My button is inside a movie clip, the AC on the button is this...
on (release) {
gotoAndStop(6);
_root.play();
}
_root.play(); isnt working....
Play Movie In Timeline But Keep Main Timeline In Place
Hello,
Scenerio: You are at frame 1 of the timeline and it's stopped, you hit a button and it jumps you to frame 20 and then at frame 20 a movie clip plays.
Question. Can I have that movie play for however long I want (let's say it's a 100 frame movie) BUT have my main timeline still sit on frame 20? And then when the movie is done playing it goes to frame 21 of the main time line? Currently I have to make my main timeline be the same length as any movie I have in it, and so my main timeline ends up being an absurdly long.
Just a general answer will help - which action scripts would I be looking to use (I'm using Flash 8 Pro)?
Thanks
Timeline - Play/reverse-play Control
Hi everyone!
I've been searching for help in other sites but got some issues cause I don't know the function name I must search.
What I need its a way to control my timeline forward and rewind.
To make it easy to explain I will make a example:
Imagine that you have a movie (cars crossing a street - with trucks and buses too).
Sometimes there is just cars on the street, sometimes just trucks.
I should paste this movie into my timeline(like image sequence), in the background of my application.
In other layer will be informations, in this example, about trucks and cars.
Till this point ok. But I need to make de movie go to the frame that i choose to be the image of the movie that only have cars. Ok... this is in frame 15 of the movie. Then I click a button and go to show trucks info. I click and go to frame 30... at this point ok too. But now I click again to see about cars. Its in frame 15 and I don't want to "JUMP" (like gotoandstop)... I want the movie rewinds (in the speed that it plays) till i get frame 15.
How do I control the timeline like this?
(There will be at least 6 points in this movie that i want to stop by. And this movie begins stopped.)
Thx for any help! Cya!
Play Button+ 1loop +play Button Again (the Definitive Question)
Hi!
I´m using the attachSound method in my movie. I have a play button and a stop button. When you click on the play button a sound begins to play. And the stop button stops it. After this,if you click on play button again, the sound begins. Here´s all right. I use the following code to avoid the sound plays more than once at same time if you click on play button while it´s playing:
Code for play button:
on (press) {
if (!playing) {
sound1.start(0, 1);
playing = true;
}
Resume Play Than Restart Play On The Play Button.
I have this script that works but it keeps on starting from the start of the song, than resume from where I stopped it.
myMusic = new Sound();
myMusic.loadSound("audio/track.mp3", true)
stopbtn.onRelease = function()
{
trace("sound stopped");
myMusic.stop();
};
playbtn.onRelease = function()
{
trace("sound played");
myMusic.start();
};
How do I change this code to resume when pressing the play button than starting from the start of the song. I guess it be more like a pause button than a play button.
Play All In The Timeline
Hi,
Im new to Flash 8 and have very little understanding in action script. So, I hope someone can find a script to my problem.
Im working on a flash presentation, I have buttons in the presentation for each slide...it works fine when clicked. Now, the problem is...I need a button called "PLAY ALL" and it shud play the entire slide without stoping on each slide.
Can someone tell me wat action to the button can trigger it? plz explain in a layman way, im dumb in AS :{
Play Timeline In Reverse
I know there is a way to reverse the way the timeline plays when reaching a certain frame. Ex, I have a mc that needs to reverse itself at frame 100 and play backwards, then at frame 1 play normally. Anyone know the code for this?
Play Timeline Backwards
Hi everyone.
Could someone show me how to play the timeline backwards, if this is doable. if its an action, wish one is it.
thank you
Play Timeline Backwards
I have a small movie file with some pictures of various sizes. I have set up the animation and everything and everything looks fine. However the problem comes when i am closing the movie window. I want to reverse the frames so it basically plays the animation backwards however i dont know how to do this. At the moment i have the closewindow frame just jump to the end of the timeline and close, however it doesnt look right because the background size varies compared to the jpg size. Would anyone out there be able to take a look at my fla and see if they know what to do. I am very new to actionscript but i know that this involves playing the timeline backwards using actionscript.
thanks very much in advance, im really stuck here and id reallly really appreciate if someone could take the time to have a look,
cheers guys,
(this is a flash mx file)
Object Timeline Won't Play
i have a movieclip that does some shape tweens on it's own timeline.
for some reason, i insert this movieclip onto the main timeline and it doesn't play? if i'm looking at it in the library and click the "play" icon, it plays fine, but won't play in the main movie
suggestions?
[problem fixed]forgot to export the font characters[/problem fixed]
[F8] Reversing Timeline Play
Hello there gents,
Not sure if this infact is a newbie question but oh well. I rarely use flash but I need to create something and I'm stuck on something.
I have a simple motion tween throughout my timeline, cut up into keyframes with buttons pointing to each keyframe (imagine something like this http://americanhistory.si.edu/onthemove/exhibition/ with the numbers uptop referring to keyframes in the timeline, and the information a single image moving across the screen). I was hoping to code the buttons pointing to keyframes like this;
(ignore the syntax crap, this is basic concept)
if the current frame > 20 //if i'm above frame 20, reverse and stop at 20
reverseplaytoandstop at frame 20
else if the current frame < 20 //if i'm below frame 20, just play and stop at 20
gotoandstop at frame 20
So if I'm currently at frame 40 and want to reverse back to frame 20, how would I get the animation to play in reverse so that my motion tween still moves through it's frames? I can't seem to find the single pieces of code to do this.
I gurantee I made this question 10x more complicated than it needed to be
[CS3] - Why Won't My Sound Play In The Timeline?
Hi,
I am having trouble figuring out how to get my music track to play as I am scrubbing the timeline. From what I have read, Flash seems to be able to do this but it just doesn't do anything on my program.
Thanks for any help!
-Brian
Timeline Reset After Play
Hey,
I dunno why, but Flash doesn't reset the timeline after I use the play function. Let's say that I used it on a button. When I use the button, a movie clip should play. The problem is that when I press the button again, it doesn't play the movie clip again. It's like resetting the timeline. It requires a third time to play again. I know that I should simply use the play or gotoAndPlay functions, but I don't know why they aren't working.
P.S. I'm have many movie clips; so I'm using _root and _parent functions. I don't know if this is the problem, though.
Play The Timeline In Another Movie
I got two movie clips.
When i click "red" it should play and the green should go to a set frame and play.
I was thinking something like this would work.. but it desent
ActionScript Code:
stop();
redStart.addEventListener(
MouseEvent.MOUSE_UP,
function(evt:MouseEvent):void {
gotoAndPlay("redCLICK")
root.green.gotoAndPlay("greenOFF");
}
);
Anyone got any ideas?
The "green" and "red" are diffrent timelines so i dont know how to get the other one to play its frame..
FLV Continuing To Play, Even When Not On The Timeline?
I have an FLV that is in a movieclip on frame 1 only. When I jump to frame 5 (where the movieclip that is holding the FLV is no longer there) the audio of the FLV is still playing in the background. If I jump back to frame 3 (where the FLV is STILL not there), THE AUDIO OF THE FLV PLAYS AGAIN!
What gives?!?
Play And Pause The Timeline
Hello I have a scrolling text that goes from bottom to top and I use the timeline tween to do that. I was wondering if there's a way to pause the play the timeline? Or any other method would be great. Thanks
Play Timeline In Reverse
Hi guys, this is just an idea I have for a website, i haven't done the animations yet, but my thought is something like this:
i will have an animation done in 3DsMax and imported into the timeline of my SFA, say maybe 160 frames. The animation would be of a CUBE spinning, and showing all 6 sides throughout the animaton.
Each side, i was thinking to make into a page for the website, and i would need it to play the animation foreward or reverse until it reaches the side of the corresponding button pressed.
Or, if i can't play the timeline in reverse... I would like it to play ( and loop if necessary ) then stop at the corresponding page.
eg.. if you are on page 5 and click on page 2, i want it to play to the end, then start from frame 1 and play to page 2 frame.
Thanx in advance for any help and suggestions.
Play Reverse In Timeline?
Is it posible to enter a code that make you go from e.g. frame 5 to 2 in the timeline? I dont mean like gotoandplay/stop(2). But so it plays in reverse!?
So the frames plays in this order: 5,4,3,2 and stops on frame 2.
Is that posible? In case, whats the code?
Play Timeline Until Variable Changes - How To?
What I'm trying to do is this:
I have a movie clip that on mouse over play the frames "show" and in roll out play the frames "hide"
But I want the movie to play "show" until the variable name "menuPlaying" changes.
main time line:
Code:
menuPlaying = 0;
stop();
Stage:
Code:
on(rollOver) {
_root.menuPlatform.gotoAndPlay("show");
}
on(rollOut) {
_root.menuPlatform.gotoAndPlay("hide");
}
Inside menuPlatform movie clip I have the animations labeled "show" and hide"
I only have 1 frame in the main timeline.
Reverse Play In Timeline ?
Well ... i just want to ask how to do:
if i create a simple movie tween that one object goes from point A to point B ..... i put two buttons ..... one for stop an atnother for play .... if i wat to make a third button wich will play that tween reverse from the point where is .... wich code i must use ... or how i must creat that movie tween if i want with one button play it reverse after i use stop button ?
How Do I Script The Timeline To Play Backwards?
Hi,
I'm trying to put a reverse fade on a button once you roll the mouse off it. I know how to get the button to fade in when the mouse rolls over it and I would really love it if someone could help me to script the timeline to play backwards so the "fade in" will "fade out".
Thanks.
LOVE YOUR WORK!!!!!!!!!
Blastbum
Script To Play MC & GOTO On Timeline
I have a MC on the main Time line. I am trying to write the scipt for a button
to do the following:
On release, start playing the MC (instance name is test1).
and at the same time goto frame 10 on the main time line.
on (release) {
tell target (test1){
play();
}
gotoAndPlay(10);
}
Can anybody help me with this?
Thanks
************
To all Americans - Happy Thanks Giving - From Daran in London
Making A Timeline Play Backwards
Okay. . .
Say I have a two buttons. One button makes a small square fly out from the left to the center, stop and then double in size.
The second button reverses the action. The square reduces in size to its original size and then flys back to the left where it came from.
THE CATCH:
The second button also makes a small green square fly from the right to the center stop and then double in size!
Does that mean your actionscript is playing the timelines backward?
Whats happeing to make that happen?
Thanks for reading,
Pulti Pedia
Auto Play() The Director Timeline By Swf
here i want to raise a question:
if i import a swf file (no interactive, an animation) into timeline in a director file(.dir), says, play the swf which is held in Frame 1, can i use actionscript with responding lingo to continue director timeline(play the following frames) after the animation (.swf) ends?
(i knew how to use lingo to stop at frame 1 of director timeline but i am not sure it does work as i mention)
i am not sure whether i have to use lingo with actionscript (or only lingo) to tackle the problem.
thx for your attention and waiting your helpful advice.
Ray
Help Movie Clips Don't Play In Timeline
hey guys,
I'm designing a movie with some simple animation in the timeline. On the last frame ( frame 100), I inserted a movie clip that contains 50 frames worth of animation. When I press enter and play the timeline, the cursor stops at frame 100 and only shows what's in the first frame of the movieclip.
If however, I insert a frame at frame 150 of the movie on the main timeline, the movie clip plays when I "test movie".
This can't be the way it's done! How am I supposed to design a movie if I can't preview what the user is going to see in my timeline? Adding blank frames to to the timeline in order to compensate for the length of the movie clip seems crazy.
Please help me! How does one work with movie clips in such a way as to allow their preview within the timeline. I'm kinda confused, please help clear my head on this one.
Thank-you very much!
Artane
Code To Play A Mc Before Continuing The Timeline
Hey,
I need the code that will make a whole mc play before playing the rest of the timeline.
I had it somewhere but forgot it now...
I made most of my movie out of movie clips, and rather than spacing them out the right amount of frames so they all join together right, like I did at first, i'd rather do it the easy way.
Ian
Can I Make The Timeline Play In Reverse?
I'm creating a personal website with photographs. I created to buttons ( a back and a forward button) to navigate thru the pictures. I need to timeline to play in reverse whenever I click on the back button. Is there an action script or something that I can do to help me.
Thanks you for your time
Play Random Frame In Timeline?
Is it possible to have flash randomly play frames of the timeline? I'm guessing it would have to be a script in every frame so once it plays that frame it jumps to another random frame? I've got a image gallery that when loaded starts cycling through the images (each one in a different frame - stripped down version of the sample gallery in MX 2004) now I'd like it to randomly jump from one to the other rather than just go down the timeline in frame order. Any ideas? Here's my fla, I've saved in MX format for those not having 2004 yet.
Thanks.
Updated file further down thread
How Do I Play One Frame From The Main Timeline From An MC ?
as the title sais , i am in a movie clip and when i click on this button i wanna gotoandstop a frame that is on my main timeline. I cant put this
on (release) {
_root.gotoAndStop (framenumber);
}
because i want it to go to the main timeline in the second scene , but when i put _root... it goes to the root of the whole prject i want it to go to the root of the second scene
Pause Timeline, Play Another Swf On Top W/ Alpha?
Hey all,
I've got a flash movie I'm working on that has a lot going on, as well as a bit of video. I have a button in my movie, and when I click on it, I want it to (ideally pause whats going on in the rest of the movie...not the end of the world if this is not possible) draw a rectangle, and then fade up a series of jpegs in the confines of the rectangle I drew (with interactivity that allows the user to close the "window" or skip to the next jpeg. When the user closes the window, it animates off the rest of the movie resumes.
How can I accomplish this? I could do another scene but I dont want the background to jump...and it would be obvious because the background is constantly animating/changing...
I tried making the rectangle/jpegs thing in a nother swf and importing that, the problem is I dont know how to have that play only when i click on a button. Right now if i drag it to the timeline, it just plays automatically...
If any of you guys have any ideas, I would _really_ appreciate it!
Thanks!
Dynamic Timeline Play Until Problem
Ok this may be a bit of a newbie question.
movie1 is currently stopped at frame 10
onRelease of button, movie1 plays from frame 10 until frame 25 then loads movie2 as defined in button. BUT i dont want the movie to load UNTIL movie1 has reached frame 25
Is this a (if) (else) function?
There are so many things I could use this for but I've never figured it out.
Play Frames Randomly On The Timeline
I have a flash file which consists of 45 images and I would like the timeline to play randomly.
Example:
Normal = plays frames 1, 2, 3, 4, 5, 6, 7, 8, 9 .....
Random = plays frames 1, 6, 3, 9, 5, 6, 7, 3, 2 .....
Please, how can I do this?
Unload Mc And Play Main Timeline?
I have a main movie "main.swf" and in an empty movie clip (instance name "empty") on that timeline, I have it loading another movie ("continue.swf") that takes you to the end of the presentation...
This is the action on frame 1 of "empty":
loadMovie("continue.swf", 1);
I need the entire presentation to loop. I have a frame labeled "startsite" where I need the movie to start over from on "main.swf"
So at the end of "continue.swf" I need an action that tells it to go to "main.swf" and play frame labeled "startsite," right?
I've tried:
_parent.gotoAndPlay("startsite");
I've tried:
_root.gotoAndPlay("startsite");
I've tried unloading the movie clip "empty" from the main.swf with:
this.removeMovieClip()
but everything I try only loops the "continue.swf"???
Can someone please help?
[F8] Is It Possible To Play The Timeline In Reverse/backwards?
I have an effect in the timeline that creates a smooth transition from "FrameA" to "FrameB", however, if the user wants to go back to "FrameA", I would like to reuse the transition in reverse, rather than just doing a gotoAndStop("FrameA");
Is this possible?
|