Triggering A Movieclip From A Timeline
I know this is easy but in all my documentation I can figure out a simple way to play a movieclip when it gets to the end on another one. Basically I want a button to play a movie when it is pressed and at the end of that button movie I want it to play another clip on the main timeline. Also I have a sound in my movieclip waiting to be played on the main timeline and it plays without the clip playing. i guess its because the instance is on the stage but how do I only have it play when its called. Thanks,
KirupaForum > Flash > Flash 8 (and earlier) > Flash MX
Posted on: 03-24-2005, 11:31 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Triggering A Movieclip From A Timeline
I know this is easy but in all my documentation I can figure out a simple way to play a movieclip when it gets to the end on another one. Basically I want a button to play a movie when it is pressed and at the end of that button movie I want it to play another clip on the main timeline. Also I have a sound in my movieclip waiting to be played on the main timeline and it plays without the clip playing. i guess its because the instance is on the stage but how do I only have it play when its called. Thanks,
Triggering Sounds From Timeline
didnt have too much time to browsr the forums, Im sure this answer is in here somewhere, but....
I have a movie thats riddled with sound effects and voice overs. I have put them all in movie clips and called to them from various places to start the sound event ( ie - from the end of other sound files, and from the timeline ). everything works smooth except these particular sound files that have to play when a flap opens or closes. Ive put these actions ( flap_close.play(); ) on the timeline only. they work in the first half of the movie and then fail in the last half. wha???
cant figure out what the prob is... halp! TIA
p0
Help With Loading/triggering External Clips Into Main Movie Timeline
I have a scenario I need some input on if anyone could be so kind...hopefully it makes sense...
I have a Flash movie file, and I have 5 large 'external' SWF files being called. There are 5 buttons in the main movie, each one when clicked needs to load it's proper exteranl MC into the main movie (ie button 1 loads/plays MC1.swf)
...but, it needs to start each each external clip at Frame 2, so it can't just load the movie on frame 1 and go...
so far I have something like this, but obviously its not right:
on (release) {
_root.contents.loadMovie(“externalfile.swf”);
}
How do I code the buttons to do that properly?
Also, is there a way to preload those external clips right off the bat?
Thanks for any help...
seanpc
Help With Loading/triggering External Clips Into Main Movie Timeline
I have a scenario I need some input on if anyone could be so kind...hopefully it makes sense...
I have a Flash movie file, and I have 5 large 'external' SWF files being called. There are 5 buttons in the main movie, each one when clicked needs to load it's proper exteranl MC into the main movie (ie button 1 loads/plays MC1.swf)
...but, it needs to start each each external clip at Frame 2, so it can't just load the movie on frame 1 and go...
so far I have something like this, but obviously its not right..it's only calling and loading the external clip, but not goign to frame 2 like I want it:
on (release) {
_root.contents.loadMovie(“externalfile.swf”);
}
How do I code the buttons to do that properly?
Also, is there a way to preload those external clips right off the bat?
Thanks for any help...
Van
Help With Loading/triggering External Clips Into Main Movie Timeline
I have a scenario I need some input on if anyone could be so kind...hopefully it makes sense...
I have a Flash movie file, and I have 5 large 'external' SWF files being called. There are 5 buttons in the main movie, each one when clicked needs to load it's proper exteranl MC into the main movie (ie button 1 loads/plays MC1.swf)
...but, it needs to start each each external clip at Frame 2, so it can't just load the movie on frame 1 and go...
so far I have something like this, but obviously its not right..it's only calling and loading the external clip, but not goign to frame 2 like I want it:
on (release) {
_root.contents.loadMovie(“externalfile.swf”);
}
How do I code the buttons to do that properly?
Also, is there a way to preload those external clips right off the bat?
Thanks for any help...
Van
Problem With Movieclip Triggering
Hey all!
just a quickie.Im a little stuck with an MC prob.In short i am using a stage-timeline with sliding pics.I have 10 buttons on this pic stage, 1-10.Anyways i have a situation where i have a movie clip inside a movieclip.
Problem is when i start the movie I dont want the movie clips inside movie clips to start playing right away.So i have put stop actions on the first keyframes which is all sorted, no probs there.I only want the MC to be triggered when 1 of the 10 buttons are clicked upon.I am using tell targetting but its still not triggering my MC.Can someone help.
Summed up i need to go from >>
buttons(main timeline, scene 1 - mc -inside mc-main timeline, scene 1 so 1 movie clip inside mc)
I know it must involve some kind of Root code but i suck pritty bad with actionscript.If someone can help me out id be greatful.
cheers!
chris
How To Q: On Radiobutton Triggering A Movieclip.
Hello brilliant people,
so here's what I'm trying to do:
Quote:
by selecting radiobutton1, image1 appears.
And then...
When selecting radiobutton2, image2 appears.
and since radiobutton1 is no longer selected (cause there in same group) then image1 goes away.
and so on.
I currently am planing on the radiobuttons to = an amount. so it'll be like a total items type of deal.
so, what ever radiobutton is selected will send a total to the total box. at same time, I want it to trigger an image to appear.
(as in: just to show the cost of that radiobutton item.)
Simple right!
thats what I thought.
ps. I don't want to use imageloader, unless the loader window can be transparent so I can see what is behind it once the image is loaded. I think i would use a MovieClip instead. (image is .gif for a reason)
if this is confusing to anyone, please speak up (a simple, "tell me more" or " " is fine)
I'll try and explain it better.
Triggering A Movieclip Via Hit Test
im making a flash game and was wondering how can i get 2 movie clips to colide for example a ball and fire to trigger off a new movie clip.What i want is when the ball hits the fire it triggers off an explosion movie.
Triggering Another MovieClip From The Current One?
Hi, guys,
I'm back with another basic question...I am trying to start a mc once the current mc hits a particular frame#. I've tried assigning an instance name to the mc I wanna play by inserting a keyfram on the stage like this:
theMCiwannaPlay.gotoAndPlay (2);
but that didn't work. So, can you suggest me another way of doing this?
thanks in advance
Al
Triggering Vars On Movieclip Settle
when making an object slide to a new position (be it x or
y) ...does anyone know a way of returning a value/var once it has arrived at that position? for example:
object._x+=(var externally set-object._x)/3;
- and when this has done and object._x has reached the var externally set..trigger var.
I would probably use this:
if (object._x == var externally set-object._x){
triggerVar = true
}else{
object._x+=(var externally set-object._x)/3
}
except it never really gets to that exact pixel does it with flash?
do you know what i mean? its almost like youd have to use...
object._x+=Math.ceil((var externally set-object._x)/3).
is that right/best way of going about what i want to do?
Movieclip Inside Movieclip (Timeline Problem)
Temp link to the swf file:
http://avflower.com/
Fla file (rar archive): (deleted)
Click to the fish, so, the top part of the fish would break and stop. Please, help me to change the AS3 code the right way.
GotoAndPlay Movieclip To Movieclip Timeline
I have been toying with how to get this done for two long now. And I haven't come across anyones thread that anwers this. Basically, I am setting up a site and I have been doing a lot of spagetti coding, since I can't seem to get anything to work if I just put it all on one frame on the root level. I have a movie clip (called dengel_intro) on my root layer that has many movie clips within in (one in particular is greg_home). Now this movie clip has an intro animation and then it stops. When i press the greg_home movie clip I want to send the user to a frame on the dengel_into movie clip. Here is the code that I have on the greg_home mc so far
code:
stop();
onRollOver = function()
{
play();
}
onRollOut = function()
{
gotoAndStop (1);
}
onRelease= function()
{
_root.dengel_intro.gotoAndPlay (76);
}
Everything works but the onRelease.
Need Some Help With Movieclip Timeline
heya guys, just a lil problemo i need sortin out...
i've got a movie clip (A), inside that movie clip there is another movie clip (B). When i click on (B) i want to go to frame 30 of (A) but i cant figure out the code for (B), i've tried
Code:
onClipEvent (mouseDown) {
if (this.hittest(_root._xmouse, _root._ymouse, false)) {
_root.gotoAndPlay(30);
}
}
but that goes to frame 30 of the actual movie. What i want is to go to frame 30 of movie clip (A)
any feedback appreciated, thanks alot
MovieClip To Timeline
In AS 2.0 I used to refer to the main timeline with _root. I can't figure out how to do it in AS 3.0. I have a button in a MC that, when clicked, should cause to main timeline to gotoandplay the frame withe the label "s1". Any help is appreciated.
Al
Timeline Vs Movieclip
I been experiment actionscript this few day, some question pop up.
inputing actionscript on a movie clip to make rotation
onClipEvent(enterFrame){
this._rotation=this._rotation+=50;
}
wat happen if you wan the script to be on the timeline and not the movieclip itself.....?
this._rotation=this._rotation+=50;
doeen't work on the timeline.
From Xml To Movieclip Timeline
[Flash 8] load images from xml in movieclip as sprite
In tutorials that you can find on Kirupa as well google, they explain how to convert mouse movement into a variable useable for something like: gotoAndStop(varhere) for 360 degree product view. The only problem with that system is that you need a movieclip to already contain the serie of images. What I want to try it load the xml file, get from there the links to the images and preload them one by one into a movieclip it's timeline. So basicly afther the preloading you got a movieclip on stage and in it's timeline the serie of images.
Now I know how to load xml files, create dynamicly a movieclip using: createEmptyMovieClip(), but not how to load an image into the timeline. For example I created a movieclip called: container, and I loaded the xml with the containing image links. But how do i get "Image0001" in frame 1 of the container and "Image0002" in frame 2?
I already tried this:
Code:
this.createEmptyMovieClip("container", 1)
container.gotoAndStop(1)
container.createEmptyMovieClip("frame1", 1)
container.frame1.loadMovie(listImages[0], 1)
container.gotoAndStop(2)
container.createEmptyMovieClip("frame2", 1)
container.frame2.loadMovie(listImages[1], 1)
container.gotoAndPlay(1);
The listImages is an array containing all image links, and the loadMovie() actually works fine, because I can see the image loaded. But as soon I loaded 2 images and play the container, I only see 1 image. It seams that the last createEmptyMovieClip, overwrites the first or something.
Anyways, I hope someone is able to help me out, maybe I'm doing it all totally wrong. Already thanks
Timeline Vs Movieclip
I been experiment actionscript this few day, some question pop up.
inputing actionscript on a movie clip to make rotation
onClipEvent(enterFrame){
this._rotation=this._rotation+=50;
}
wat happen if you wan the script to be on the timeline and not the movieclip itself.....?
this._rotation=this._rotation+=50;
doeen't work on the timeline.
Can A Movieclip Unload Itself From The Timeline?
I have a swf. It loads different swf's onto its main timeline using the LoadMovieNum() function. Then those loaded swfs play.
What I want is for those swfs to unload themselves, when they're done. I want them to close.
I don't want to have to control them from the main swf.
Is there some way for a loaded swf to close itself? Unload itself??
Or can I make the loaded swf talk to the swf that loaded it, say like using a bit of code like this:
_parent.gotoAndPlay("i_am_done")
then when the main swf (the parent) goes to that frame, it plays and unloads the current movie it has loaded?
I feel like I'm doing a poor job of explaining what I'm trying to do.
But I want it to be understood that I'm NOT loading clips from the swf's library. I'm loaded external swfs that play on a higher depth. I want those swf's to unload themselves when they're done playing.
Movieclip Controls Timeline
to make things less confusing, i want to put script on the last frame of a movieclip, so when it finishes playing, it goes to the next scene. that way, in the main timeline i only have to deal with a couple frames. here is the script i'm trying to use:
_level0.nextScene();
it's not working, though. anybody know what i'm doing wrong?
Events Within A Movieclip's Timeline
Here's my problem. I have a movie clip symbol and contained in that movie clip's timeline is a button symbol. I want to have a on.Press event for the movie clip symbol and on.Press event for the button symbol. But what I encountered is when the on.Press event is set for the movie clip the button symbol event gets cancelled out. If I comment out the movie clip code then button symbol event works. I've also tried using onMouseUp / onMouseDown but it screws things up when you drag the movieclips. Strange? There must be a way that you can have button events inside another movie clip timeline who's movie clip triggers events as well? Let me know thanks!
Code:
_root.mc_instance.onPress = function() {
this.startDrag();
};
_root.mc_instance.onRelease = function() {
this.stopDrag();
trace("movieClip event");
};
_root.mc_instance.button_instance.onPress = function() {
trace("button event");
};
_root.mc_instance.button_instance.onRelease = function() {
trace("button event");
};
Can I Convert A Timeline Into A Movieclip?
I know this is gonna sound kinda special ed, but I'm desperate...
I created an intro animation in a new fla. Works good, looks good.
The problem is I have a Main.fla that I want to include the intro in as a movie clip element.
How the heck can I convert the timeline of a fla into a movieclip element to be used in another fla?
I should have created a blank movie clip in the Main, but like I said, I'm a lil special Ed this week...
Thanks and on the edge,
Brendang
Move Timeline In A Different Movieclip
I have a button with a roll over that I want to move the timeline in a different movie clip. I've tried:
on (rollOver) {
gotoAndPlay("over");
_root.intro.cross and circles.circlemovie.button2.gotoAndPlay(1);
}
But that doesn't seem to be working.
Any ideas?
Thanks.
MaxHeight
Controlling Timeline And Movieclip
Hello,
I have a stop function on a button:
on (release) {
_parent.stop();
}
which stops the main timeline. I also have a movie clip that resides on that main timeline.
The stop(); command stops the main timeline, but I need to stop the movie
clip timeline as well. When the movie clip does not stop it goes out of sync with the main timeline.
I would think is possible but I can't figure out how to accomplsh this.
As well, I'd need to be able to play(); or resume both as well but once the stop is solved I would guess I could apply the play(); function to that as well.
Any help would be very apprecited!
Calling Out Timeline In A MovieClip
Flash 8
Ok I have a button that is when you press it gotos 46 and plays the animation.
that works fine. But....
I have also Calling a frame in a movie clip to display that frame.
This frame im trying to call out is the content of the website.
So there has to be diffrent frames for these pages.
Code:
on (press)
{
_root.gotoAndPlay(46);
}
on (release)
{
this._parent.pages.gotoAndStop(2);
}
The name of the movie clip is called pages.
If i dont put stop in the first frame its shows the first frame along with others.. You know( Flash back and forth thru pages) But if i put stop(); then it will not engage to the frame im trying to call out.
if this doesnt make scence to you please fell free to add me On MSN
rodgerjr@comcast.net
Load Movieclip From Timeline
my movie is a game with a time limit.
When the timeline reaches the end. I need to automatically load the "you lose" movieclip.
The name of my movieclip symbol is "loser" the name of the frame it needs to begin playing at is also called "loser"
In the actions layer on the last frame i have this:
trace ("loser");
_root.mc_loser.gotoAndPlay("loser");
But it is not working. What am I missing?
Movieclip Timeline Navigation
can anybody tell me what the correct code is to place at the end of the movieclip timeline or on the frame in the main timeline to get the movie to go to the next frame after a movieclip has played?
Movieclip Timeline Navigation
im fairly new to flash but want to get into actionscript 3.0. the problem i have is that i have a 20 frame movieclip in a single frame and a button on this frame also. i have written a statement so that when the button is clicked the movieclip plays. however, at the end of the movieclip the movie just stops and it won't go to the nextFrame or any other frame in the timeline. i was wondering how you get it to do this. i have tried something like
myMovieClip_mc.addEventListener(event.Event, moveFrame);
function moveFrame(e:event):void{
gotoAndStop(4);
}
but im not sure what event to use or if this is even close to being right. can anyonehelp me? thanks, tom.
Help With Timeline 'goto' In MovieClip
Hi, I'm very very very new to ActionScript and have a quick question I'm sure anyone here could do in their sleep....
Here's the dilly:
I'm making a sort of animated sub-menu inside a movie clip.
So I have a couple buttons to go to different places in the movieclip timeline.
I'm using the (what I thought) was a normal button goto scrip:
ActionScript Code:
stop();
this.right_btn.addEventListener(MouseEvent.CLICK,clickListener1);
function clickListener1(event:MouseEvent):void {
gotoAndPlay("start_right");
}
but when I test the project I get this error:
TypeError: Error #1010: A term is undefined and has no properties.
at scantest_fla::thumbnails_1/scantest_fla::frame9()
can buttons inside a MovieClip not control the timeline inside the same MovieClip?
Many Thanks!
OOP Getting From MovieClip Class To Timeline
Files:
http://rapidshare.com/files/12813666...there.rar.html
Ok, so. i've got trouble, becouse i want after click on button-in-movieclip, the main timeline do gotoAndStop(3);. But i don't know hot to get from class for MovieClip, to go back to the timeline. Pls help
Is This Possible? - Easing A Movieclip Timeline
Hi. I'm trying to create a smooth ObjectVR for a 360° product rotation in Flash.
Since the movieclip is made up of 36 sequential images (10° each), does that make it impossible to add easing to it? I'm trying to make the start and stop of the rotation (either as a draggable mouse over or just with simple timeline buttons) super smooth, instead of just starting and stopping on a dime.
Here is a .fla file of my movieclip, without any actionscript if somebody wants to play around with it.
http://homepage.mac.com/hallvalla/sa...uo_400.fla.zip
Also, I'd like to control the speed of the rotation somehow. Let me know what you guys think.
Navigating The Timeline From Movieclip
Hi there
I'm hoping someone can help me with this. I have created a scrolling image gallery in Flash which works fine from the Timeline (Scene 1). Now I am using it inside a movie clip called gallery I need to know how to get it to load the images into the main loading area now that it is within a movie clip. The code that makes the images load into the loading area at the moment is this
on(press){
_root.the_entire_gallery.gotoAndPlay("pic5");
}
I'm assuming that now it is inside a movie clip I need to add something other than _root. to get it to access the images but I don't know what. I've tried _parent but to be honest I'm clutching at straws as I don't really understand what it does.
Hope someone can help.
Thanks
Controlling Timeline In One Movieclip From Another
Hi,
I'm trying to migrate to Actionscript 3.0 (pretty confusing). I have 2 buttons (instancename page1Btn and page2Btn) in one movieclip (instancename mcMenu) and one movieclip (instancename mcContent). in mcContent I have 2 named frames: page1, page2. Simple but.. uhhu.
I putted the actionscript on the main timeline.
I tried with gotoAndPlay("page2"); to control the main timeline, and that works fine. But I need to understand how to control other movieclips. Pleeeease help me
Attach Code
stop();
import flash.events.MouseEvent;
mcMenu.page1Btn.addEventListener(MouseEvent.CLICK, page1);
mcMenu.page2Btn.addEventListener(MouseEvent.CLICK, page2);
function page1(event:MouseEvent):void {
mcContent.gotoAndPlay("page1");
}
function page2(event:MouseEvent):void {
mcContent.gotoAndPlay("page2");
}
Timeline Movieclip Issue
So i have a animation on a timeline, and a movie in a movieclip.
What i want to happen is the animation plays on the timeline, then when you click the play button to the movie, the movie plays and the timeline stops where its at and pauses.. then when you pause or stop the movie, the timeline starts from where it left off. if there are any ways to go about this.. maybe having both of them on the timeline or something.. im up for it.. any help would be appreciated.
thanks
http://www.anthonybruno.info/kirupa/index_video.fla
Movieclip Timeline Control
Hi, new to AS3.
I'm trying to animate a MC on the stage before moving to a named stage frame. i want the MC to finish all 27 frames before it advances stage frames. It loops, and traces 1-27, but doesn't advance the MC framehead. The instance name is correct.
How do I:
MC.play();
wait until MC is finished;
gotoAndStop("StageFrame");
?
thanks.
function gotoLabeledFrame(Event:MouseEvent) {
for (var x:uint=1; xframe<=27; xframe++) {
doorhandle.gotoAndStop(doorhandle.currentFrame+1);
trace(x);
}
gotoAndStop("LabeledFrame");
}
Dynamic Movieclip Timeline
hi
i m trying to access the timeline of a dynamic loaded movieclip(attach movie)
how it can be possible?
plz provide help..............................
Main Timeline Var In Movieclip
Hi--
I'm setting a variable on the first frame of my main timeline and need to read that value from the first frame of a timeline inside a movieClip. How do I do this?
trace(this.parent.vid);
Code:
trace(this.parent.vid);
doesn't work!
Help!!
Thank you!
:grimey
Code:
trace(this.parent.vid);
Loading MovieClip + Timeline
Hello,
I'm trying to load a FLV file using the Video, NetStream & NetConnection objects. I do this in an actionscript 3.0 class that extends MovieClip. I'm using an event listener on the class object on the ENTER_FRAME event. For some reason, the video.totalFrames = 1 although there are about 495 frames in the loaded movie. Therefore, when I enter the event handler, the value of video.currentFrame always equals zero.
Anybody familiar with this case?
Thanks,
OML
Help With MovieClip Call From Main Timeline
I am trying to get an instance of a movieclip placed on the main timeline to go to frame 9 of the movieclip instance that is residing on my main timeline, but it doesn't seem to work for me. Here's what I am doing.
I placed a movieclip on my main timeline and gave it an instance name of bob.
Then on the main timeline (on a frame# => where bob is), I placed an action that says:
bob.gotoAndPlay( 9 );
According to the MM docs, this should tell the instance to go to frame 9 of the instance of bob and play. Within the "bob" movieclip there is a stop command at frame 10 so it should go to frame 9 and play 9 and 10 (which is what I want it to do).
Am I overlooking something?
Thanks for your help.
Topearn
Help W/controlling Movieclip From Root Timeline
I would appreciate any help on the following:
I am trying to control the animation of a movieclip from the root timeline but not getting the expected results.
Root timeline has single frame and two layers.
First layer is for the actions and the second layer for the movieclip (instance name is baller) itself. Root timeline has the following code:
stop()
baller.gotoAndPlay (2)
The movieclip (baller) has 30 frames and 2 layers. First layer is for actions and the second layer has a simple animation which moves an object from point a to b.
Animation starts on the second frame and continues to the 3oth frame.
First frame of the actions layer of the movieclip has the following code
this.stop()
and the last frame has
this.gotoAndPlay (2)
What I was expecting was that the root should start the movieclips animation from frame 2 and continue to play.
What happens is that movieclips timeline advances to frame 2 and just stops. I also made sure that action layer's frames between 1 and 30 are empty key frames.
I realize that there are other ways of doing this but I need to use this approach for more complex animation if it works.
Thanks in advance for anyone offering some ideas.
Controlling Main Timeline From Movieclip
I've inserted a button within a movieclip, and I need it to control the main timeline, specifically jump to a different scene.
Here's the script...
on (rollOver) {
gotoAndPlay ("1");
}
on (rollOut) {
gotoAndPlay (23);
}
on (release) {
gotoAndPlay ("Brief", 1);
}
It's the last one thats the problem. "Brief" is a scene on the main timeline. But it's just not working. Any ideas?????? (the first two, "rollOut" and "rollOver" are on the movieclips timeline)
Thanks!
How To Control Main Timeline From A MovieCLip?
I have a button within a MC. I want that button ONRELEASE to tell the main timeline to go back to FRAME LABEL "main" and stop.
I know this has got to be easy....what's the code for it??
Controlling Root Timeline With MovieClip
I load an external movieClip into a blank movieClip and then I also have a stop on the root timeline. After the loaded movieClip is finished playing I want to move to the next frame on the root timeline.
I've tried _root.play(); and play(); on the last frame of my loaded movieClip but the root timeline wont advance.
I've also tried _root.gotoAndPlay as well as gotoAndPlay.
Can anyone direct me to a tutorial that explains controlling the root timeline with ActionScript from within a loaded movieClip?
I have no trouble using a loaded movieClip to load other movieClips on to the root timeline but I can't get it to stop and go. HELP!!!
Movieclip Preview On Main Timeline?
This may be a very stupid question - even more stupid because I've been using Flash for 6 years. anyway..
I downloaded a FLA the other day from one of those cheesy template emporiums - there was a cool effect, and I was just curious to see "how they did that" etc...,
Nothing was really impressive, except for the fact that as I'm scrolling through the main timeline, the movieclips were going through the motions of their own timelines, in relation to the main timeline. I've never seen this before - in my files, all my movieclips just sit at their first frame when scrolling through the root timeline.
I looked all over in Preferences, and couldn't find anything that looked like what I was looking for.
Is this one of those things that everybody knows about but me? HAHAH. If you know what I'm talking about, please let me know, because I'd love to enable it.
Thanks!
|