ActionScript 2.0 :: [Flash8] Assign A Variable To The Current Frame Of The Main Timeline (not Movieclip Timeline)?
Mar 16, 2007
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 Replies
Similar Posts:
Apr 26, 2011
I 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]...
View 1 Replies
Jun 12, 2011
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);
View 1 Replies
Feb 20, 2006
I got one movieclip with several buttons and another movieclip where i use: this.loadMovie("news1.swf"); What Id like to do is, if its possible, to do, on the main timeline, assign, to the buttons what news.swf to load into the other movieclip where i load it. So i can assign one button to load news1.swf and another load news2.swf.
View 5 Replies
Nov 22, 2011
How 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 Replies
Feb 2, 2010
I cannot seem to find anything of what I need from google.(Well, I can find the reverse method to what i need ) Basically I wish to access a variable declared in the Root Timeline from my Movie clips timeline.
[Code]...
View 2 Replies
Mar 5, 2010
chimera-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]...
View 1 Replies
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 2 Replies
May 21, 2009
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.
View 3 Replies
Aug 25, 2010
I declared a variable & it's value in the main timeline. Then I created a movieclip and have some actionscript inside that movieclip. Is it possible to read the varialbe's value within the movieclip?
Let's say I have this variable in root timeline var myVar:Number = 100; and I want to read myVar's value within a movieclip like following trace(root.myVar);
View 3 Replies
Apr 19, 2011
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?
View 5 Replies
Feb 5, 2010
In AS2 I need code for a button, on the main timeline, to go to a frame in a mc off the main time line. I have attached a picture of the time lines in case I have not articulated my needs well.
View 5 Replies
Apr 6, 2010
The situation is as follows:I'm using Action Script 2.0 --- I'm obligated to in the course I'm attending.I have a main timeline that has 3 frames. On the 2nd frame I have a movieclip named mc_nbr. On the 3rd frame I have a button "voltar" that when pressed I want it to "Go and Stop/Play" at frame 3 of the movieclip (that is embedded on frame 2 of the main timeline).
I used the folowing code for the button btn_voltar:
on (press)
{
[code]......
View 2 Replies
Apr 9, 2009
I make a website. First I have a frame with a movieclip, where my entire page is within.Inside of that is where all of my pages is in different frames, and in each of these frames there are other movieclips with content. My example:Top level /Entire site/My pages, in different frames /Movies/Pictures/About/Etc./Content (inside the "Movies") /Info about movies/Movie one/Movie two/Etc./My problem is as easy as this: I will link from the "My pages" level, to the first frame in "Content" (info about movies)If i just link to the, "Movies" frame, I can't get from "Movie One" to Info about movies by pressing the button, wich lies on the "My pages" Level.
View 4 Replies
Jan 9, 2009
My script have a list of .swf files and needs to play them one by one. My problem is that i can't detect when the movieclip (containing the swf) completes playing.
I understood that i need to copmare between _currentframe and _totalframes of the moviecip but i keep getting 1 as the _currentframe (my main timeline contains only 1 frame).
Code:
var mcLoader:MovieClipLoader = new MovieClipLoader();
var loadListener:Object = new Object();
var container:MovieClip =
[Code]....
View 4 Replies
Feb 11, 2010
I'm converting an old AS2 file into AS3 (and trying to learn AS3 at the same time).A movie clip contains a number of different animated sequences and buttons within the application trigger these different sequences.The buttons are functional only when an animation has completed playing.
In AS2, I achieved this with a var called _root.animating which was initially set to "false" and switched to true when the animation played and switched back to false at the end of the anim sequence. The buttons checked this var when clicked. Here is some of the AS2.[code]...
View 2 Replies
May 18, 2005
I have abutton that makes a movieclip in the main timeline go to the prevous frame... but it doeasn't work.
on(release){
_root.pregunticas.gotoAndStop(prevFrame);
}
View 3 Replies
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
May 11, 2011
ive made a simple game for a uni project, when you get game over a movieclip comes up and inside the movie clip there is a button to restart the game. how to i code the button inside the movieclip to gotoAndPlay to frame 1 on the main timeline?
[Code]...
View 4 Replies
May 4, 2010
i want to make the current page of a website, fade out, using the Transition Manager.
Best i can come up with is
Code:
TransitionManager.start(VARIABLEtoCurrentMovielip, {type:Fade, direction:Transition.OUT, duration:1, easing:Strong.easeOut});
and obviously before that, have it declare the variable, something like
Code:
if { current position = "home"
VARIABLEtoCurrentMovielip = "home_mc"
}
i just have no idea on the syntax. how do i access the current frame, namely the label? (ie how we have a layer that goes "Home" "About" etc) and then take that varaible and drop it in the transition manager string?
View 1 Replies
Aug 9, 2010
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");
View 3 Replies
Jan 6, 2009
I created an empty MC on the main timeline:
var ribbonMC:MovieClip = new MovieClip();
addChild(ribbonMC);
On the main timeline I have another MC which loads a DataGrid mcomponent.I have a ListEvent.ITEM_CLICK attached the DataGrid.When a row is clicked, I want to replace the ribbonMC clip I created with a different MC.However, no matter what I do I cannot seem to
properly remove the clip and add it to the main timeline in its place.I have tried getChildByName() in order to grab the clip:
var rmc:DisplayObject = getChildByName("ribbonMC"); (I've
tried type MovieClip here too)
But all I seem to get is a null object, so it cannot be unloaded. Even if I did grab it, I cannot seem to figure out how to add my new MC to the main timeline from inside the current movie clip in any event. Since _root is no longer used in AS3.
View 10 Replies
Feb 23, 2010
For the life of me I can't figure out how to trace out the current label in my movie's main timeline. This is in AS3. I have a button on stage that spans the timeline of the movie. It detects keypresses. I want to trace the current frame label that the play head is on.
[Code].....
I get "_level0" for this...and undefined for the rest. What am I doing wrong here?
View 1 Replies
Oct 16, 2009
I 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]....
View 5 Replies
Sep 1, 2010
So im creating a site for a friend and I have placed the menu inside a movieclip so the buttons are inside the movieclip. This the script i have tried :
Code:
stop();
natural1.onRelease = function () {
[code].....
View 1 Replies
Feb 8, 2010
I have 2 movie clips, one being loaded into a container MC via "loadMovie();"In the main movie there is a variable with no value, in the external movie there are 5 frames, each with a value to update the variable in the main movie.
IE: if on frame 1, global value = 1 / if on frame 2, global value = 2 / etc etc I'm familiar with passing variables INTO an external swf, but am stumped on how to do it the reverse way.
View 1 Replies
Apr 17, 2009
I'm trying to add a value to a variable inside the Main .SWF from a loaded movie. More clearly,My main movie name is Main.swf. On the main timeline of Main.Swf, I have a variable named currentMovie.Now, I have other movies that are loaded into Main.swf. For example, cars.swf is loaded into Main.swf.What I want to do is have code in cars.swf to add a value to the currentMovie variable in the Main.swf. I just need the correct syntax.
for example,:
MovieClip(parent.parent).currentMovie="some_value" ; is not working for me...
View 3 Replies
Jun 10, 2009
why the timeline inside these movie clips and the timeline on the main scene have to correspond to work. [URL]
View 1 Replies
Apr 22, 2009
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]
View 1 Replies
Aug 27, 2009
How do you go to a frame in the main timeline?I tried stage.gotoAndStop(2); but that did not work.
View 4 Replies