ActionScript 2.0 :: Navigating To Frame Label
Jun 21, 2008I am having trouble with the last part of the function were gotoAndStop ('sec' + myNum); needs to go to frame label sec1,sec2,sec3 etc.
[Code]....
I am having trouble with the last part of the function were gotoAndStop ('sec' + myNum); needs to go to frame label sec1,sec2,sec3 etc.
[Code]....
i have a couple buttons that i want to move the timeline to previous or next Frame Label. i have tried one way that didn't work and i see there is an array that i could use for Frame Labels but i don't know how to work with it to get what i want.here is the class that i made, it currently has the initial try which dind't work and just the basic array set up:[code]btw, the traced array returns (and in the final version, no frame labels will be right next to each other on frames):[code]
View 9 RepliesIs it possible to change a frame label within a gotoAndStop('label') with the parameters in a function?I'm playing around with updating code as I learn more and more techniques, and at the moment the code is a basic click-a-button to select the object shape, and on press the button disappears:
// Change the object into a circle.
circle_btn.addEventListener(MouseEvent.CLICK,function(){changeShape_fun(circle_btn,circle);});
// Change the object into a square.
square_btn.addEventListener(MouseEvent.CLICK,function(){changeShape_fun(square_btn,square);});
[code]....
However I can't/don't seem to know how to change a frame label through function parameters, or if what I'm trying to do is even possible.Also to note, while I'm all ears for any more efficient ways of doing what I'm trying to do, I would still like to know how/if you can change frame labels through function parmeters.
I have a back button that should take you back from the first frame of one url to the last frame of another. However I can't figure out how to do this. It always brings you to the beginning.
tried this:
on (release) {
getURL("about :history.back(-1)");
}
but this won't always work because they can get there from a menu so the last thing in the history will be that menu instead of the last page of the section before.
tried this:
if(back == "true"){
gotoAndPlay(27);
}
as the variable that is checked at the start of my movie to see if it was opened from another movie
and:
on(release) {
getURL("introduction2.html?back=true", "_self");
stopAllSounds();
}
and this on the back button from the other movie
basically i just need to figure out a way to navigate to a specific frame in a different url.
1. I have a swf contains a FLV paly back component playing a movie .I have used flash cs4 import movie tool to create it. Name of the files are >movie1.swf movie2.swf
2. In the main movie I have a movie clip which loads the movie1.swf and it start playing .Now user can move from move1 to movie2 by clicking a button
However when I click to view second movie sound of the first movie is still playing .Even if I click to go back to movie1 another sound will be playing and a big mess.[code]...
Basically I have a flash website built on different frames of the timeline, the simplest way I think.Some of these frames have movie clips embedded into them using the flv playback component class.The problem I have is the following, the site works fine and videos play fine, but whenever I navigate offa part of the website to another, from a frame to another - the sound of the clips that were playing keepsplaying on the background and never stop and it keeps building up every time I navigate of.f each page.I want to remark that I believe is not only the sound that keeps playing "invisible" but the whole clip butThis is the AS code for my buttons on an example frame, would you be so kind to tell me what I should add or change
stop();cvbtn15.addEventListener(MouseEvent.CLICK,onClick25);function onClick25(event:MouseEvent){ gotoAndStop(27);}showbtn15.addEventListener(MouseEvent.CLICK,onClick26);function
[code].....
Since my project uses class actionscript files my whole game project runs on one frame and nothing is on the maintimeline so there is only just one frame on the timeline. Just wondering how I could make it so that I could have the first frame with game instructions and a description which then goes into the game being second frame and when gameover goes to third frame using actionscript. or any tutorials or some peice of advice
View 3 Repliesis there an action script code that enables the timeline to automatically enter a frame label on entering a certain frame.
View 1 RepliesI'm trying to get this function to target myClip_mc and movethe frame head to another frame label.
var counter:Number = 1;
//textBeGone
invisible_btn.onRelease = function(){
counter++;
if(counter % 2 = true) {
[code].....
is it possible automatically name frame label with instance name of item in frame.
View 2 Replies1. I make a simple movie (call it movieClip) first frame has stop(); action, second frame has label playMovie, last frame has action gotoAndPlay(2); (so that movie not stop anymore2. Now I place movieClip on stage3. Question... what is code to make movieClip play frame label playMovie?
I already try to put many different type action in frame one of stage
this.movieClip.gotoAndPlay("2"); //NOT WORK
this.movieClip.gotoAndPlay(2); //NOT WORK
[code].....
Yesterday Kglad gave me the following :
nextTX.onRelease = function (){var nextFrameLabelNum:Number = (1+Math.round(thTX._currentframe/27))%10;
thTX.gotoAndPlay("next "+nextFrameLabelNum);
}[code].....
which works great IF I am moving one image at a time.What I have done now is tween 3 slides to move into a visible mask by pressing next, but when I press previous of course the above doesn't work.It just jumps to the previous three with no tween.I would like to maintain the tween but in reverse.I would like the previous just to undo, in reverse, what the next button just did with the tween?Is there anyway to make this happen with as 2.0?
if its possible, via AS3, to create a frame label in a movieclip on a specific frame.
Obviously I can do it by manually by setting up labels on the timeline within the target movieclip, but I would rather use an array so I can loop through it, creating a label name on a the specific frame each time?
so for example I would end up with:
myLabelOne on frame 10
myLabelTwo on frame 25
myLabelThree on frame 115
etc
I am trying to use this if statement with a frame label instead of a frame number. I believe that _currentframe is looking for a number only. Is there a different command that looks at frame labels instead of frame numbers?
View 1 Repliesis it possible to find the frame number of frame label with AS if a button is rolled over, the timeline jumps to a label - which plays a set of 3D rendered frames to 'raise' and element, once a user rolls out of the 'button' area the button is meant to 'lower' - which can be done by simply playing backwards to the previous label.
View 5 RepliesI am trying to use this if statement with a frame label instead of a frame number. I believe that _currentframe is looking for a number only. Is there a different command that looks at frame labels instead of frame numbers?
View 1 RepliesIs there a simple way to get the frame number of a frame label?
View 2 RepliesI am loading a swf into an empty MC with this code:
on(release) {
loadMovie("movie.swf", _root.container);
}
what I want to do is also go to a specific frame or frame label in that loaded movie. I thought I could do it by adding something like this:
_root.containter.gotoAndPlay("frame");
Is there a way to get the frame label on a specific frame, without it being the current frame?
I've tried accessing it through:
this.scenes[0].labels but it doesn't allow me to check a specific point on the timeline.
Trying to go to a frame label - 1 frame -
[Code]...
Does anyone know why if I use
on (press) {
_parent._parent.gotoAndPlay(19);
}[code]....
it will work? My labeled frame is two parent mc's previous and it doesnt work when I call to it with the label?I would really like to use the label so if I move my keyframes around I dont have to change a lot of code.....
I'm making a VERY basic Jeopardy game, and I need buttons to be disabled after being clicked on once.
Oh, and I'm working in CS3, but I'm using AS 1&2 because that's what I learned... I have no idea how to use AS 3...
example: frame 1 has btn11 in it. btn11 when clicked takes the person to frame 2. when done with frame 2, they click on return.
the return button (btnReturn1) has the following AS
on (release) {
gotoAndStop ("Round1",1)
btn11.enabled=false;
}
the problem is that it works at first - the button disables when I get back to frame 1, but the next time I click a different button then return to frame 1, the first button I disabled isn't disabled anymore.
my actionscript so that my disabled buttons stay that way no matter how many times I come and go from the frame? or if you have a better way to do it, that'd be great. basically, it's like the jeopardy screen, and after "songs" for 200 is clicked, I don't want it to be clickable again at all.
I attached the code here. The problem is after importing the video in the first frame while navigating the video sound is heard which means the video is still playing. How can I stop it when moving to other section. Here is code
[Code]...
I have three buttons, btn_1,btn_2,btn_3, and two movie clips, image_1,image_2. The names listed btn_1,btn_2,btn_3, image_1,image_2. are all instance names. All buttons and movie clips are on their own layer in a single frame on the main time line. the movie clips have a stop action on the first and last frame, with a frame label, on the first frame in the sub time line. For image_1 the frame label is image_1_1 and for image_2 the frame label is image_2_1.
I would like btn_1 and btn_2 to control the movie clips, image_1,image_2. Either button should be able to close the other buttons movie clip and play it's own movie clip. Also i am trying to make the movie clips themselves have the ability to be closed by clicking on the movie clip image area that is playing. Both movie clips when not playing hide behind the appropriate button with an alfa of 0.
When playing they expand to the middle of the window and are at 100% alfa, using a tween. The third button, btn_3 should only be visible when one or the other movie clisp are playing. btn_3 dose nothing else but this for now. As of now, my movies continuously loop and btn_3 is always visible. I can't seem to figure this out. my code for this action is:
[Code]...
I have navigation buttons that are linked to frame labels on other scenes and when you double click them they go to the next scene.
For example if i was to click the home button twice it would go to the info scene and if i click it a third time it will go to another scene.
This is the actionscript im using:
What do i need to add or do to fix this
I have a tic-tac-toe game. Where the user would which spot they would want to put their X or O in and then they would go to a random question. That's where my problem starts. How do I get it to go to a random question?[code]This is what I tried using. It works, but it only goes to QuestionOne. I tried putting a comma to seperate the labels, but that just makes it play the whole movie.
View 2 RepliesFollowing the common rules, I'd like to put all my as2 code in the first frame of a layer named "code". Then this question occurred: how to implement that "taking some actions when a specified frame(best using "frame label" not "frame index number") entered" in the "code frame" using as2. what i can call to mind is listen the enter frame message of the current MC, but how can i check if the current entered frame is the specified frame?
View 7 RepliesIam create small Animation in 10 frames. 1st frame lable name is "start" , last frame label name is "end". Button on click how to get current frame label name.
View 3 RepliesHow do I get the label name of the current frame the flash playhead is on?
View 3 RepliesThe following XML code I am using works fine for going to a URL. However, I want it to go to a frame label in my Flash file instead.
ActionScript Code:
<?xml version="1.0" encoding="utf-8" ?>
<data
colorOver="0x333333"
colorOut="0x000000"
[code]....