ActionScript 2.0 :: Action To See Where The Root Time Line Is?
Oct 29, 2003
When a button is presed on a child time line I would like to check the play head position on the root time line before it executes the action attached to the button. I think that maybe this is done with a function, but I am not sure.
I have a label on my root timeline called "services". I have a services button inside a movie clip. How do I access the main time line to send it over to the page services? I'm using actionscript 3. Back in the day it would have been as simple as root.gotoandplay("services")
My issue is that for my website I want there to be movies in between the interactive parts of it where the interfaces slide in and out. However, I can't stop a movie from playing over and over instead of playing once and going to the next frame.With 2.0 I haven't been able to find any research that helps me, probably because I don't know the correct keywords to search for.Right now I have my main time line set up with a loading bar on frames 1 & 2, that then jumps to frame 3 where I have embedded a movie (Instance named: mc_start) of the interface sliding in. Preferably after that I need it to jump to frame 4 where the actual interface is.
I can get the movie to end by going into the embedded movie's time line and simply have stop() ; at the final frame, but I can't get it to go to frame 4 on the main time line. If I having something like gotoAndPlay(4) ; on the final frame of the embedded movie's time line, it simply goes to frame 4 of the embedded time line and not frame 4 of the main time line. If there was a command to make it jump back to the main time line instead of the embedded time line, that would work perfectly.Coding on Frame 3 of the main time line to jump to Frame 4 would work if I knew the correct language to detect when the movie has ended (Movie is 191 frames long), so that afterwards it would immediately jump to Frame 4, but I haven't been able to find any resources that will teach me how to do it. Right now having gotoAndPlay(4) ; on Frame 3 of the main time line obviously makes it immediately skip the movie on Frame 3 and jump to Frame 4.
What I have is a movieclip and a button in scene 1 (which is the main timeline).There is an actionscript layer also on the main timeline. what I want to do is when I click the button, it would do a nextFrame(); in the movieclip timeline instead of the main timeline.
here is the fla file - [URL] I have an attached movie on root level that movie has a button inside it and I want to tell that button to do some function. simple----BUT I want to put the action on the first frame on the root and not inside th MC. here is the code Iam working on and the same is in the fla file in the above link.
[Code]...
explanation of the above code-- but1 is the button on root that tells clip1 to attach on blank MC(thats also on root) clip1 has the button inside it call but2 and tried to tell that bloody but2 to open that the URL link but its not doing so NOTE - I want to put all the action on the action on the first frame and not inside th MC.
I have a time line of 1441 frames my frameRate is 24 fps so it takes 1 minute exactly to complete the timeline animation I want to Display the Remaining time as file starts I need formula to place in ENTER_FRAME event which displays the time left
I have a time line of 1441 framesmy frameRate is 24 fpsso it takes 1 minute exactly to complete the timeline animationI want to Display the Remaining time as file startsI need formula to place in ENTER_FRAME event which displays the time left
i want to duplicate a line 4 times, and move each line on Yaxis, with a delay of 1sec each time. I know i must use setinterval+duplicateMovieClip, but i've got pbs :-( actually, i've got my AS code on my line :
how to make some action happens after some time ?I mean... imagine I have a ball moving randomly through the stage.... I want that... the ball stays on it's place for some time... then move to somehwere else.... stay there a while.... en repeat.
On my first frame, I've placed an MC with an instance name of "ball" and entered the following script: ActionScript Code: ball.onEnterFrame = function() { if (Key.isDown(Key.LEFT)) { this._x -= 10; }} How do I create a time delay between the key being pressed and the ball changing position?
i know what is wrong with this function? This is a function which I use to trigger an action with different time duration. When I call this function it just wont work.
What I have are a series of panels in one movie clip defined by one button on a seperate layer. The script on the button is this:[code]When you press on a panel, it scale increases, and when you press it again it decreases. What I want to do is make it so that only one panel at a time can do this, that is, when one panel is pressed and scaled, none of the other panels will be able to until that panel is pressed and scaled back.
My file has four hexagons that normally get bigger or smaller in response to MOUSE_OVER and MOUSE_OUT behavior. Trouble is, when the file opens, I need one of them to expand independent of any user interaction, just the once, and reduce size whenever anything _else_ is moused over, just the once. Then the whole thing can go back to normal.
I'm trying to look through code examples, but I'm getting lost in people talking about packages and custom events and so forth that I don't understand (remember: designer here!). Can someone at least help me break down the concept?
This is what I have, which probably isn't the most succinct thing on earth but works for the mouseovers and for stacking the items properly, since they overlap a bit (the playHexIn and Outs just go to tweens iin the timelines of each hexagon, making them bigger or smaller):
Code: var maxIndex:Number = this.numChildren - 1; hex1.addEventListener(MouseEvent.MOUSE_OVER,sendToTop); hex2.addEventListener(MouseEvent.MOUSE_OVER,sendToTop);[code]....
What I have are a series of panels in one movie clip defined by one button on a seperate layer. The script on the button is this:
[Code]...
This clip is in another movie clip that has the script for the panel's scaling when they are pressed, which is this:
[Code]...
When you press on a panel, it scale increases, and when you press it again it decreases. What I want to do is make it so that only one panel at a time can do this, that is, when one panel is pressed and scaled, none of the other panels will be able to until that panel is pressed and scaled back.
I want to run a sound once in a timeline but want the sound to stop at the end of the first run on the timeline but want the timeline to continue to repeat without the sound running again.
What I mean is, can I add a sound that will only play if there are enough frames for the sound?I want to only play on the frames that it is on, but it plays all the way through the sound file regardless of the amount of frames.
I am wanting to control the timeline of a MC using AS. What I mean is when I click on a movie click and drag right it controls the reverses the MC and when I go left it plays it (but i only want this to happen when I click and drag).
I have learned from a video tutorial (Flash CS5 in the Family 23: Banner Ad Part 1)to use the F5 key to set the length of a time line of a particular image.When using the F5 key on the MAC keyboard, it will only allow for the audio to be worked with.I've tried Apple+F5, Option+F5, Ctrl+F5 etc.What am I missing?
I am building a Flash continuous play application for a company to use in a booth presentation at a sales show. In effect, it will be a more engaging Powerpoint presentation. Each slide will be a be a frame that will call an external swf into movie clip with the animation of text or fade in images in the external swf. Each external swf will stay on for about 10 seconds. I am looking for an action script that will first stop the advancement at each frame for 10 seconds (ability to edit seconds needed) and then move to the next frame and stop for 10 seconds then the next and so on and so on and at the end, start back at frame 1.
I am making a small project and i want to know how to get flash to change from one time line to the next , i am thinking of using an if statement to check if an object had passed the top of the stage and if that condition is true then i want it to go to the next layer on a different frame to play another animation?