Stop scene from symbol actionscript - actionscript-3

I'm new to ActionScript.
I have a scene with a timeline, and inside the scene, I have a symbol with its own timeline started animation at frame 10.
I want the scene to stop when the symbol animation hits frame 60.
I can use a scene action script to stop at frame 70. My question is there any way to stop the scene from symbol Actionscript. (use scene object from symbol)
I tried to add this.stop(); in symbol definition but this didn't work.

Related

Adobe Flash: Countdown Timer

I have a problem about my code in my timer. I've made a movie clip and put this code in my first frame inside the movie clip:
if (time_txt.text ==0) {
this._parent.gotoAndPlay(5);
}
And I have this code in my 12th frame:
time_txt.text = Number (time_txt.text)-1;
gotoAndPlay(1);
Its in the 12th frame because im using 12 frames per second. And go to 5th frame in my first code because if the time is over the frame will go to the 5th frame in my main scene that has "times up" word. By the way this code is inside my movie clip, and the movie clip is inside my scene 1. By the way im making a game. And im using air for android for my file type. Thanks

Dynamically resize a symbol using AS3 and then apply tween on the resultant symbol

I am able to use a classic tween to move a symbol on the stage ( frame 2 to frame 15) on stage layer. I apply AS3 command to resize the symbol ( a simple rectangle as movie) in frame 0 on AS3 layer. I issue stop() command at frame 15 on the AS3 layer. They work independently but the resultant resized symbol is not shown. Any help will be appreciated.

How to make a movieclip play on a specific frame in AS3?

I'm incredibly rusty at Flash having not touched it in probably 10 years and can't seem to figure this out, or find it online:
I have a MovieClip with two layers, each having a Shape Tween. Basically its a Door that opens and closes.
I dropped it onto the main timeline but now I need it to start and stop. This is where I'm now struggling since the last time I used Flash actions could go on specific keyframes.
I made a new layer called actions just to keep things organized and currently have:
barrier1.stop();
I just want something that lets me state a frame, say 57 to have barrier1 start playing on. Tried using play(); and Event.ENTER_FRAME with no luck. How would I set this up?
Well it is easy with the instance name of your movieClip
barrier1.stop(); // Stops the movieClip
barrier1.play(); // Resumes
barrier1.gotoAndStop(12) // Goes to 12nd frame and stop
barrier1.gotoAndPlay(12) // Goes to 12nd frame and play
barrier1.currentFrame // returns barrier currentframe
For capturing frame from scene level:
this.addEventListener(Event.ENTER_FRAME,onLoop);
function onLoop(event:Event){
if(barrier1.currentFrame == 57){
trace("BARRIER is in 57. frame");
}
}
Inside on the animation clip on the first frame
var root:MovieClip = this.parent as MovieClip
root.makeStartSceneAnimation()
**in timeline scene level [root]**
function makeStartSceneAnimation(){
/// barrier started to play
}
If you are using timeline, you can add Key frame on the desired frame, and then add stop(); as Action in the action layer. But bear in mind that if you do this in the main timeline - it will stop everything. If you want to stop that MovieClip, then you have to do this inside MoviceClip's timeline.

gotoAndStop makes it go to the next frame in Flash CS6

I have a problem: I have a movieclip ("gesprekkencivcen") with several frames and layers. I've put this action on a certain button at frame 1:
this.addEventListener(MouseEvent.MOUSE_UP, conv1);
function conv1(evt:MouseEvent):void{
MovieClip(root).gesprekkencivcen.gotoAndStop(23);
}
Now, in stead of going to frame 23 when I click the button it goes to the next frame (which is frame 2). What am I doing wrong??

how do I stop a scene and play the next scene in adobe flash cs6 actionscript 3.0

I'm trying to make a loop animation scene where its like an eye opening and closing. I have one black rectangle that goes down and meets with another black rectangle going up to create the blink effect. Then in the middle I have a button that the viewer can click to go to the next scene. The problem is that before and after the button is pressed both scenes play simultaneously. How can I play the first loop scene and then stop it to play the next scene when a user presses that button? Thanks.
You need to tell your respective scenes to stop. Otherwise flash player will just move on to the next scene automatically after the last frame of the previous scene (and loop back to the first scene after the last frame of the final scene).
In flash, open your first scene and open the timeline view. scroll to the very end of your timeline, add a new layer, on the very last frame of your timeline on your new layer, create a keyframe (F6 on windows). With that new keyframe selected, open the code editor (F9 on windows) and put in the command stop(); OR if you want the current scene to keep looping (without moving on the next scene) put in the command gotoAndPlay(1);
If you want your other scene to stop as well at the end, repeat the above steps on it's timeline.