ActionScript 3.0 :: Go To Frame In The Main Timeline?
Aug 27, 2009How do you go to a frame in the main timeline?I tried stage.gotoAndStop(2); but that did not work.
View 4 RepliesHow do you go to a frame in the main timeline?I tried stage.gotoAndStop(2); but that did not work.
View 4 RepliesHow do I link a button thats embedded in frame 2 (music page timeline) to a frame in the main timeline ( frame 3= biography page)? Both pages are on the same scene with link buttons embedded in each page independent timeline.
View 1 RepliesI have 3 functions in my main document class that I want to execute when the main timeline reaches a particular frame number. how do I do that?
see the code and comments
public function mainClass()
{
//stage declaraction
stage.align = StageAlign.TOP_LEFT;
[Code]....
I simply want to assign a variable to the current frame of the main timeline (not movieclip timeline) I already know about _currentframe and it doesn't help in this case.
View 4 RepliesI am in the learning process. Working with FlashCS5 and AS3. if the issue appears to be too simple for you. Placed a movieclip(mcassessJohn) on the main timeline and moved to the frame labelled "johnFeedback" in the movieclip timeline using the following actionscript code.
[Code]...
I am trying to "gotoAndStop" on a frame in a nested timeline from the main timeline, but can't seem to figure out the correct way to write it with it's 'parents' etc... this is how I have tried which makes sense to me (have tried other ways too) but no success.
gotoAndStop(parent."framename");
So I have a frame labeled 'init' and a button called _exit. I want _exit on click to keep going back until it reaches 'init'
I'm guessing something like this but it doesn't work:
[AS]_exit.addEventListener(MouseEvent.CLICK , function(e:Event):void
{
if(currentFrame!='init'){
gotoAndPlay(currentFrame-1)
}
});
[/AS]
Whenever I hit the enter key, the main timeline goes to the next frame. I don't want this to happen -
View 1 RepliesHow do you retrieve the frame rate for the main timeline that was set when the SWF was created.
var fr = MovieClip(root).frameRate
...does not work for me.
I'm trying to go to the next frame in the main timeline from a class with no luck.
I have a movieclip called winner_mc that is created in the document class.
winner_mc is linked to the Winner class.
The Winner class creates a movieclip called nextlevel_mc which is linked to the Nextlevel class.
Then when I click on the nextlevel_mc movieclip I want to go to the next frame on the main timeline.
I tried this for the Nextlevel class:
package {
import flash.display.MovieClip;
import flash.events.MouseEvent;
public class Nextlevel extends MovieClip {
[Code]....
I just added a motion tween on the main timeline only to realize it doesn't run. Only frame 1 is executed, including its AS3 code. No I could not locate any stop() command within the AS3 code.
View 5 RepliesI 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.
What would be the best way to move onto the next frame (frame 2), when an animation has finished playing on the first frame in the main timeline, with no user input? The animation is on the first frame in the form of a nested movie clip.
View 2 RepliesI have an internal swf file play within a main swf file. At the end of the internal swf file timeline I want the timeline of the main swf to go to a certain frame and stop.
View 3 RepliesJust wondering if theres a quick way to check if there's another frame on the main timeline after the one you are currently on.. or just a command to tell me how many frames total in movie(and if therres a command for # of current frame, or ill just have to make a counter), rest i can do myself
View 2 RepliesI am working on a site that involves a dropdown gallery menu. I have placed four buttons inside the dropdown menu and it works only with the geturl function, but i want it to gotoAndPlay a particular frame outside of the movie clip. is that possible? Here is the link. TJ2 Studios
Im sorry if i am not clear. My actionscript is coming along very slowly. I created a dropdown menu inside a button. This button is supposed to gotoAndPlay frame 365 outside of the mc i created within that button, ie on the main timeline. But it does not work. However when put the script getURL it goes to the site i commanded.
Flash MX- I have an internal swf file play within a main swf file. At the end of the internal swf file timeline I want the timeline of the main swf to go to a certain frame and stop.
View 3 Replieschimera-studio.com/misery.fla Any ideas as to why this won't work?? It's such a simple concept...
I have this code on the middle frame of a movieclip in my main timeline. When the nav buttons are pressed they play an animation and report their names to a variable called "navigation" that's declared in the first frame of the main timeline.
[Code]...
I need to use, GoToAndStop(), from a Symbol, that is not on the Timeline, to change the current frame on the Timeline.
View 1 RepliesI have an external swf (is is an intro, nade in aftereffects)..and it loads in the main timeline of the site with a preloader. Everything is ok, but, when the intro in done plating. It stops and I want do see de site. I mean from the last frame of the external swf, I want to jump to the second frame of the main timeline.
Here is the script:
stop();
var req:URLRequest = new URLRequest("intro.swf");
var loader:Loader = new Loader();
function fileLoaded(event:Event):void{
addChild(loader);
[Code] .....
I want to find a way to get the number of the current frame of the main timeline using code in the timeline.
So like in frame 10 of the timeline I put in some actions. I want to make a variable that gets the number of the current frame so I can use it later.
Something like this:
ActionScript Code:
var framenum:uint = currentframe;
gotoAndStop(framenum + 3);
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 2 RepliesHow do I make the main timeline jump to frame 1 when the mouse moves out of the entire embedded swf?
View 1 Replies(put this in the first frame of your movie on the main timeline)
Code:
_root.createEmptyMovieClip("logo",100);
_root.createEmptyMovieClip("circle",99);
_root.createEmptyMovieClip("over",101);[code].....
im creating a character sheet and all i have to do is get the character to do a few things, im using Stan from american dad, so he draws his gun, salutes, and does this guns speech, only problem is. i can get him to salute by using the code
on(release){
gotoAndPlay("2");
}
this links fine, the salute is in a movieclip on frame 2 of the timeline, and the button is set to link to this.problem starts after the movieclip finishes playing, how to return to frame 1 on the main timeline, ive tried gotoAndStop("1") amongst other things (gotoAndStop ("Scene 1", 1)ive also tried frameLables too but that didnt work, though im not sure if i was doing that right to start with.Then im having a problem with my other buttons, even when set to on(release){gotoAndPlay("3");} they still go to frame 2 (with salute on)
I have two frames in the timeline of my flash file. On frame 1 there is a movie clip. How can I access this movie clip with code located in frame 2?
It doesn't matter whether the mc is already placed on the stage or is added dynamically from the Library - I just need to access the alpha property. I can provide a more detailed description of my file if needed.
I have a button that when pressed goes to the next frame of a external swf file loaded into a movie clip. When the last frame of the external swf is reached, I want the button to go to the next frame of the main timeline (which in turn loads another external swf and the process repeats itself over again).
I assume I have to use an if/then statement, but what exactly is the if clause?
I have a movieClip sitting on the first frame of my main timeline. When it gets to the last fram of the movieClip, I want it to go and play frame 2 of the main timeline. I have this code on the last frame of my movieClip:
[Code]....
It actually doesn't throw it just once, it keeps throwing it as long as my preview window is open. As if it just keeps hitting that frame repeatedly. Am I doing this correctly? Or is there a better way to do it in AS3?
I have a scrollPane on my stage, and I have a movieClip inside of it with a bunch of buttons. When you click on one of the buttons, I need it to gotoAndPlay a frame label on the main timeline. So far I cannot get this to work.
View 6 RepliesI have a UILoader on the main timeline, then I have to load an external mc with a ENTER_FRAME event in it. When I load something else, I found the ENTER_FRAME event is still working. Why doesn't it unload with the mc?
View 2 Replies