ActionScript 2.0 :: Goto Certain Frame When Variable Hits 0
Jul 15, 2008
This doesn't work
if (lives <= 0) {
gotoAndStop(22);
}
When I change the "<=" to something like "!=" it does work. I'm trying to make it go to a certain frame when the variable hits 0
The website I am currently making is quite dark so before the user enters the website I want them to drag a slider until text onscreen is a suitable brightness then when they click enter to continue into the site I need the background mc to go to a frame relative to where the slider was.
I'm pretty new to AS3 but I want to get my buttons to play the same movie then go to their button function. i.e., Picture button > play movie (same as all buttons) > picture frame.
This is the code on my buttons ActionScript Code: stop(); import flash.display.MovieClip; import flash.events.MouseEvent; var currentButton:String; [Code] ..... Then at the end of the movie I tried using a variable to link the button to its frame
ActionScript Code: stop(); if (currentButton == name) { content.gotoAndStop("music"); } else if (currentButton == name) { content.gotoAndStop("book"); } else if (currentButton == name) { content.gotoAndStop("stereo"); } I know the scripts messed up but not sure I really get the variable thing as yet.
I'm trying to write an if then statement that will loop back to frame 1 once the next frame it hits is higher than 5. For some reason it doesn't work and I could easily go to frame six and add a go to and play but, I'd like to learn what's wrong instead of doing it the easy way.
i have a thank you message that shows after my form mailer is sent, then about 10 frames play for a short pause which shows the thank you message. how can i make the playhead goto a certain frame once it gets to the end of the timeline? i thought it would be related to onclipevent but i couldnt find anything relevant to what im wanting to do.
i have a thank you message that shows after my form mailer is sent, then about 10 frames play for a short pause which shows the thank you message. how can i make the playhead goto a certain frame once it gets to the end of the timeline?
Just finally making the transition from AS2 to AS3.All i need to do at this point is make two buttons which will control the movie to goto next frame and previous frame. I have gotten how to make the buttons go to a specified frame number and also a button to go to a specified external url but no success in making a simple next/previous pair of buttons.
i created a two layer in time line in one layer there is a movieclip called mc1. In the same layer in 15th frame i have another movie clip mc2. Inside the movieclip mc2 i created another movie clip at frame10 now if i clik the the mc1 on first frame The movie clip should goto and stop at tenth frame
I'm initiating my migration process from AS2 to AS3 .After reading A LOT of tutorials and, of course, pretty much everything that mister senocular wrote I finally got something going Well until this pickle[code]...
at first, I thought I could manage this myself searching the forums about "preloader" but none of the solutions seem to work. I think it has to do with the fact that I'm using the FLVPlayer with an external file. What am I looking for?
1. Well, the preload code for frame 1 that makes sure the external F4V (movie.f4v in the same dir) is loaded 100% before it jumps to frame 2 where the movie should start playing...
I have a movie clip that I want to be generated over and over again from the library at a random interval, and when the movie clip hits last frame I want it removed.Here is how I am generating it:
function Spawn():void { var Poof:Puff = new Puff; addChildAt (Poof,0)
I am using this code to communicate with an easing function:
[AS] onClipEvent (enterFrame) {_root.gek = false; for (var i = 0; i<18; i++) { if (_root.timeline["copy"+i].hitTest(_root._xmouse, _root._ymouse)) { //set gek variable to true when mouse hits timeline[code]....
if "gek" is true then the easing function works and my little "easebar" moves to the mouse.Now, I want to be able to capture what i is when the mouse moves over it so that I can load an mc depending on where the easebar is.I thought I could declare a global variable (_global.j = 0) at the root and then set i to j and use j somewhere else. But i doesn't exist outside of the onClipEvent.
would like flash to trace something when the play head goes over a frame label named "test" I would also like to have the code placed on the first key frame. I realize that the easiest way out would be to place the trace statement on the frame with the label on it but I'm trying to run this with a listener.
PHP Code: stage.addEventListener(Event.ENTER_FRAME, checkFrame,false,0,true); function checkFrame(event:Event):void
I'm trying to get in the habit of using AS in the first frame on the main timeline as much as possible. but sometimes i hit a snag. like getting a movie clip to change it's alpha when it hits a certain frame in an attached MC.
I am trying to get a html popup window to open when my movie hits a certain frame instead of a button. Im using the following code but it uses a button instead of a frame to open the popup.
on (release) { customize the window that gets opened 0 equals NO.[code]........
I have a scene where my movieclip loops between frame 1 and 2.In frame 3 there is a gotoAndPlay (1);.Is there a code that I can put in frame 1 where it tells to jump to frame 4 every 7:th second?
I have been using powerpoint all long for my presentations, but I'd like to move on with Flash. My question is therefore as follows: How do I use the arrow keys to go to the next frame and optionally, the left key to go to the previous frame?
Using CS5 and Code Snippets, how do I tell the Timeline that when it gets to a specific frame to go to another one? I want it to go back and play the first frame to create a looping effect.
I've got 3 buttons on a background and would like each to perform this:Rolllover=goto another frame to see graphic and stopRollout= go back to frame 1 and stopClick=goto URL
I'm making a game in which you have to pick up a key first with your character and then go to the door. When you hit the door, you should go to the next frame. Without the key, you can't pass the door. You should pick up the key with hitTestObject and go to the next frame with hitTestObject too.Here is my code:
So I have a custom flv player addapted from lee brimelows video basic tutesI want it to goto and stop on frame 2 in the main timeline when the flv has completed.Not got it cracked, so here is my code so far and the fla is attached.[code]
does anybody know the script for when i want a movieclip to goto and play a Random frame(not like: anyframe beetween 1 and 8, I mean: goto any of these Frames; 1, 4, 6, 9 ect...)