ActionScript 2.0 :: GotoAndPlay X-frame Of MC When Another MC Reaches Y-frame?
Apr 24, 2007how can I gotoAndPlay x-frame of MC when another MC reaches y-frame?
View 1 Replieshow can I gotoAndPlay x-frame of MC when another MC reaches y-frame?
View 1 RepliesWhen a variable reaches 0 gotoAndPlay frame 4
ActionScript Code:
//Variable Name: ammo
if(_root.ammo = 0;
_root.gotoAndPlay(4);
Doesn't work maybe?
I need to create a script that will jump to a certain frame in the scene when a movie cilp reaches its last frame. Putting a goto... within the MC itself doesn't work. I assume that I need to create a listener of some sort....I haven't been able to find what I need in any documentation (and I'm even been looking through AS dictionaries going back to Flash 4).
View 1 Replieshow do you do the following
A movieclip is playing...
When it reaches frame 20, it goes back and plays at frame 5. Then it keeps doing this. To me this is harder than it looks
I have a timeline that has some label frames at the very end of the timeline. During the timeline a user will hit a button on a frame and will jump to one of the label frames. On the label frame is another button that when clicked - returns the user to the previous frame. How do I make the movie return to frame 1 - without a button - but before it reaches the label frames? In other words, by simply reaching a certain frame in the movie, I want the timeline to go back to frame 1.
View 3 RepliesIn this bit of code is there anyway to adjust the gotoAndPlay Command to play from frame 114 to frame 200. Are there any commands that will do this. I want it to play from frame 114 to frame 200 when a button is pressed.
[Code]...
I'm having trouble with something that should be incredibly basic, yet i have no idea how to solve my problem.
[Code]...
it shows x as being 3 when you hit the button but it reverts back right away, so it looks like gotoAndPlay(2) is still playing frame
1. how do i stop it from reseting my variables?
I am making a website with a flash menu. I want it to gotoAndPlay a particular frame (frame A) when the cursor is on a button. When you roll the cursor off of the button I want it to gotoAndPlay a different frame (frame B). That part was easy enough. But here is the problem. If you click on the button I want it to continue playing frame A even when you roll off.
View 3 RepliesI am really confused about this issue ...
In the first Frame i wrote the following code:
stop();
var currentInterInfo:IntersectionInfo = null;
var currentInter:Intersection;
gotoAndPlay("Frame3");
[Code]....
When I run it, i get "Frame 2" in the output although i should get "Frame 3" as a result ... and When I debug, i get "Frame 3" ...
wondering if this is possible. I have a button and want it to play from let's say frame 10 to frame 15I'm starting with this:
on (release) {
//Movieclip GotoAndPlay Behavior
this.gotoAndPlay(10);
[code].......
I currently have 3 major sections in my Flash file, and need to be able to play the frames backwards, within each segment, if the user so chooses to click the back button.Let's say it's on Frame 250 (or any other spot on the respective timeline for each section) and the user clicks the back button, I want to be able to "gotoAnyPlay" Frame 225 to Frame 220.So, jump from current Frame 250, start playing on Frame 225, play to 220, and then stop.
View 4 Repliesdoes anyone knows any way to code xml preloader? i need the XML preloader in the same frame.....not in two frmaes or with out using gotoAndPlay(); to next frame...
View 3 RepliesI have been playing with this idea for a few hours and now I'm completely miserable,I have two movieclips, mc1 & mc2. mc1 is palying a simple animation.I want to write a script so that when you rollover mc2, it checks mc1's frame number. if mc1's frame number is for example "10", it should play its own animation. otherwise is should wait until mc1 reaches frame "10" then play mc2 animation.
View 1 RepliesI have a movie clip on stage which length is 600 frames. I put a actionscript 3 code "stop();)" at the end of movie. it stops when it reaches to 600 frames but it disappears from the stage as well. Which I don't want. It should stop animating but stay with last fram which has a welcome message.
View 1 Repliesi want to code something like this:
Code:
if(mc played three times to the last frame){
addChild(mc2);
}
I am currently working on a project that has a movie clip, in Scene 1. I would like this movieclip to be able to play from this scene and go to Scene 2 (next scene) when it reaches the last frame of it. I use CS4 & AS3.
View 6 RepliesI have a movieClip called "button" I want the movieClip "button" to disappear once the animation reaches frame 16 within a movieclip called movie1_mc. The issue I'm having is that I cannot get the movieClip "button" to disappear. There is external XML content being feed into that movieClip so I'm not sure if that's whats screwing this up.
View 5 RepliesI am trying to achieve a "Knight Rider" KITT animation where the rectangle slides back and forth between the edges of the frame.The problem is I can only get the rectangle to move in one direction and then it back-steps and keeps moving in that same direction right off screen.How do I get the toggling effect?[code]
View 5 RepliesWhen the timeline reaches a certain frame, I want an swf to load into a movieclip in that particular frame. I need this to occur on level 1 as the root of the site is pre loader.
View 1 RepliesI have this custom video player I'm making. I need some way to react when the externally played flv file reaches a certain point in the movie without embedding some extra data on the flv file. I am looking for this because I want to react at the 90%-99% point of the movie because I didn't like the behavior I'm getting when I react when the stream completes playing (I want a bit earlier). How do I achieve this?
I'm surprised Adobe didn't document what is the object structure passed on things like onMetaData and onCuePoint...
I have a menu with 4 movieclip buttons (movieclips that act as buttons) that when pressed make the timeline jump to a certain frame. The mc buttons have both "onrollover" and "selected" states. However the timeline also moves on its own, even if no button is pressed.
I need the buttons to assume the "selected" state when the timeline reaches a specific frame (as if the button had been pressed to make the timeline jump there). But I can't figure out how to do it althought I think it must be quite simple.
This is the code I'm using (controls the buttons and its on the first frame of the main timeline)
------------------------------------------------------------------------
// create an array of all nav buttons in group
var groupinfo:Array = [birds, bears, bats, bunnies];
// create constants to define start and stop of fadein and fadeout sequences
// (fadeout should be exactly the same sequence as fadein, in reverse frame order)
[Code].....
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
[Code]...
I'm trying to think of an AddEventListener...When a timeline animation is playing, and it reaches a certain frame, in which the event listener would listen for.
View 1 Replieshen you click on a button within my swf it loads an external swf into an MC that sits on top of the 1st swf, which continues to play underneath.Within swf2 I have lots of pages that you can navigate to, which works fine on its own, but not when I try to play it through swf1.When I click on any of the navigation buttons they don't work.I've tried making an MC within swf2, putting all the pages in there and on the navigation buttons doing:
on(release){
_root.swf2MC.gotoAndPlay("frame");
}
[code]....
I've got a simple button that when clicked needs to go to a particular frame and stop when it hits the stop(); however when I test it I get a type error #1009 Cannot access a property or method of a null object reference. at PostCard_fla::MainTimeline/frame25()
I need to be able to tell it what frames to go to manually so the user can jump around the time line using short animated transitions between pages (set up like a web page) in AC2.0 this was easy, but its different in AC3 and I'm not quite sure what I'm doing wrong.
This is my code:
stop();
btn_flip.addEventListener(MouseEvent.CLICK, buttonClick);
function buttonClick(event:MouseEvent):void{
gotoAndPlay(28);
};
I am using Flash CS3 with AS2 to write code that will fade images in and out, looping from the last frame back to frame 20. Loading the images with XML is working, as is the fading in and out. Unfortunately, when it reaches frame 390 it loops back to frame 1 instead of frame 20.In frame 390 I tried using gotoAndPlay(20) to code the loop. Then I tried using _root.gotoAndPlay(20); but this did not work either. I am not sure why it is playing frame 1 instead of 20.
View 3 RepliesQuick way to write the following code please (i know it's simple - i just don't know how)
if (images.currentFrame == 24 || images.currentFrame == 25 || images.currentFrame == 26|| images.currentFrame == 27|| images.currentFrame == 28|| images.currentFrame == 29)
{[code]....
basically; if the MC frame number is between 24 and 29 (greater than 24 but less than 29) i want it to gotoandplay from a different frame.
I have a flash file that the action scripts doesn�t appear to work. It is regarding a form turned into a movie clip. I copied the action script and format from a tutorial from this web site (Kirupa Flash_php_email.fla). It�s a fairly easy tutorial, but I can�t get it to work. Essentially, after the user fills out the name, email, and message fields, he clicks on the send button. I�m trying to copy the same concept into my fla file. The send button loads the variables and sends an email out to the user. I�ve been able to get that portion to work with the email.php file. It will return an email to the user, but the movie just seems to pause and not advance to the next frame. The data the user inputs remains on the screen. I�m not sure if a stop command is preventing it from moving to the next frame or not. What I can�t get the done is to go to the next frame where the user is told �Thank You� and clicks on the Continue button.
I have an action script layer and on frame 118 it has the stop(); command I have a layer called �txt�. On frame 118, all the input text fields named, name, email, and message have been grouped together then converted to a movie clip called form. On that same layer, on frame 119 I have labled those group of frames �ThankYou�, which also displays the Thank You and a Continue button.
Here is the actionscript on frame 118 for the movie clip �form�
[original script from tutorial]
onClipEvent(data){
//show the welcome screen
_root.nextFrame();
}
[code].....
I have a created a menu and the pages are on a seperate swf file which is to be loaded onto the top of.
firstly i used this code but it still only went to frame 1 of the laoded movie:
on (release) {
loadMovie("a2.swf", 1);
_level1.gotoAndStop(15);
}
then i found this code. But i cant get it to work correctly. does it go on frame one of the movie or on the button instance?
[Code]...
I've got a timeline and four buttons which each gotoandplay from the first frame on the same timeline. But I want each button to Stop() at different frames on the same timeline. So is it possible to do a GotoAndPlay ... And Stop function on a button in flash?
View 3 Replies