ActionScript 3.0 :: Working With Frames - "If The Main Timeline Is Finished - Change To The Play Button"?

Jun 10, 2010

I am on the main stage. In a layer I create a button. I double click on this button to enter its layer. I then do some AS3 to say if the play button is pressed, to change to a pause button. How would I say "If the main timeline is finished, change to the play button"? I am trying

[Code]...

View 1 Replies


Similar Posts:


ActionScript 1/2 :: Play Main Timeline After A Movie Clip Is Finished Playing?

Jul 10, 2009

The movie clip is an actionscript movie which calls images from an external XML file and shows them as a slideshow. What i need to do is after the last image plays, stop the movie and move the main timeline to the next scene of the main movie. Everything logical in my brain is not working, and it may be that I have been staring at this project for too long but for the life of me i can't make this work.

View 11 Replies

ActionScript 2.0 :: CS3 Making A MovieClip Play It's Frames, Then Stop On A Main Timeline Frame?

May 12, 2010

I am currently in the middle of making a "sniping" flash game. In the first level there are a series of moving targets which are also movie clips. Inside the movie clip there is a 7 frame animation of the target exploding. Inside that is a tween of the target moving up and down. And inside that there is a plain old button.

What I want to happen is when you click on the moving target it explodes and brings you to a new frame of the main timeline. (ex. Main Timeline frame #27) But I'm pretty sure it thinks I was to play the seven frame animation of it exploding and then go to frame 27 inside the movie clip, rather then frame 27 on the main timeline.

Here's what my AS looks like on the target (ActionScript 2.0 is what I'm using.)

on (press) {
play();
}
on (release){
gotoAndStop(27)}

So how do I make it explode and then take me to frame 27 on the main timeline?

View 3 Replies

ActionScript 3.0 :: Play Pause Button On Main Timeline In Flash Movie

Jan 28, 2011

I have been trying to create a play/pause button for the main timeline in my flash movie. Created a movie clip with 1st frame - a pause graphic, then on 2nd frame - play graphic, labelled the frames 'pause' and 'play' consecutively and put a stop action on the first frame of the movieclip. Then put the following code in the actions layer of the main timeline (and gave instance name of 'ppBtn' to the movieclip):

var pp:Boolean = true;
function ppState(event:MouseEvent) {
if(pp) {
stop();
event.target.gotoAndStop('pause');
[Code] ....

It works in stopping and starting the movie but the actual movieclip doesn't toggle between the pause and the play graphics (just stays on the 'pause' state - 1st frame).

View 5 Replies

ActionScript 2.0 :: Return To Main Timeline When MovieClip Finished

Dec 10, 2002

I am in a movieclip, on the 1st frame of my main timeline. Once my movieclip has reached a point/finished, I would like return to the main timeline.

View 16 Replies

ActionScript 3.0 :: Moving The Play Head In The Main Timeline From A Button In A Movie Clip?

Jun 23, 2009

I have a movie clip that loads and when it is done playing it has a close button that unloads the movie clip... I want to add code to this button that moves the play head to frame 20 of my main timline using actionScript 3.0

View 10 Replies

ActionScript 3.0 :: Returning To Main Timeline When MovieClips Animation Is Finished?

Jul 13, 2011

I have an intro animation inside of a MC on frame 1 of my timeline, when it's finished playing the 100 frame animation I want it to jump to frame two of my main timeline.I've tried root and parent scripts at the last frame of the animation but it's not working. Do I need to add root to the package?Even gotoAndPlay isn't working

View 1 Replies

ActionScript 3.0 :: Calling FLV / F4V Clips In Main Timeline And Checking If One Has Finished Playing

Mar 30, 2011

I'm working on a campaign website and I need to catch the deadline by tomorrow! I'm stuck. I hope somebody here could help me. Here's how I want to do it:Everything will happen in the main timeline / main Stage.

1. I have F4V clips that I want to load into the FLV Playback, placed in the main timeline (stage), every time the corresponding buttons are clicked. The buttons with questions and their actions are each placed in their corresponding MC. (is it possible? And is it possible to load different flv clips in one FLV Playback?)

2. The user is asked a question, they will have to answer yes or no before they can continue. So if they answer yes, "yes.f4v" will play, no then "no.f4v" will play. Then the corresponding clip will play and the next question will have to appear ONLY after the clip is done playing. How do you check if an f4v is finished playing? Does it matter whether you use FLV or F4V? (I have this one worked, see the code below)

I have made 2 setups:

- Setup 1 is I place an FLV Playback Component in the main timeline and I am planning to load all F4Vs in it when a corresponding button is clicked.

- Setup 2 is I create swf's of all the F4Vs and load the swf in the main timeline on certain frame into a blank MC.

View 2 Replies

ActionScript 3.0 :: Get Main Timeline To Stop In The Beginning On Button Press To Play And At The End Stop Again?

Feb 1, 2008

I just got Flash CS3. I'm trying to get my main timeline to stop in the begining, on button press to play and at the end stop again. In AS2, you would just put stop(); on the first keyframe and stop(); on the last key frame and program your buttons accordingly.

The stop(); does not work!!!! It's driving me crazy. What am I missing? I've gone through the tutorials in Flash and they don't work either.Also, if you have MovieClip that contains an animation and you don't want the movie clip to be on a continuous loop how do you stop it from playing. In AS2, I would put a stop(); on the last keyframe of the movieclip's animation. This also does not work in AS3.

View 9 Replies

ActionScript 3.0 :: Flash - Play Movie Clip With The Button Click Without Playing All The Movie Clips On The Main Timeline

Apr 26, 2009

I'm trying to make a flash website that has clickable buttons that will play different movie clips. But I dont know how to make it to just play the movie clip with the button you click without playing all the movie clips on the main timeline.

View 1 Replies

ActionScript 3.0 :: Frames On The Main Timeline Each With A Different Movieclip?

Nov 8, 2010

I have 6 frames on the main timeline each with a different movieclip. Is it possible that when one movie clips finishes running it will go to he next frame on the maintime line and run the next movieclip on the next frame with AS3?

View 1 Replies

Text Tweens Take Place On Frames In The Main Timeline?

Jun 30, 2009

I am fairly new to flash and I have been trying to make a product demo. Basically I want some text to fade in and then some pictures to show up one by one and then disappear and then some new text fades in etc. This is to talk about a product and show various parts of it as the text on the screen is discussing those parts of the product. My question is what the preferred way of doing this is. Here are the options I can think of.
 
Approach 1) Put all animation in the main timeline. All text tweens take place on frames in the main timeline. Approach 2) Put the text fade-in tweens in a movie clip and put that on the main timeline.
 
I have tried both these approaches but neither one has been working for me for the following reason.
 
Approach 1) Makes timeline very long and unwieldy. If one thing changes, it shifts everything over and messes up my whole timeline. Hard to manage. Approach 2) If I have a stop(); on the main timeline, my animation stops in mid fade. In cases where I don't have a stop, I can't figure out how to do a series of objects fading in one after another. Is there a way to check if a movieclip has finished and only go to the next frame if it has finished? How do I get a series of clips to play one after another when I am running them as seperate movieclips off the main timeline.

View 5 Replies

ActionScript 2.0 :: Main MovieClip With Multiple Frames On Timeline

Mar 14, 2003

I'm designing a website which has one main MC in the timeline. This main MC totals about 650 frames with text and pictures for each page (65 pages). This when published into a .swf, was 172KB. However, the download time was huge, almost 45 seconds. The intro page works fine, which I then use a loadMovie to bring in the main .swf with navigation bar, etc. So, I took this large .swf and split it into 3 smaller .swf's, 50, 111 and 85KB, for each. Now when live online, this too, seems too large and almost 30 seconds to download. Can I optimize in any way or should I just again split the 3 movies into maybe, 5 movies? What is the 'best' size for each .swf that will be published online? You can see the link yourself at [URL].

View 3 Replies

ActionScript 2.0 :: Three Frames On Main Timeline - Fade Effect Not Work?

Feb 14, 2010

I've created three keyframes on the main timeline, the first is empty, and so is the third. In the second I have a movieclip that contains a classic tween. The movieclip has an alpha of 0 at frame 1, and 100 at frame 15, then at 45 it does the same in reverse until frame 60. On the last frame (60) of my movie clip I have the code:

ActionScript Code:
_root.gotoAndStop(3);
For some reason when I test the movie, the fade effect will not work, and the screen will just be blank. I have the
ActionScript Code:
stop();
Code on frame 2 but none on the other frames.

View 7 Replies

ActionScript 3.0 :: Reverse Timeline - Create A Button On New Scene After The Animation Has Finished

Jan 25, 2010

I have linked a button to another scene, in whic the second scene automatically plays some animation. I want to create a button on this new scene, after the animation has finished, which reverses the animation and then automatically goes back to the original scene. I have this code:

[Code]...

View 5 Replies

Play A Certain Number Of Frames Then Stop-from Anywhere On The Timeline

Jun 10, 2009

Okay, so I've got a happy little movie that shows an atom diagram. Every seven frames shows an electron popping up in the ring around the nucleus. This is all contained in a movie clip. I want a button that when pressed, tells the movie clip with the atom to advance the seven frames ( making an electron pop up ) and then stop. The same button if pressed again, will advance the movie clip an additional seven frames ( thus adding another electron ).

I've looked around quite a bit but haven't found a solution that will work for me. Also, I am working in AS2. (if you're feeling especially helpful, do you also know how to do the same but in reverse? I've found how to play movie clips in reverse, but not for a certain frame interval.)

View 1 Replies

ActionScript 3.0 :: Changing Stop Into Play Button After MP3 Finished Playing?

Sep 6, 2010

I have a simple Flash-player button (toggle play/stop) that plays MP3s. When I press play the MP3 starts and the button changes to stop. When I press again the music stops and the stop-button changes to play. I have several player-buttons on my page. How do I stop all sounds when I press play on one of the buttons? As of now, I can start several MP3 at the same time and I don't want that. I've tried this:
Code:
import flash.media.SoundMixer;
SoundMixer.stopAll();
But it doesn't work out. Do I need to number the players somehow?

Also, when the MP3 has finished playing it should turn into a play button. As of right now it's a stop-button when it's finished playing. How do I change it to a play-button? This is the Actionscript 3 code:
var flashVars=this.root.loaderInfo.parameters;
var loadSnd:URLRequest = new URLRequest(flashVars.myVar);
var thisSnd:Sound = new Sound();
var sndTrans: SoundChannel = new SoundChannel();
thisSnd.load(loadSnd);
[Code] .....

View 2 Replies

ActionScript 2.0 :: Timeline - Change The First Code To Go Ahead 24 Frames?

Nov 9, 2009

I have a movieclip in which I show pictures. Each picture was 1 frame long, so my button (mc) to go ahead to the next picture had the following script:

this.onRelease = function(){
_parent.nextFrame();
}

Now I've changed the timeline so that each picture is 24 frames long. By reading some posts I've found this code:

gotoAndStop(_currentframe+5);

Still I don't manage to go ahead 24 frames. Does anyone know how I can change the first code to go ahead 24 frames, or even better, to the next keyframe?

View 8 Replies

ActionScript 2.0 :: Command External SWF-file To Play Outside Of The Main Movieclip Via Button From Main?

Jan 17, 2012

I Have a flashmovie thats almost done and will soon hit the internet, but I want to add some animations into the website it�s two gears that I�m about to put at the bottom of the page and when a button releases in the main flashmovie the two bottom gears will turn a few frames and just stand still.These three movies are all separate (main movie, first gear and second gear).

It's a homepage designed in HTML and flash that has this "main flashmovie" in the middle of the screen, the size is about 1500(width)X800(height). And the gears is about 800wX200h placed at the left and right side bottom of the page. Dont worry the site is easy to apply to any screen resolution.I have been looking everywhere for any soul out there who suffering from the same problem but no success. Is it possible to script a button in the main movie to launch two separate movies in their own contents?

View 2 Replies

Play/Stop Flv From Main Timeline?

Sep 30, 2008

[URL]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?OR2. Is it possible to control the flv from the main timeline?

View 7 Replies

ActionScript 2.0 :: Calling A Function To Change Frames In A Mc On Root Timeline?

Sep 26, 2005

I have created a function on the root timeline, to be called at a certain point (when the character is on a certain frame and so is the certain item, he loses a life)the lives_mc advances frame by frame to show lives being lost.heres the function

Code:
function loseLife(){
if(_root.lives_mc._currentframe=1){
_root.lives_mc._currentframe=1[code].....

View 7 Replies

Play Frames And Change Scene AS3

May 24, 2010

i made a full site all based in flash and divided the pages in scenes

i need a button to do exact that. when u click the button it must play some frames and then go to other scene.

i can't tell to go to other scene in the last frame because there are a lot of scenes and buttons that have to do the same.

15 buttons - 15 scenes - play 30 frames and then change the button-scene!

View 7 Replies

ActionScript 2.0 :: GotoAndPlay() Not Working In Main Timeline?

Aug 12, 2009

I have a main timline with MCs in it. when the MC gets to the last frame, there's an onEnterFrame event telling the main timline to go back to frame 129 (labled "b1") and play.

I got the MovieClip(root).gotoAndPlay("b1"); part added to my function to call the root. however, when I test the movie, it does everything correct except play. it goes to b1 and stops. here's my as3:

code: this.addEventListener(Event.ENTER_FRAME,goBack);
function goBack(e:Event):void {
MovieClip(root).gotoAndPlay("b1");
}

why it won't play? I've tried using just the frame number and that won't help either. there's nothing else on the main timeline to stop the movie...

View 4 Replies

Actionscript 3.0 :: Stop() Not Working On The Main Timeline?

Sep 7, 2011

I am building a basic 6 page web site with each page labeled on the main timeline I have put the stop(); command on the very first frame of my timeline with the button commands below it - but when I test the movie - the whole clip just loops repeatedly - ignoring the stop

stop();
//main menu buttons
home_btn.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame);

[Code]....

View 1 Replies

Professional :: Play Movieclip On Main Timeline ?

Jan 7, 2010

I've created a movie clip with an animation on it's own timeline 30 frames long. When I press 'Enter' while inside the movieclip the animation plays ok.On the main timeline, I have one layer 30 frames long with the movieclip symbol placed on frame one. If I press 'Enter' the main timeline play head moves to frame 30 but the movieclip animation does not play on the stage. If I press 'Ctrl + Enter' or publish to swf then the animation plays ok but I can't setup the stage how I want it without the animation playing on the stage. Do I need to just change a viewing setting (tick box in preferences) or is this related to AS3 or new CS4 inner workings?

View 4 Replies

ActionScript 2.0 :: Possible For Main Timeline To Continue To Play?

Aug 30, 2004

After a swf movie loads, is it possible for the main timeline to continue to play? Right now if I don't put a stop action where I call in my loaed movie, my main time line plays while the called swf file loads, and the end animation is off then.

View 1 Replies

ActionScript 2.0 :: MC On The Main Timeline - Play Only When Roll Over

May 4, 2009

I have an MC on the main timeline. i want this mc to play only when i roll over so i have placed this code one the MC:

[Code]...

This works without a problem. When i rolover the MC it plays and thats all good however if the animation is half way through and i rollover again the MC restarts. I would like to add a condition statment that only allows the movie to play if its current frame is at 1 or only to play if it isnt currently playing. I appologise if i havent explained it too well.

View 2 Replies

ActionScript 2.0 :: Get The Main Timeline To Continue To Play?

Aug 30, 2004

After a swf movie loads, is it possible for the main timeline to continue to play? Right now if I don't put a stop action where I call in my loaed movie, my main time line plays while the called swf file loads, and the end animation is off then.

View 1 Replies

ActionScript 3.0 :: Play Frames And Change Scene?

May 22, 2010

i made a full site all based in flash and divided the pages in scenes

i need a button to do exact that. when u click the button it must play some frames and then go to other scene.

i can't tell to go to other scene in the last frame because there are a lot of scenes and buttons that have to do the same.

15 buttons - 15 scenes - play 30 frames and then change the button-scene!

View 1 Replies

ActionScript 2.0 :: Change Frame In Main Timeline?

Apr 2, 2011

I made an RPG, and I'm trying to make the movie itself go to the second/next frame. But whenever I try to do that, nothing happens at all. I tried _level0.gotoAndStop(2) and _root.gotoAndStop(2), both on a frame and on a movie clip.

It's suppose to initiate this function once a certain variable (_root.numbers) reaches 20, and I've tested if the variable does reach 20 by doing other things.

View 0 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved