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!!!
FlashKit > Flash Help > Flash ActionScript
Posted on: 12-02-2002, 05:37 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
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.
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
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....
[help] Goto Main Timeline
Hey guys. I gota problem. When I'm in a movie clip, I need to find a way to make it goto a frame on the maintime line. I don't know where to start though. If someone could post a way to do it.
Thanks a bunch!!!
Goto Main Timeline From A Movieclip
Hi I have seemed to have forgotten how to go from a movieclip to a frame in the main timeline. I have done it a few months back but I dont have the fla right now to reffer. Its urgent pls help.
Goto Main Timeline From A Movieclip
Hi I have seemed to have forgotten how to go from a movieclip to a frame in the main timeline. I have done it a few months back but I dont have the fla right now to reffer. Its urgent pls help.
Goto Main Timeline From A Movieclip
Hi I have seemed to have forgotten how to go from a movieclip to a frame in the main timeline. I have done it a few months back but I dont have the fla right now to reffer. Its urgent pls help.
How To Tell Main Timeline To Goto Next Scene From A Movie Clip.
How to tell main timeline to goto next scene from a movie clip.
I’ve tried:
_root.nextscene()
_root.play()
_level0.nextscene()
_ level0.play()
_root.level0.nextscene()
_root.level0.play()
Nothing seems to work except having a button with the action, but I need it to work without having to press a button. Any help would be appreciated.
How To Tell Main Timeline To Goto Next Scene From A Movie Clip.
Mentaleruptions,
The code does work. Sorry for premature reply. It was late last night when I tried it. I got up fresh this morning and tried it with success. I just needed to move the line one up before the this.stop() command, duh.
Thank you vary much.
.
Goto Frame Label In Main Timeline From Movie Clip
Hi..
Could somebody point me in the right direction.
I have a buuton in a movie clip that I need to point at a frame label
on the main timeline.
I am using :-
on (release) {
removeMovieClip(dultanMC);
_root.play("Scene 1", "myframelabel");
}
It does not go to "myframelabel" but to the first frame of the
main timeline.
I've tried gotoAndPlay ("Scene 1", "myframelabel");
that just removes movie and does not redirect.
Please could somebody advise.
Dilema - Get Loaded In Swf To Goto Frame Label On Main Timeline?
I have a button that is loaded into my main movie at level 2. in my main movie on the timeline I have a frame label called guestbook. I want my button, when released to go to trigger the frame label.
on my button i have the script:
on (release) {
_root.gotoAndStop("guestbook");
}
Obvously this does not work because it references the wrong timeline so i tried:
on (release) {
_parent.gotoAndStop("guestbook");
}
thinking that somehow it would see the parent swf and work - haha - me and my dumb ideas of course it doesnt work.
do you know how i can get it to work. Perhaps i should mention that the button that loads in at level 2 is inside a movie clip (for reasons of animation)
anyway enough ramblings
Can you help me?
Thank you
Dilema - Get Loaded In Swf To Goto Frame Label On Main Timeline?
I have a button that is loaded into my main movie at level 2. in my main movie on the timeline I have a frame label called guestbook. I want my button, when released to go to trigger the frame label.
on my button i have the script:
on (release) {
_root.gotoAndStop("guestbook");
}
Obvously this does not work because it references the wrong timeline so i tried:
on (release) {
_parent.gotoAndStop("guestbook");
}
thinking that somehow it would see the parent swf and work - haha - me and my dumb ideas of course it doesnt work.
do you know how i can get it to work. Perhaps i should mention that the button that loads in at level 2 is inside a movie clip (for reasons of animation)
anyway enough ramblings
Can you help me?
thank you. I will of course keep answering other peoples questions when i can as a reward for your help in this matter
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
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
Reverse Play To A Choosen Timeline Point :confused:
Hi all,
I know the reverse question has been asked a lot before but I can find no real practical ref to this particular problem.
I have a movie with a movie clip inside it. The movie clip is a menu system with 3 buttons, and one motion tween. The motion tween is actually 3 pieces of individual text, each relevant to a button. All I want is for the buttons to either move me forward or backwards to a certain point in the movie clip timeline so that my text scrolls either left or right.
Any ideas?
Kind Regards
Floody
Update: Example files are www.hyperlinkrecords.com/flashkit/flashkit.swf
www.hyperlinkrecords.com/flashkit/flashkit.swf
Telling A Movie Clip To Play At A Point On The Timeline?
Hello all,
I'm sure this will be an easy question for most of you but the last time I really worked in Flash was back in Version 4 and 5. At the moment I have a website with a series of buttons that go to different locations (frame labels) on the time line. For each frame label there is my website text that is displayed. What I want to do is have a sliding door animation that opens each time I click a button and go to the corresponding frame label.
As I have it now I simply have this door animation set up on the time line, I would rather just have a movie clip that plays over my text each time I enter the frame.
I tried to use the syntax:
Code:
door.play();
But I received errors. Can any one give me some help?
Thanks,
Steven
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
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?
Play/Stop Flv From Main Timeline?
http://studio34design.net/aleks/aleks_chem3.html
about 30 seconds into this flash, there is an FLV of a computer screen. The problem is, when I pause the swf, the flv keeps going. How do I get around this?
1. Is it possible to convert the flv to swf?
OR
2. Is it possible to control the flv from the main timeline?
thanks people!
Action On MC To Play A Frame On Main Timeline
Flash 8
I'm trying to get a Movie Clip (in the 1st frame of the main timeline) to end by going back to frame 10 of the main timeline in Scene 1. I put an action in the MC's last frame
gotoAndPlay("_parent", 10); but nothing happens
I also tried "scene 1" " _root1" "_level1
Is there a way to navigate from the Movie Clip to the main timeline of Scene 1??
Thanks
Loadmovie On Main Timeline, Play, Then Continue...
Work on my Flash site is going great, but like most newbies it feels like I'm literally pounding this thing into shape with a sledgehammer.
I've got a simple question (aren't they all), and I swear I've searched the forum but to no avail. The answer is out there, but for some unGodly reason I can't find it.
I've got a main timeline with, say, 55 frames. There's a brief animation tween in the first 10 frames. At frame 11 I'd like to stop the main timeline, load a movieclip called mcPort (SWF would be fine as well) and have it play AUTOMATICALLY, and then restart my main timeline at frame 12 once mcPort is finished.
mcPort is basically a long slideshow type movieclip. I plan on adding 1 or two others of this type into my main timeline. I realize that I could just do all of this slideshow animation stuff within my main timeline, but it just gets unmanageable.
I gotta think this is possible. My search reveals people wanting to do the same thing, but always with a button action. My hunch is that a container is used, but I've not used one yet.
Thanks much
Play A Movieclip Once, Then Go To The Next Frame On The Main Timeline
Hello, I'm sorry for the long topic's title.
I have an animation I'd like to use as an INTRO in my flash movie. I will joint it inside a movieclip, giving it the istance name "INTRO". And I position it in the first frame of the main timeline.
How can I make possible that played once my intro (my movieclip) the player jumps to the second frame of the timeline, named by the istance "HOME".
Is it possible?
Thankyou very much for your help,
and great things.
Stebianchi
Making Main Timeline Play From Inside Mc In AS3
Hi
I'm primarily a motion graphics guy but am helping out a friend with some Flash web work. I have CS3 now but haven't touched the app since MX so Actionscript 3 is taking me some time to get to grips with - not that I was any more than a dabbler anyway.
I am simply trying to make the main timeline play when an MC on the stage reaches the end of its animation. I have tried variations of root.play("menu") or parent.play("menu") in the last frame of the MC but I get:
"1061: Call to a possibly undefined method play through a reference with static type flash.display:DisplayObjectContainer."
Also it breaks the previously ok code and the 'stop' on the 2 frames of the main timeline are now ignored.
Then I see stuff like this -
MC Instance On Main Timeline Play In Order
I don't know if my title is clear enough, but I'll try to clarify.
I have one MC on the main timeline, and duplicates of the same MC one after another. So basically 8 of the same MC lined up beside eachother.
Now the tricky part. I want halfway through the original MC, to jump to the second MC instance and start from frame1. Now the dilema is, that if I make an actionscrpit on the MC, it affects all the MC lined up together, because they are an instance of the original.
Could I use the duplicateMovieClip command, and how?
MC Instance On Main Timeline Play In Order
I don't know if my title is clear enough, but I'll try to clarify.
I have one MC on the main timeline, and duplicates of the same MC one after another. So basically 8 of the same MC lined up beside eachother.
Now the tricky part. I want halfway through the original MC, to jump to the second MC instance and start from frame1. Now the dilema is, that if I make an actionscrpit on the MC, it affects all the MC lined up together, because they are an instance of the original.
Could I use the duplicateMovieClip command, and how?
Goto Frame In Main Scene From Button In MC
I have a scene
-In which there is a MC
-In which there are buttons.
When hit i would like my buttons to go to and stop on a frame in the main scene.
I have got
on (release){
gotoAndStop (Frame);
}
But I relise this will have to be a frame in the MC how do i get it to refer to the frames in the main scene???
Thanks in Advance
HOW TO MAKE INDIVIDUAL MOVIECLIPS PLAY ON MAIN TIMELINE
I have been making individual movieclips for my flash website intro so as not to have long framelengths on the main time line. But, how do I make them play one after the other? I am trying to get familiar with onClipEvent and use frame labels, but just cant make it work. Please Help!!
Movie Clip Symbol Won't Play On Main Timeline
Hi everyone,
I've created a movie clip symbol with it's own animation on its timeline. I've placed this symbol onto the first frame of the main timeline but when I test it, it doesn't play. There's no stop actions or anything on either timelines so I'm not sure why this is happening. I thought that the animation in a movie clip symbol will automatically play (i.e. if you test in a browser) once it's on the main timeline - is this right? Or am I doing something wrong. Maybe I need to tell it to play?
Appreciate any advice.
Pause And Play Buttons To Control Main Timeline?
i have multiple "scenes" with no movie clips in them. i would like to add 2 buttons (one to pause and one to play) to control the timeline throughout the piece. how do you create buttons that control a timeline that is not a movieclip???
Tell Movie Clip To Play/stop From Main Timeline?
I have a main timeline that has a movieclip called "Clock". At one point in the main timeline I want the movieclip to play and at another point I want it to stop. I can't get script to control the movieclip.
Any tips?
Thank you so much for your time.
Please Help First Website Movie Clip Placed On Main Timeline Wont Play
Hi! if any one could please help me it would be greatly appreciated!
So im trying to make my first website in flash and ive ran into a problem. I have the main movie, my main time line. I have a few animations going on in this that were all created in that main time line. those work fine. however, i created two new movie clips (still inside the same .fla file) and animated them with thier own time line. I then thought you could just drag and drop these movie clips onto your main time line and they would play inside the movie. but when i press ctrl + enter, the dont play!
here are some points of intrest.
my main movie (the main time line) is 130 frames.
the movie clips i made inside the same .fla file are between 400 and 600 frames.
i placed both new movie clips on the 130th frame in the time line with their own layers.
also there is a layer for actions on the 130th that has stop();
i thought that maybe the time line had to be as long as those movie clips i created and so i extended it but they still didnt play.
im thinking action script is involved? please help me im getting pretty frustrated and im sure there is something simple to achieve this.
here is a link where you can download the source files im using. if you open the file the two movie clips i created are called front two and front one and are layers with the same name.
this board wont let me fully post my link cause the last word in it is s*h*i*t* so youll have to type it in your browser. its http://public.me.com/matts*h*i*t* (just remove the asterisks)
also i noticed that my file is huge. i used photoshop to create everything and them imported it into flash. is there a way i can reduce this size?
thank you sooo much! please help!
-Matt
Telling Main Timeline To Play Backwards From Movie Clip
Hi,
I am trying to tell flash from within a movieclip to start playing a specific frame within the main timeline only after it has finished playing the movieclip backwards. I can get the movieclip to play backwards fine but it's getting the main timeline to start from frame 1 which doesn't work. I have the following code on the first frame of the movieclip (which is called video) but it doesn't seem to do anything
onClipEvent (enterFrame) {
if prevFrame == 2 {
_root.gotoAndPlay(1);
}
else if {
_root.video.gotoAndPlay(2);
any suggestions?
Goto Random Frame From Timeline And Button
Hi:
My movie consists of a x number of frames.
I'd like the movie to load a random frame each time the movie loads.
This code seems to work ok for that:
randomFrame = random(x+1);
gotoAndStop(randomFrame);
However, I'd also like a button (random_but) on the stage, that would also send the movie to arandom frame when pressed.
What would be the code to assign this function to the button?
Should that code be assigned to the button, or directed to the button on the timeline, after the first random code?
Also - i fanyone could improve that initial random frame code, that would be swell.
Thanks so much!
Will
How To Reference Subbottons In A Drop Down Menu To Play Content On The Main Timeline?
Hi,
I have created a drop down menu placed in a movie clip with an instance name "how_menu".
The are 4 sub buttons which should play the content placed on the main timeline, referenced by frame labels, e.g. 2.01.0, in scene called 'names'.
How do tell the subbuttons in the movie clip to play the content on the main timeline, in scene 'names', from frame labelled 2.01.0?
I am using Flash MX 2004.
Thanks!
gayeta
Goto And Play Button
I'm having trouble with the action script needed to skip my intro movie.
I would like to goto and play the last frame of the movie as this contains action script to popup a new window.
I'm sure there is a simple action script for a goto and play button but I just can't get my head round it!!
Any help very gratefully received
Button Goto And Play Help
Hey guys,
I need to have my button goto and play scene 3 and scene 5.
What code would I need to use for this?
so far I have:
on (release) {
gotoAndPlay ("Biography");
}
It would be amazing if someone could help,
Many thanks, Dylan
Button: Play Then Goto
I have a flash video. I have 4 buttons. Id like after a button is clicked, that it play the next 15 frames, then forward to another part of the timeline. but each button needs to forward to a different part.
If there a way to have the script for the buttons to be something like this:
play next 15 frames, then gotoandplay 50
play next 15 frames, then gotoandplay 60
play next 15 frames, then gotoandplay 70
play next 15 frames, then gotoandplay 80
thanks.
How To Sequentially Play/Load External Video Clips (in SWF Format) In Main Timeline?
Hi,
Does anyone know how to sequentially play external SWFs loaded into the main timeline?
I have several SWF files with short videos embedded in them. I wish to load these external SWF files into my main timeline as follows:
User Presses Button -> Play Video Clip in External SWF#1 -> Once Video Clip in External SWF#1 has Finished -> Play Video Clip in External SWF#2.
I tried achieving this by adding: “var endmovie:Boolean = true;” to the end of each video clip inside the external SWF’s (e.g. “1.swf”) then cycling through an if statement in the main timeline to see when this condition was meet:
ActionScript In Main Timeline:
Code:
var mc_Loader = new MovieClipLoader();
mc_Loader.addListener(this);
this.createEmptyMovieClip("Container", this.getNextHighestDepth())
Container._x = 0
Container._y = 0
button_mc.onRelease = function () {
mc_Loader.loadClip("1.swf",Container);
function onLoadInit(target_mc:MovieClip) {
myInterval = setInterval(cycle,30);
function cycle() {
if (Container.endmovie == true){
mc_Loader.loadClip("2.swf",Container);
}
}
}
}
To my surprise, this code does actually work - until you add the "button_mc.onRelease = function () {" part!
How is the best way to go about achieving this? Am I on the right track? (By the way, using .FLV files or one long external SWF file is not really an option due to long loading times...I think...)
Please Please Help!
Button In MC Won't GoTo Play Frame In Scene
i am fumbling my way through scripting and need help.
I have a button in a movie clip, which is in another movie clip, which is on a layer in my scene. I want that button to go to and play a frame in that scene.
going to that button in the first movie clip and telling it to GoTo and play frame 15 isn't working. I have tried telling it both "curent scene" and the scene's name.
is there some sort of scripting that I need to know to get the movie clip's buttons to control the scene?
-josh
I Would Like To Play And Then Goto Scene Only If Button Event
I would like to play and then goto scene only if button event is true
so is there someone who can help me to build the script to do so
example: scene1 is playing and stoping into the midle
i have 3 buttons
if one of these is click the scene1 continue to play and
at the end goto the scene coresponding to the button clicked.
I have no idea to make it work
Problem With Goto And Play On Button - Swf/fla Link
Hi there, I would really appreciate any help with this annoying problem. As you can see the microphone menu divides into several buttons, and I would like, when each one is clicked, to go to frame 205 on the main timeline. This will then fade out the whole animation. (on a separate note, how can you then link to a different web page for each button, after using the same frame 205 fade out?)
The trouble is I'm just not getting any response when cliking the button (I have only tried with the "news" button so far). In the Fla file, you have to go to frame 110 of the "menu" layer, enter the mic symbol then go to frame 11 to highlight the various buttons.
The files can be found HERE (Homepage MX)
Note: this was created on MX 2004 but I saved it as MX for convenience. Also, I have excluded various features such as sound etc for file size.
Flash MX : How To Play And Then Goto If A Button Event Occur ?
I would like to play and then goto scene only if button event is true
so is there someone who can help me to build the script to do so
example: scene1 is playing and stoping into the midle
i have 3 buttons
if one of these is click the scene1 continue to play and
at the end goto the scene coresponding to the button clicked.
I had tried this :
\for the first button on the first frame of the scene 1
on (release) {
set(001, true);
play();
}
\for the second button on the first frame of the scene 1
on (release) {
set(001, true);
play();
}
\for the last frame of the scene 1
if (001) {
gotoAndStop("Scene 3", 1);
if (002) {
gotoAndStop("Scene 4", 1);
play();
}
}
---------------------------------------------------------------------
It still doesn't work...
is there someone who can help me ?
It could be usefull !!!
W.
Flash MX : How To Play And Then Goto If A Button Event Occur ?
I would like to play and then goto scene only if button event is true
so is there someone who can help me to build the script to do so
example: scene1 is playing and stoping into the midle
i have 3 buttons
if one of these is click the scene1 continue to play and
at the end goto the scene coresponding to the button clicked.
I had tried this :
\for the first button on the first frame of the scene 1
on (release) {
set(001, true);
play();
}
\for the second button on the first frame of the scene 1
on (release) {
set(001, true);
play();
}
\for the last frame of the scene 1
if (001) {
gotoAndStop("Scene 3", 1);
if (002) {
gotoAndStop("Scene 4", 1);
play();
}
}
---------------------------------------------------------------------
It still doesn't work...
is there someone who can help me ?
It could be usefull !!!
W.
|