ActionScript 3.0 :: Way To Set GotoAndStop
Nov 4, 2009How to set gotoAndStop on 10 frame of my main stage ?
View 5 RepliesHow to set gotoAndStop on 10 frame of my main stage ?
View 5 RepliesI have a movie clip on the stage and have given it the instance name "team1". inside this movie clip there are two states. at frame1 it says one thing, then at frame 10 has an image. team1 stops at frame 1 and what i want to do is when the main time line reaches say frame 50, i want the team1 movie clip to gotoAndStop at frame 10, thus showing the image and not the text. i tried doing it by putting this on the main timeline at frame 50: team1.gotoAndStop("team");
View 2 RepliesI have a mc that I use as a stop/play button for music. One the main stage there are 3 of these buttons for 3 different songs. One frame one of each MC there is a triangle for play with this code:
stop();
btn_play.onRelease = function (){
stopAllSounds();
gotoAndPlay(2);
}
Then on frame 2 there is a square for stop with this code:
stop();
btn_stop.onRelease = function (){
gotoAndStop(1);
stopAllSounds();
}
It works fine as far as stopping and playing. The stopAllSounds is to prevent the music from overlapping in case the user didn't press stop before playing a different song.If the user presses play to hear a song then wants to hear another song so he decides to click play on a different song without first clicking the stop button there a problem.The problem is that he is still stopped on frame 2 of the first song therefor the square is still visible. In this case in order to hear the first song again he would have to double click.
Is there any way, from the main timeline, I can tell it onRelease of a specific button within a specific buttion to make a different mc to got frame 1?
I've got a strange thing in attached fla: my gotoAndStop command won't go past a photo?First I've got the 'background' layer. On it is a red rectangle on frame 1 and 2. Frame 3 changes it into a jpg.
On the actions layer I've got a gotoAndStop(4), which should show the photo and trace a command. But it won't get past the red square? It's like the jpg photo blocks the gotoandStop(or Play for that matter) command. It doesn't trace to prove that the gotoAndStop command is executed on frame 4 and it keeps showing the red square on frame 1 and 2. Where it should show the photo which has already been placed on frame 3. when I replace the photo with a normal Flash shape (rectangle e.g.) it works fine.
Well basically I've got this one frame in my animation. It's got three buttons and an input text box. One of the buttons goes with the text box, but I want the enter key to do the same thing (gotoAndStop) as the button. Unfortunately I've not a clue how.
View 2 RepliesI'm creating an input that can have multiple passwords,you type in a pass, and depending on the pass it brings you to a certain frame.
Actionscript Code:
stop();trigger.onRelease = function() { if ( input = "1234" ) { gotoAndStop(2); if ( input = "1111" ) { gotoAndStop(3); }}
[code]....
im very new to AS3 and im not sure what i am doing wrong. i have a made adrag and drop situation where someone is cooking a steak. the pan has the instance name of triangle_mc and and the food has an instance name of triangle_mc the script below works fine.
[CODE]....
But I have ran into another snag. This is what I currently have: A MovieClip for the quiz. 10 more MovieClips one for each question. 2 buttons inside question (btnCheck and btnNext). 4 radio buttons to select then click btnCheck to check the answer. Then click btn Next to move to the next question. The functions inside the movie clips are setting the variables outside the question clips perfectly. What I want to do is to eliminate the btnCheck and have it check the answer when the radio button group is selected.
[Code]...
I cant seem to get gotoAndStop to work on an externally loaded swf. My external SWF has five keyframes on the main timeline. I am able to load it in fine, but as soon as I create a function to move to a different keyframe it wont work. I have tried everything, but nothing is working. Here is my attached code.
View 9 RepliesI was making a game and i made a back button so when you click it you go to frame 3.OK so i tested it out and when i clicked it my people and my tiles and everything was still there.
View 6 RepliesNumberDots();
var myvar
function NumberDots():void
[code]....
I've recently started using AS3 in flash and it's giving me some troubles. Here's the situation:On my first frame on the main timeline I use a gotoAndStop("home") command to go to my homepage which is on frame 45 and labeled "home".
From frame 2 up to frame 44 there are multiple movieclips with animations and sound in them, which stop at frame 45. When I use the gotoAndStop() command in my first frame it seems to work but the sounds of my movieclips in the previous frames keep looping. I don't understand why this is happening, since my movieclips aren't even on frame 45.
[Code]...
I'm currently receiving two variables from PHP, both containing two different numbers. These numbers reflect what frame i should gotoAndStop in two different movieclips. My problem is, that my second gotoAndStop won't use my second variable. The first variable will gotoAndStop as its supposed too.
[Code]....
I was wondering if you might have some insight as to why my code is not working.I have attached the file
using flash lite 2.0
using action script 2.0 /1.0
use the emulator flash mobile using the key board arrow left and right select Tetris frame("Tetris")and press enter after that click on the soft key it should go back to frame one but it doesnt
Had the MC set as a graphic... rookie error.
View 0 RepliesI want to make the player execute the code in the same frame. If I do a gotoAndStop to the same frame number, nothing happens because AS3 assumes since that you're already there, so nothing happens.
View 3 RepliesI am just curious to whether it is possible to gotoAndStop on a frame and hold for let's say 3 seconds?
View 1 RepliesIs it possible to let an instance gotoAndStop("some frame"), and leave others on the previous frame?
Since I did some research of that function, and it is always used like this:
Code: Select allgotoAndStop("some frame");
and I haven't seen anyone use it like this:
Code: Select allmyInstance.gotoAndStop("some frame");
I have 2 keyframes, both containing buttons and then i load a variable from another ocument, "messages.txt". This document only contains one line atm, which is:messages=1When messages are more then 0, i want to go to my second keyframe.This is the code I'm using in keyframe 1:
stop();
loadText = new LoadVars();
loadText.load("messages.txt");
[code].....
I want to be able to do something like this:
Code:
gotoAndStop(("level"+x),1);
Where x is a number variable and there are the scenes "level1", "level2", "leve3l", etc. I tried this and a few other things but none of them worked. Is this even possible or is the scene field in gotoAndStop that limited?
how do you use the gotoAndStop after a tween has run?
import fl.transitions.Tween;
import fl.transitions.easing.*;
import fl.transitions.TweenEvent;
[Code]....
I have an interesting situation. I am trying to control the main movie on a stage with a button in a second movie on the main movie embedded in a scrollbox. I have created a class for the movie in the scroll box and one for the main movie. The main movie will perform gotoAndStop from the constructor. But it will not work in a public or static method located outside the constructor.
I am trying to get a button in the movie in the scroll box to communicate through the class for the main movie and move the playhead to a specific frame in the main movie.
Right now I have a button listener in the scroll box movie talking to a static method created in the class for the main movie. I can communicate to the static method. I push the button and a message is output through a trace. I know that communication is taking place. The issue. I want to use a gotoAndStop in the static method to move the main movie to the specific frame. Flash tells me that this is a migration issue. That gotoAndStop is no longer supported.
What I'm trying to do is make a movieclip called jetpack go to the second frame and stop. I'm in another movieclip while doing this. I've tried: jetpack.gotoAndStop(2); however this code does not work.
View 2 RepliesI have an AS2 flash movie that has some labeled frames. On the first frame of a particular scene, I have some code that creates a menu of buttons that I construct from movie clips and vector graphics. The onRelease function of those buttons is assigned deep in some code thusly:
code: buttonMC.onRelease = function() {
trace('release, going to ' + this.sceneName);
gotoAndStop(this.sceneName);
};
When one of these buttons is clicked, the scene name reports correctly, but the movie goes to a frame 3 frames later than the targeted frame. I know this because I put trace actions on the subsequent frames like this: code: trace('2 after');
Hi, i have a problem :/
im making a fighting-style game, and need to make it so that when the left or right button is pressed, the character (which is on frame 1, standing still), switches to frame 2, an animation of him walking. However, with the code i have,
if (Key.isDown(Key.LEFT)) {
walk = true;
wspeed = -walkspeed;
this._xscale = -100;
} else if (Key.isDown(Key.RIGHT)) {
walk = true;
wspeed = wal
I am creating a breakout game and below is a part of my code:
function updateGame(e:Event) {
if (ball_mc.hitTestObject(brickone_mc)) {
beepSound.play();
yVel*=-1;
[code]...
I have got it removing the bricks as each brick has an instance name, I am now wanting to go to an end screen once all the bricks have been removed, is there a way to count the children and then put a gotoAndStop() in?
I've got some code and I'm using gotoAndStop but am in need of something to play to the frame instead of just jumping.
Code:
var beginX:Number;
stage.addEventListener(MouseEvent.MOUSE_DOWN, handleMouseDown);
stage.addEventListener(MouseEvent.MOUSE_UP, handleMouseUp);
[code]...
i have this on frame 1 [code]but when u click but_bob it doesnt stop on frame 1, it just ignores the stop and loops.
View 3 RepliesSo here's my code:
mcbutton.onPress = function() [code]....When I click on button it goes to _down frame but it shifts back to 1st frame. It doesn't really stop there. How can I make it work?
I know you can set a gotoAndStop on a particular frame after a time delay but what about a Mouse Movement Delay. Meaning if the mouse isn't moved for 30 seconds, the movie will gotoAndStop on a final frame.
View 5 Replies