Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Stop Timeline Exactly Where It Is



I need help with stopping the timeline and audio exactly where it is when my pause button is pressed. The pause changes to a play button which on release I want to pick up from exactly where it is on the timeline and in the audio. Can this be done?? Would it be a function for when the button is pressed? I'm fairly good with general scripting, but I didn't know if this could be done or if it was something really advanced. If anyone could help me I would greatly appreciate it. Thanks for you time and guidance.



Adobe > ActionScript 1 and 2
Posted on: 12/08/2006 08:24:22 AM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Timeline Won't Stop
Dear Flash community,
I am a beginning flash user & I’m having lots of problems
I have a buttons (thumbnails) on the main stage (timeline frame1) which bring in an external jpg and at the same time try to go to a frame on a movie clip (labelMC) to show a label.
I can’t stop the labels of the movie clip (labelMC) just scrolling all the time even though I have put <stop> on each of its frames. I have also tried <gotoandStop >.

Below is an example of the code on the main time line

txtstageMC.gotoAndStop(1);
t1Bu.onRelease = function() {loadMovieNum("1.jpg",1); gotoAndStop('txtstageMC',f2i1);

};
I have put the mess on my website so that you can see what I mean.
website
PS I tried to post this once allready so soory if it reappears

Would Like Timeline To Stop Also
i would like to pause/play the timeline also from these buttons

i'm just learning how to write these codes so any help is appreciated.

the stop button is

on (press) {
if (pause!=true) {
playing=false;
paused=true;
stopped=false
myMusicPosition=_root.mySound17.position/1000;
_root.mySound17.stop("logon_snd");
}
}


the play button is

on (press) {
if (playing!=true) {
playing=true;
paused=false;
stopped=false
_root.mySound17.start(myMusicPosition,0);
}
_root.mySound17.onSoundComplete = function() {
}
}

Timeline Keeps Playing Even With Stop();
I've added a file, its going to be a game, but i have a problem with it:
After the power goes down to 0 (if u collide with enemy power goes down) the game takes you to the loosing screen, and there's a "replay" button there. When pressed it supposed to take you to the first frame of the main time line, but it starts looping for some reason. please help, thank u

How Do I Stop The Timeline Slowing Down ?
Im creating a 10 second advert for a company which will be looped on plasma screens.

the problem im having is that the size of it is... 1280 x 720 and im fading in cut out images (PNG's) which are about 500kb each

When these start to fade in the frame rate goes all the way down to 3 frames a second... and i have it set to 31 fps

does anyone have any solutions that will stop the frame rate going so low

MC Within MC Will Disspear At Timeline Stop
i found out that if i have MC2 inside MC1 and place MC1 on a stop() timeline then MC2 will dissapear after few second

is it me or is it just the way it is?

eeer....no, its me, i know the problem now,

on MC2 i set its alpha at 0 and have it increase on enterFrame. Once on enterFrame MC2 increases its alpha and disappear when it reaches 100%.

therefore my question now is how to make MC2 stop at 100%?

I Can Reverse The Timeline, But How Do I Stop It?
The code below was supplied by a very helpfull member of this forum.
It works so well infact that it reverses the timeline relentlessly.
Its the first code i have seen that works on the release function.


BUT, If I put stop actions intermittently on the root MC it ignores them.
ie. it rewinds to frame 1.

So how can i add to this code to to tell flash to stop if at certain frameS....
(more than one stop on the timeline.)??
I have been struggling with this for a week now and realise i cannot get past these issues without input.

Please, any advice is golden..
thanks
Ant



mcReverse.onRelease = function():Void {
//enter the movie whose timeline u wish to reverse and the frame u want to rewind until
reverse(_root, 1);
};


function reverse(movie:MovieClip, frameno:Number):Void {
movie.stop();
movie.onEnterFrame = function():Void {
movie.prevFrame();
if (movie._currentframe == frameno) {
delete movie.onEnterFrame;
}
};
}

Can't Get Main Timeline To Stop.
i'm new to flash and i'm attempting to make a game which consists of 5 pages. whenever i test the movie, the pages keep running! they won't stop, and they all have stop(); functions on them! so i don't know what i'm doing wrong. i suspect there's something off my the rest of my code on the first page. i am including the actionscript file so that hopefully people can look over it for me and tell me what i did wrong. the other pages just have stop functions. there are three buttons which direct to other pages with a gotoAndStop, but I don't know if they work because the pages keep running! please help.

the link:http://www.mediafire.com/upload_comp...id=tmnnyi4lvyf

[MX04] Can't Stop Timeline
Hey All,
This will probably be a very simple answer but I just can't figure out what I'm doing wrong. I recently created a drop down menu by following this tutorial:

http://www.tutvid.com/tutorials_page...?v=VHVYWcNitq4

Everything went great! It all worked like it should. I created the menu after my intro in the main timeline (menu starts at frame 299). I was even able to use:

on (release) {
_root.gotoAndPlay(1);
}

instead of the getURL command to have the buttons start the intro again. The problem is when I put keyframes after the drop down menu (after frame 299) the timeline just blows right by the menu. I've tried adding an "actions" layer to the main timeline and putting the "stop();" command there but it still won't stop. It plays to the end of the main timeline. I'd like to have the timeline stop at the menu and then link the buttons to frames after 299 but I don't know what I'm doing wrong. I'm somewhat of a "Newbie" so any help would be so greatly appreciated. Thank you for taking the time to read this.

Bryan

p.s. Should I consider using more than one scene? I heard that wasn't such a great idea.

iMac 2.16 GHz intel core 2 duo, OS X 10.4.11, Flash MX 2004 Pro

Timeline Loop That Won't Stop
Hey everyone, I'm new to ActionScript and have been trying to pull off a frame loop but for some reason it just goes on forever. All I am trying to do is loop between frames 2 and 3 10 times and then quit. I send Flash to frame 4 once I have gone back and forth 10 times. I'm not sure if it has anything to do with it but frames 1-3 are keyframes while frame 4 is a "[]" frame. I think that means end frame. They are the only active frames and this is the only timeline in the project. I should also mentioned that I have checked and the number for countLoop eventually goes up to 160,000 but then Flash lets me stop. Here is the code:

Frame 1:
var countLoop;
gotoAndStop(2);
Frame 2:
countLoop += 1;
gotoAndStop(3);Frame 3:
if (countLoop > 10)
{
trace (countLoop);
gotoAndStop(4);
}

trace(countLoop);
gotoAndStop(2);Frame 4:
stop;Thanks for any help :-)

TimeLine Stop() Question
Does anyone know of a way to call stop() so all time lines are stopped within a scene. I have many symbols with timelines and I want a global way to stop any of them at any time. Does this make sense?

Sound Stop In Timeline
1_ First question :
If my streaming sounds lasts for 1200 frames, is it possible to tell the sound to play from frame from 100 to frame 300 using on enter Frame (#) stop playing the sound, bypassing the StopAllsound command ?

Is it possible to tell the same timeline to play from frame 100 to frame 600 without being affected by the previous stop sound command (that occured at frame 300) ?

2_ Second question :
Is it possible to tell an attached sound to play a segment of sound from position 30 (seconds) to position 70 (seconds) eventhough the whole sounds lasts for 120 seconds ?

Stop Main Timeline In AS3
I searched the forum and perhaps found some relevant solutions, yet I still don't get it. How do I make simple "stop()", "play()", and check "currentFrame" on the main timeline from an AS3 Class file?

I have an older AS2 Flash timeline animation that I'm converting to AS3, and also importing an AS3 swf into.

Everything works fine, except I had to remove the "stop()" on the main timeline (so the animation does not loop), and trying to do that from the document main .as file.

I get an error when trying to access "currentFrame" of the stage.

HOW DO I PUT A "STOP" ON THE MAIN TIMELINE?

- - - -









Attach Code

package {

import flash.net.*;
import flash.display.*;
import flash.events.*;

public class Banner extends Sprite {

public function Banner():void {

var request:URLRequest = new URLRequest("sample.swf");
var loader:Loader = new Loader();
loader.load(request);
addChild(loader);

this.stage.addEventListener(Event.ENTER_FRAME, update);
}

// UPDATE LOOP
public function update(e:Event):void {
if (this.stage.currentFrame > 150) {
this.stage.gotoAndStop(150);
}
}
}
}

Stop Timeline For Few Seconds ?
Hi ! all


I want to stop my timeline for few seconds, how I can ???

I try with setInterval, but i think i do mistake somewhere,


Can anyone give me the exact script for that.


plz. help me in that.........

Can't Get The Movie Or Timeline To Stop ...
hi,

could anyone tell me how to stop my timeline at the end of my movie?
my movie runs from frame #1 to frame #580 (that's where the red indicator line stops) frames 346-580 are blank.
problem my movie ends on frame #345 ... how can i make it stop at frame #345 instead of frame #580??

thank you!
john

Continue Timeline After Stop...
hi, this is a complete newbie question. I'm trying to learn how to do more AS than tweens, so bare with me please. I have this script on my MC on frame one


Code:
onClipEvent(enterFrame) {
speed = 17;
this._x -= speed;
}
i have a MC moving across the stage, i tried stopping it with a delete onenterFrame but it will jump and not stop...how do i fix that. my second quesiton is, after i get it to stop, how do i continue the timeline and not repeat frame one, hopefully this makes sense. if anyone knows of a thread or tut, could u please direct me to it. i tried searching for it but nothing explains how to continue to another frame

thanks
Tracy

Stop Timeline For Few Seconds ?
Hi ! all


I want to stop my timeline for few seconds, how I can ???

I try with setInterval, but i think i do mistake somewhere,


Can anyone give me the exact script for that.


plz. help me in that.........

Can't Get The Movie Or Timeline To Stop ...
hi,

could anyone tell me how to stop my timeline at the end of my movie?
my movie runs from frame #1 to frame #580 (that's where the red indicator line stops) frames 346-580 are blank.
problem my movie ends on frame #345 ... how can i make it stop at frame #345 instead of frame #580??

thank you!
john

Continue Timeline After Stop...
hi, this is a complete newbie question. I'm trying to learn how to do more AS than tweens, so bare with me please. I have this script on my MC on frame one


Code:
onClipEvent(enterFrame) {
speed = 17;
this._x -= speed;
}
i have a MC moving across the stage, i tried stopping it with a delete onenterFrame but it will jump and not stop...how do i fix that. my second quesiton is, after i get it to stop, how do i continue the timeline and not repeat frame one, hopefully this makes sense. if anyone knows of a thread or tut, could u please direct me to it. i tried searching for it but nothing explains how to continue to another frame

thanks
Tracy

Stop The Timeline In Actionscript 2.0
I need to stop an animation using AS2. I know how to do this using AS3 but can't remember how to do it AS2?

I want an animation to stop after 125 frames at 12 fps.

Thanks for any help, as this is really stressing me out!!

Stop Main Timeline
I have a movie where the background starts to scroll left upon release of a button; at the same time an external swf is being loaded into an empty movie clip. I want the background to stop moving once the swf is loaded but to have the capability to move again once the swf is unloaded.

I have two functions on frame 1 of my actionscript. I call the functions on frame 25 and I have a stop function on frame 40. I need the functions to be stopped at frame 40.

Any thoughts?

Thnx,
Kristen

Stop Main Timeline
I have an animation playing on the main timeline with multiple MCs.

I have a button "on press" that needs to stop everything on the main timeline.

I need it to stop everything on the main timeline and also the Movie Clips.

Can anyone help?

Stop OnRollOver Timeline.mc
Ok I know this isn't hard for you but it is for me :-)
I have main timeline with few Mc on it ,now I wan't to achieve when you Mouse over certain mc that it stop exactly where you mouse was over it on that certain frame in timeline.movieclip.

edit: I'm using tween in those mc

thanks for help

The MP3 In My Timeline Won't Stop Playing
As most newbies say, I apologize if this has been asked before. I did a search and came up with nothing, however.

I'm pretty new with Flash with almost anything except simple animations. I'm doing a project for class and have to use a song in the background. Problem is, every time I play it the animation will stop (I have figured out the 'stop' action as well... ), but the music keeps on going.

I've tried everything in the Control menu, and the only thing that gets the music to stop is clicking "test movie" or "test scene." It then goes into that mode (obviously), and the music will only stop once I exit from there and go back to the stage/timeline screen. Which is a HUGE hassle when all I'm trying to do is to line up the music with the animation.

I'm new to Flash but definitely not new to computers in general...and have racked my brain trying to figure this out. I did a search online, checked Flash's help site, and looked in the Visual Quickstart Guide for Flash that I have...and I got nothing.

I only have the beginning done to the animation, 30 seconds or so of the entire song. And, like I said, the music just keeps on going even though I really only want to see that first 30 seconds to see if everything's lined up correctly so I can finish.

Someone please help before I destroy my monitor.

START/STOP TIMELINE OF LOADED .SWF
hi all...

im having a hard time figuring out why this isnt working.

i have a button in my main movie on level0 that i want to control a loaded movie using loadMovieNum() on level5.

i simply want to use a start and stop command using the following:

on (release) {
_level5.start
}

or

on (release) {
_level5.stop
}

the loaded .swf on level5 is an .swf music file, created with swiffpeg. there are no stops at the start or end of the .swf.

any help?

thanks
eric

Stopping Timeline Without Stop Action
Hi there,

What im trying to do is find a way to stop the timeline of a movie clip at any frame that i specify in a piece of actionscript, without using the stop action. I want the movie clip to be able to play through all of its frames and then start from the start again (if need be) until it reaches a specific frame, (which will be different each time a different button is pressed).

What I have is a movie clip of a strip of images. At any time i want the user to be able to click one of those images and that will trigger the move clip to play and then pause when that image reaches the center of the screen (the movie clip generally just holds the strip of images moving from left to right and looping). then, if they click another image the movie clip will continue to play until THAT image reaches the center.

Any ideas? I guess to sum it up a piece of script that says "on click play until frame 'n' and stop" would be good. Don't know if this exists!!

Thanks,

Lara.

Stop Main Timeline From Mc Button
I have buttons in a movie clip in a timeline. The movie clip rotates. I would like onRollover of the buttons to stop the movie clip rotation; onRollout of the buttons to restart the movie clip rotation.

The timeline looks like:

2 layers, one of them actionscript with three frames. Frame one sets var r to 0;

frame two:

box._rotation = r;
r +=.5;

(where r sets the speed of the rotation)

frame three:

gotoAndPlay(2);

Also, how can I keep the buttons 'upright' as they rotate?

Any input or direction to tutorials is appreciated.

Kevin

Click To Start And Stop Timeline
Hello again,

I have an animation which scrolls three images right to left. The client would like the user to be able to click anywhere within the pictures to stop the scrolling and then click again to start to scrolling again. I really have no idea how to do this other than setting a delay, which isn't really fitting their needs.

Any ideas?

Thanks so much!!

jessicuh

Stop Movie On Certain Frame In Timeline?
Hi.

I wondered if there is a way of generating a random number on frame one (say, 23), then play the movie and it stop on frame 23??

Thanks.

How To Stop A MC Based On The Route Timeline?
Ok, I’m sure this is really easy to achieve but I am eternally clueless when it comes to Actionscript.

I have a simple movie clip on my stage consisting of 10 frames on a continuous loop. I want to make it so that when the route timeline reaches a certain frame (in this case frame 200) the movie clip will come to a stop, pausing on its current frame in the loop.

I’m guessing that this has something to do with variables???

I’m using MX2004 (if that makes any difference)

Please help me, Thanks in advance.

[F8] Global Timeline Stop Command
OK Guys, hopefully someone can help me out here or at least point me in some direction!

I have a presentation which consists of a main timeline with an assortment of animations and MC's which run independently of the main timeline. I also have some animations which loop depending on array data and also some switch commands to control navigation.

All was going well until I was asked for a pause/play button to be added.

Due to the dynamic nature of the presentation this isn't as easy as a simply pause/play button with a stop and play command

Anyone have any idea how I can stop something like this in it's tracks and then start again from where it is without some major rework?

Mike

[CS3] Stop Main Timeline From Movieclip
Hi, first time here, and going crazy with a problem: I'm trying to stop the main timeline from a movieclip.

The main timeline contains a movieclip called "copy" with the instance name "bodytext". The "copy" timeline contains the script line :

root.gotoAndPlay(24);

and I get the following error:

1061: Call to a possibly undefined method gotoAndPlay through a reference with static type flash.displayisplayObject.

I have no clue what that means.

Any help would be greatly appreciated! Thanks for your time!

-Jon

MC Button To Stop Pan On Main Timeline
I have a MC that uses Actionscript on the main timeline to pan left and right. inside that MC is a button. What actionscript would I use to temporarily stop the panning effect upon rollover of the button?

here is the code on the main timeline:


PHP Code:



this.onMouseMove = function() {
    constrainedMove(bg_mc, 4, 1);
};
function constrainedMove(target:MovieClip, speed:Number, dir:Number) {
    var mousePercent:Number = _xmouse/Stage.width;
    var mSpeed:Number;
    if (dir == 1) {
        mSpeed = mousePercent;
    } else {
        mSpeed = 1-mousePercent;
    }
    target.destX = Math.round(-((target._width-Stage.width)*mSpeed));
    target.onEnterFrame = function() {
        if (target._x == target.destX) {
            delete target.onEnterFrame;
    } else {
            target._x += Math.ceil((target.destX-target._x)*(speed/100));
        }
    };
}

[CS3] Stop () Won't Work On Main Timeline (CS3 + AS2)
(Running AS 2.0 in Flash CS3)

I'm creating an animation as an SWF file that is then being loaded into another SWF. The first problem I noticed is that for some reason, after loading the SWF into a movie clip and playing it, I can't stop it with the stop () function. Other functions work, such as gotoAndPlay (), but stop () doesn't do anything. Furthermore, gotoAndStop () will jump to the specified frame, but then fails to actually stop playing. So the MC is definitely responding to my function calls, and some of the functions work partially, but it won't actually stop.

I then tried simply sticking a stop () or gotoAndStop () call at various points within the original animation itself (instead of loading it into another SWF and calling stop () externally). Again, stop () doesn't do anything, and gotoAndStop () will jump to the specified frame but then keep playing.

The ONLY time I can get it to stop is when I call stop () from within an onEnterFrame handler. Obviously this doesn't solve my problem, since what I really need is to be able to call stop () externally when the SWF is loaded dynamically.

I've made other test clips and stop ()/gotoAndStop () work fine for them. It's just this particular animation that's giving me trouble.

Unfortunately it's for a client under an NDA so I can't post anything, but does anyone know of any common reasons why this occurs? I'm really at a loss here.

Play/Stop Flv From Main Timeline?
http://studio34design.net/aleks/aleks_chem3.html

about 30 seconds into this flash, there is an FLV of a computer screen. The problem is, when I pause the swf, the flv keeps going. How do I get around this?

1. Is it possible to convert the flv to swf?
OR
2. Is it possible to control the flv from the main timeline?

thanks people!

How To Stop .mc Button From Advancing Timeline
When I click on the menu button it take you to the right page. If you click on it again it will again take to another page not associated with it, which happens to be the next frame on the timeline. If there is no stop act the the fla loops.

On the main timeline. I have 3 pages on three frames labeled G1 G2 & G3

On the layer right above those frames I have MenuClip.MC.

It contains the animation etc. of the three menu buttons. For instance when you mouse over the middle button it bounces over the part of the 1st and 3rd.

When you open up the MenuClip.MC
you have four layers, with something occupying the first frame only.

as
left button
Middle button
Right button

The AS3 code that is in the first layer is as follows

// Import the Tweener Class for tweens
import caurina.transitions.*;

// Set the hit area of the left button to buttonMode and add listeners to it
leftbutton.hit.buttonMode = true;
leftbutton.hit.addEventListener(MouseEvent.ROLL_OV ER, leftOver);
leftbutton.hit.addEventListener(MouseEvent.ROLL_OU T, leftOut);

// Rollover function for the left button, adding neccessary tweens
function leftOver(event:MouseEvent):void {
// Left button tweens...
Tweener.addTween(event.target.parent.bg, {transition:"easeoutelastic", width:210, time:0.5});
Tweener.addTween(event.target, {transition:"easeoutelastic", width:220, time:0.5});
Tweener.addTween(event.target.parent.masker, {transition:"easeoutelastic", width:200, time:0.5});
// Middle button tweens...
Tweener.addTween(middlebutton.cont, {transition:"easeoutelastic", x:-25, time:0.5});
Tweener.addTween(middlebutton, {transition:"easeoutelastic", x:255, time:0.5});
Tweener.addTween(middlebutton.bg, {transition:"easeoutelastic", width:60, time:0.5});
Tweener.addTween(middlebutton.hit, {transition:"easeoutelastic", width:70, time:0.5});
Tweener.addTween(middlebutton.masker, {transition:"easeoutelastic", width:50, time:0.5});
// Right button tweens...
Tweener.addTween(rightbutton.cont, {transition:"easeoutelastic", x:-60, time:0.5});
Tweener.addTween(rightbutton.bg, {transition:"easeoutelastic", width:60, time:0.5});
Tweener.addTween(rightbutton.hit, {transition:"easeoutelastic", width:70, time:0.5});
Tweener.addTween(rightbutton.masker, {transition:"easeoutelastic", width:50, time:0.5});
}

// Rollout function for the left button, adding neccessary tweens
function leftOut(event:MouseEvent):void {
// Left button tweens...
Tweener.addTween(event.target.parent.bg, {transition:"easeoutelastic", width:110, time:0.5});
Tweener.addTween(event.target, {transition:"easeoutelastic", width:120, time:0.5});
Tweener.addTween(event.target.parent.masker, {transition:"easeoutelastic", width:100, time:0.5});
// Middle button tweens...
Tweener.addTween(middlebutton.cont, {transition:"easeoutelastic", x:-50, time:0.5});
Tweener.addTween(middlebutton, {transition:"easeoutelastic", x:180, time:0.5});
Tweener.addTween(middlebutton.bg, {transition:"easeoutelastic", width:110, time:0.5});
Tweener.addTween(middlebutton.hit, {transition:"easeoutelastic", width:120, time:0.5});
Tweener.addTween(middlebutton.masker, {transition:"easeoutelastic", width:100, time:0.5});
// Right button tweens...
Tweener.addTween(rightbutton.cont, {transition:"easeoutelastic", x:-110, time:0.5});
Tweener.addTween(rightbutton.bg, {transition:"easeoutelastic", width:110, time:0.5});
Tweener.addTween(rightbutton.hit, {transition:"easeoutelastic", width:120, time:0.5});
Tweener.addTween(rightbutton.masker, {transition:"easeoutelastic", width:100, time:0.5});
}

// Set the hit area of the middle button to buttonMode and add listeners to it
middlebutton.hit.buttonMode = true;
middlebutton.hit.addEventListener(MouseEvent.ROLL_ OVER, middleOver);
middlebutton.hit.addEventListener(MouseEvent.ROLL_ OUT, middleOut);

// Rollover function for the midde button, adding neccessary tweens
function middleOver(event:MouseEvent):void {
// Middle button tweens...
Tweener.addTween(event.target.parent.cont, {transition:"easeoutelastic", x:-100, time:0.5});
Tweener.addTween(event.target.parent.bg, {transition:"easeoutelastic", width:210, time:0.5});
Tweener.addTween(event.target, {transition:"easeoutelastic", width:220, time:0.5});
Tweener.addTween(event.target.parent.masker, {transition:"easeoutelastic", width:200, time:0.5});
// Left button tweens...
Tweener.addTween(leftbutton.bg, {transition:"easeoutelastic", width:60, time:0.5});
Tweener.addTween(leftbutton.hit, {transition:"easeoutelastic", width:70, time:0.5});
Tweener.addTween(leftbutton.masker, {transition:"easeoutelastic", width:50, time:0.5});
// Right button tweens...
Tweener.addTween(rightbutton.cont, {transition:"easeoutelastic", x:-60, time:0.5});
Tweener.addTween(rightbutton.bg, {transition:"easeoutelastic", width:60, time:0.5});
Tweener.addTween(rightbutton.hit, {transition:"easeoutelastic", width:70, time:0.5});
Tweener.addTween(rightbutton.masker, {transition:"easeoutelastic", width:50, time:0.5});
}

// Rollut function for the midde button, adding neccessary tweens
function middleOut(event:MouseEvent):void {
// Middle button tweens...
Tweener.addTween(event.target.parent.cont, {transition:"easeoutelastic", x:-50, time:0.5});
Tweener.addTween(event.target.parent.bg, {transition:"easeoutelastic", width:110, time:0.5});
Tweener.addTween(event.target, {transition:"easeoutelastic", width:120, time:0.5});
Tweener.addTween(event.target.parent.masker, {transition:"easeoutelastic", width:100, time:0.5});
// Left button tweens...
Tweener.addTween(leftbutton.bg, {transition:"easeoutelastic", width:110, time:0.5});
Tweener.addTween(leftbutton.hit, {transition:"easeoutelastic", width:120, time:0.5});
Tweener.addTween(leftbutton.masker, {transition:"easeoutelastic", width:100, time:0.5});
// Right button tweens...
Tweener.addTween(rightbutton.cont, {transition:"easeoutelastic", x:-110, time:0.5});
Tweener.addTween(rightbutton.bg, {transition:"easeoutelastic", width:110, time:0.5});
Tweener.addTween(rightbutton.hit, {transition:"easeoutelastic", width:120, time:0.5});
Tweener.addTween(rightbutton.masker, {transition:"easeoutelastic", width:100, time:0.5});
}

// Set the hit area of the right button to buttonMode and add listeners to it
rightbutton.hit.buttonMode = true;
rightbutton.hit.addEventListener(MouseEvent.ROLL_O VER, rightOver);
rightbutton.hit.addEventListener(MouseEvent.ROLL_O UT, rightOut);

// Rollover function for the right button, adding neccessary tweens
function rightOver(event:MouseEvent):void {
// Right button tweens...
Tweener.addTween(event.target.parent.cont, {transition:"easeoutelastic", x:-210, time:0.5});
Tweener.addTween(event.target.parent.bg, {transition:"easeoutelastic", width:210, time:0.5});
Tweener.addTween(event.target, {transition:"easeoutelastic", width:220, time:0.5});
Tweener.addTween(event.target.parent.masker, {transition:"easeoutelastic", width:200, time:0.5});
// Left button tweens...
Tweener.addTween(leftbutton.bg, {transition:"easeoutelastic", width:60, time:0.5});
Tweener.addTween(leftbutton.hit, {transition:"easeoutelastic", width:70, time:0.5});
Tweener.addTween(leftbutton.masker, {transition:"easeoutelastic", width:50, time:0.5});
// Middle button tweens...
Tweener.addTween(middlebutton.cont, {transition:"easeoutelastic", x:-25, time:0.5});
Tweener.addTween(middlebutton, {transition:"easeoutelastic", x:105, time:0.5});
Tweener.addTween(middlebutton.bg, {transition:"easeoutelastic", width:60, time:0.5});
Tweener.addTween(middlebutton.hit, {transition:"easeoutelastic", width:70, time:0.5});
Tweener.addTween(middlebutton.masker, {transition:"easeoutelastic", width:50, time:0.5});
}

// Rollout function for the right button, adding neccessary tweens
function rightOut(event:MouseEvent):void {
// Right button tweens...
Tweener.addTween(event.target.parent.cont, {transition:"easeoutelastic", x:-110, time:0.5});
Tweener.addTween(event.target.parent.bg, {transition:"easeoutelastic", width:110, time:0.5});
Tweener.addTween(event.target, {transition:"easeoutelastic", width:120, time:0.5});
Tweener.addTween(event.target.parent.masker, {transition:"easeoutelastic", width:100, time:0.5});
// Left button tweens...
Tweener.addTween(leftbutton.bg, {transition:"easeoutelastic", width:110, time:0.5});
Tweener.addTween(leftbutton.hit, {transition:"easeoutelastic", width:120, time:0.5});
Tweener.addTween(leftbutton.masker, {transition:"easeoutelastic", width:100, time:0.5});
// Middle button tweens...
Tweener.addTween(middlebutton.cont, {transition:"easeoutelastic", x:-50, time:0.5});
Tweener.addTween(middlebutton, {transition:"easeoutelastic", x:180, time:0.5});
Tweener.addTween(middlebutton.bg, {transition:"easeoutelastic", width:110, time:0.5});
Tweener.addTween(middlebutton.hit, {transition:"easeoutelastic", width:120, time:0.5});
Tweener.addTween(middlebutton.masker, {transition:"easeoutelastic", width:100, time:0.5});
}

//My Tampering //

import flash.net.URLRequest;
import flash.display.Loader;
import flash.events.Event;
import flash.events.MouseEvent;
import flash.events.ProgressEvent;

// assign menu button fuctions to mouse action like hovering over and clicking //
leftbutton.addEventListener(MouseEvent.CLICK,gohom e); // takes you to the golf homapage g1 frame //
leftbutton.addEventListener(MouseEvent.MOUSE_OVER, oversound); // sound for mouse over menu button function //
leftbutton.addEventListener(MouseEvent.CLICK,click ersound); // sound for clicking of menu button function //

Middlebutton.addEventListener(MouseEvent.CLICK,gos kins);// takes you to the golf homapage g2 frame //
middlebutton.addEventListener(MouseEvent.MOUSE_OVE R,oversound); // sound for mouse over menu button function //
middlebutton.addEventListener(MouseEvent.CLICK,cli ckersound); // sound for clicking of menu button function //

rightbutton.addEventListener(MouseEvent.CLICK,goye llow); // takes you to the golf homapage g3 frame //
rightbutton.addEventListener(MouseEvent.MOUSE_OVER ,oversound); // sound for mouse over menu button function //
rightbutton.addEventListener(MouseEvent.CLICK,clic kersound); // sound for clicking of menu button function //

// defining the sound functions //
function clickersound (event:MouseEvent){
var mySound:Sound = new s164(); // this is the class name "Gbreak" load the wave file to the library.//
//under linkage class use this name, and check boxes for export to AS, and for export to 1st frame//
var soundChannel:SoundChannel = mySound.play();
}

function oversound (event:MouseEvent){
var mySound:Sound = new s161();
var soundChannel:SoundChannel = mySound.play();
}


// defining the functions that take you to another page //
function gohome(e:MouseEvent):void
{
MovieClip(parent).gotoAndPlay("g1");
}

function goskins(e:MouseEvent):void
{
MovieClip(parent).gotoAndPlay("g2");
}

function goyellow(e:MouseEvent):void
{
MovieClip(parent).gotoAndPlay("g3");
}

How To Stop .mc Button From Advancing Timeline
--------------------------------------------------------------------------------

When I click on the menu button it take you to the right page. If you click on it again it will again take to another page not associated with it, which happens to be the next frame on the timeline. If there is no stop act the the fla loops.

On the main timeline. I have 3 pages on three frames labeled G1 G2 & G3

On the layer right above those frames I have MenuClip.MC.

It contains the animation etc. of the three menu buttons. For instance when you mouse over the middle button it bounces over the part of the 1st and 3rd.

When you open up the MenuClip.MC
you have four layers, with something occupying the first frame only.

as
left button
Middle button
Right button

The AS3 code that is in the first layer is as follows

// Import the Tweener Class for tweens
import caurina.transitions.*;

// Set the hit area of the left button to buttonMode and add listeners to it
leftbutton.hit.buttonMode = true;
leftbutton.hit.addEventListener(MouseEvent.ROLL_OV ER, leftOver);
leftbutton.hit.addEventListener(MouseEvent.ROLL_OU T, leftOut);

// Rollover function for the left button, adding neccessary tweens
function leftOver(event:MouseEvent):void {
// Left button tweens...
Tweener.addTween(event.target.parent.bg, {transition:"easeoutelastic", width:210, time:0.5});
Tweener.addTween(event.target, {transition:"easeoutelastic", width:220, time:0.5});
Tweener.addTween(event.target.parent.masker, {transition:"easeoutelastic", width:200, time:0.5});
// Middle button tweens...
Tweener.addTween(middlebutton.cont, {transition:"easeoutelastic", x:-25, time:0.5});
Tweener.addTween(middlebutton, {transition:"easeoutelastic", x:255, time:0.5});
Tweener.addTween(middlebutton.bg, {transition:"easeoutelastic", width:60, time:0.5});
Tweener.addTween(middlebutton.hit, {transition:"easeoutelastic", width:70, time:0.5});
Tweener.addTween(middlebutton.masker, {transition:"easeoutelastic", width:50, time:0.5});
// Right button tweens...
Tweener.addTween(rightbutton.cont, {transition:"easeoutelastic", x:-60, time:0.5});
Tweener.addTween(rightbutton.bg, {transition:"easeoutelastic", width:60, time:0.5});
Tweener.addTween(rightbutton.hit, {transition:"easeoutelastic", width:70, time:0.5});
Tweener.addTween(rightbutton.masker, {transition:"easeoutelastic", width:50, time:0.5});
}

// Rollout function for the left button, adding neccessary tweens
function leftOut(event:MouseEvent):void {
// Left button tweens...
Tweener.addTween(event.target.parent.bg, {transition:"easeoutelastic", width:110, time:0.5});
Tweener.addTween(event.target, {transition:"easeoutelastic", width:120, time:0.5});
Tweener.addTween(event.target.parent.masker, {transition:"easeoutelastic", width:100, time:0.5});
// Middle button tweens...
Tweener.addTween(middlebutton.cont, {transition:"easeoutelastic", x:-50, time:0.5});
Tweener.addTween(middlebutton, {transition:"easeoutelastic", x:180, time:0.5});
Tweener.addTween(middlebutton.bg, {transition:"easeoutelastic", width:110, time:0.5});
Tweener.addTween(middlebutton.hit, {transition:"easeoutelastic", width:120, time:0.5});
Tweener.addTween(middlebutton.masker, {transition:"easeoutelastic", width:100, time:0.5});
// Right button tweens...
Tweener.addTween(rightbutton.cont, {transition:"easeoutelastic", x:-110, time:0.5});
Tweener.addTween(rightbutton.bg, {transition:"easeoutelastic", width:110, time:0.5});
Tweener.addTween(rightbutton.hit, {transition:"easeoutelastic", width:120, time:0.5});
Tweener.addTween(rightbutton.masker, {transition:"easeoutelastic", width:100, time:0.5});
}

// Set the hit area of the middle button to buttonMode and add listeners to it
middlebutton.hit.buttonMode = true;
middlebutton.hit.addEventListener(MouseEvent.ROLL_ OVER, middleOver);
middlebutton.hit.addEventListener(MouseEvent.ROLL_ OUT, middleOut);

// Rollover function for the midde button, adding neccessary tweens
function middleOver(event:MouseEvent):void {
// Middle button tweens...
Tweener.addTween(event.target.parent.cont, {transition:"easeoutelastic", x:-100, time:0.5});
Tweener.addTween(event.target.parent.bg, {transition:"easeoutelastic", width:210, time:0.5});
Tweener.addTween(event.target, {transition:"easeoutelastic", width:220, time:0.5});
Tweener.addTween(event.target.parent.masker, {transition:"easeoutelastic", width:200, time:0.5});
// Left button tweens...
Tweener.addTween(leftbutton.bg, {transition:"easeoutelastic", width:60, time:0.5});
Tweener.addTween(leftbutton.hit, {transition:"easeoutelastic", width:70, time:0.5});
Tweener.addTween(leftbutton.masker, {transition:"easeoutelastic", width:50, time:0.5});
// Right button tweens...
Tweener.addTween(rightbutton.cont, {transition:"easeoutelastic", x:-60, time:0.5});
Tweener.addTween(rightbutton.bg, {transition:"easeoutelastic", width:60, time:0.5});
Tweener.addTween(rightbutton.hit, {transition:"easeoutelastic", width:70, time:0.5});
Tweener.addTween(rightbutton.masker, {transition:"easeoutelastic", width:50, time:0.5});
}

// Rollut function for the midde button, adding neccessary tweens
function middleOut(event:MouseEvent):void {
// Middle button tweens...
Tweener.addTween(event.target.parent.cont, {transition:"easeoutelastic", x:-50, time:0.5});
Tweener.addTween(event.target.parent.bg, {transition:"easeoutelastic", width:110, time:0.5});
Tweener.addTween(event.target, {transition:"easeoutelastic", width:120, time:0.5});
Tweener.addTween(event.target.parent.masker, {transition:"easeoutelastic", width:100, time:0.5});
// Left button tweens...
Tweener.addTween(leftbutton.bg, {transition:"easeoutelastic", width:110, time:0.5});
Tweener.addTween(leftbutton.hit, {transition:"easeoutelastic", width:120, time:0.5});
Tweener.addTween(leftbutton.masker, {transition:"easeoutelastic", width:100, time:0.5});
// Right button tweens...
Tweener.addTween(rightbutton.cont, {transition:"easeoutelastic", x:-110, time:0.5});
Tweener.addTween(rightbutton.bg, {transition:"easeoutelastic", width:110, time:0.5});
Tweener.addTween(rightbutton.hit, {transition:"easeoutelastic", width:120, time:0.5});
Tweener.addTween(rightbutton.masker, {transition:"easeoutelastic", width:100, time:0.5});
}

// Set the hit area of the right button to buttonMode and add listeners to it
rightbutton.hit.buttonMode = true;
rightbutton.hit.addEventListener(MouseEvent.ROLL_O VER, rightOver);
rightbutton.hit.addEventListener(MouseEvent.ROLL_O UT, rightOut);

// Rollover function for the right button, adding neccessary tweens
function rightOver(event:MouseEvent):void {
// Right button tweens...
Tweener.addTween(event.target.parent.cont, {transition:"easeoutelastic", x:-210, time:0.5});
Tweener.addTween(event.target.parent.bg, {transition:"easeoutelastic", width:210, time:0.5});
Tweener.addTween(event.target, {transition:"easeoutelastic", width:220, time:0.5});
Tweener.addTween(event.target.parent.masker, {transition:"easeoutelastic", width:200, time:0.5});
// Left button tweens...
Tweener.addTween(leftbutton.bg, {transition:"easeoutelastic", width:60, time:0.5});
Tweener.addTween(leftbutton.hit, {transition:"easeoutelastic", width:70, time:0.5});
Tweener.addTween(leftbutton.masker, {transition:"easeoutelastic", width:50, time:0.5});
// Middle button tweens...
Tweener.addTween(middlebutton.cont, {transition:"easeoutelastic", x:-25, time:0.5});
Tweener.addTween(middlebutton, {transition:"easeoutelastic", x:105, time:0.5});
Tweener.addTween(middlebutton.bg, {transition:"easeoutelastic", width:60, time:0.5});
Tweener.addTween(middlebutton.hit, {transition:"easeoutelastic", width:70, time:0.5});
Tweener.addTween(middlebutton.masker, {transition:"easeoutelastic", width:50, time:0.5});
}

// Rollout function for the right button, adding neccessary tweens
function rightOut(event:MouseEvent):void {
// Right button tweens...
Tweener.addTween(event.target.parent.cont, {transition:"easeoutelastic", x:-110, time:0.5});
Tweener.addTween(event.target.parent.bg, {transition:"easeoutelastic", width:110, time:0.5});
Tweener.addTween(event.target, {transition:"easeoutelastic", width:120, time:0.5});
Tweener.addTween(event.target.parent.masker, {transition:"easeoutelastic", width:100, time:0.5});
// Left button tweens...
Tweener.addTween(leftbutton.bg, {transition:"easeoutelastic", width:110, time:0.5});
Tweener.addTween(leftbutton.hit, {transition:"easeoutelastic", width:120, time:0.5});
Tweener.addTween(leftbutton.masker, {transition:"easeoutelastic", width:100, time:0.5});
// Middle button tweens...
Tweener.addTween(middlebutton.cont, {transition:"easeoutelastic", x:-50, time:0.5});
Tweener.addTween(middlebutton, {transition:"easeoutelastic", x:180, time:0.5});
Tweener.addTween(middlebutton.bg, {transition:"easeoutelastic", width:110, time:0.5});
Tweener.addTween(middlebutton.hit, {transition:"easeoutelastic", width:120, time:0.5});
Tweener.addTween(middlebutton.masker, {transition:"easeoutelastic", width:100, time:0.5});
}

//My Tampering //

import flash.net.URLRequest;
import flash.display.Loader;
import flash.events.Event;
import flash.events.MouseEvent;
import flash.events.ProgressEvent;

// assign menu button fuctions to mouse action like hovering over and clicking //
leftbutton.addEventListener(MouseEvent.CLICK,gohom e); // takes you to the golf homapage g1 frame //
leftbutton.addEventListener(MouseEvent.MOUSE_OVER, oversound); // sound for mouse over menu button function //
leftbutton.addEventListener(MouseEvent.CLICK,click ersound); // sound for clicking of menu button function //

Middlebutton.addEventListener(MouseEvent.CLICK,gos kins);// takes you to the golf homapage g2 frame //
middlebutton.addEventListener(MouseEvent.MOUSE_OVE R,oversound); // sound for mouse over menu button function //
middlebutton.addEventListener(MouseEvent.CLICK,cli ckersound); // sound for clicking of menu button function //

rightbutton.addEventListener(MouseEvent.CLICK,goye llow); // takes you to the golf homapage g3 frame //
rightbutton.addEventListener(MouseEvent.MOUSE_OVER ,oversound); // sound for mouse over menu button function //
rightbutton.addEventListener(MouseEvent.CLICK,clic kersound); // sound for clicking of menu button function //

// defining the sound functions //
function clickersound (event:MouseEvent){
var mySound:Sound = new s164(); // this is the class name "Gbreak" load the wave file to the library.//
//under linkage class use this name, and check boxes for export to AS, and for export to 1st frame//
var soundChannel:SoundChannel = mySound.play();
}

function oversound (event:MouseEvent){
var mySound:Sound = new s161();
var soundChannel:SoundChannel = mySound.play();
}


// defining the functions that take you to another page //
function gohome(e:MouseEvent):void
{
MovieClip(parent).gotoAndPlay("g1");
}

function goskins(e:MouseEvent):void
{
MovieClip(parent).gotoAndPlay("g2");
}

function goyellow(e:MouseEvent):void
{
MovieClip(parent).gotoAndPlay("g3");
}

Is There A Way To Make Timeline Play 3X Then Stop?
I am trying to figure out how to play timeline 3x and on last frame hold for say... 5 seconds then play again.

After the 3rd time though I want it to stop on the last frame.

thanks

Video On A Timeline Wont Stop
i have a series of videos on a timeline. i have transitions/tweens between videos. i also have buttons on each video to move the series forward or backward.

when i click the forward button, the timeline/tween moves forward BUT the video's audio or the video keeps playing. how can i stop the video? im guessing i can make an event listener for forward click button and somehow make give the video an instance name but im not sure...

(also, Im a noob enough to have a new button instance at each video... so its not one set of buttons but many sets)







Attach Code

stop ();

fwd2_btn.addEventListener(MouseEvent.CLICK, powerClick2a);
function powerClick2a(event:MouseEvent):void {
gotoAndPlay (30);
}

home2_btn.addEventListener(MouseEvent.CLICK, powerClick2b);
function powerClick2b(event:MouseEvent):void {
navigateToURL(new URLRequest("http://www.alphabetcreative.com/home.html"));
}


back2_btn.addEventListener(MouseEvent.CLICK, powerClick2c);
function powerClick2c(event:MouseEvent):void {
gotoAndPlay (20);
}

Stop Music Without Stopping Timeline
I have a movie that I want to loop indefinitely. It has an audio track on its timeline. I want to stop the audio after the first loop. However, I want to have the movie still continue to loop (just no sound).

Scritping Button To Stop & Start MC Timeline
I am having a bit of trouble figuring out what to do in my situation.
I am a main timeline, with a movie clip that I want to loop infinitly, until a button is clicked, once the button is clicked I want it to stop the movie clip timeline, once the button is clicked again I want it to start the movie clip timeline again.

I am not the greatest actionscripter, I understand it I just have a bit of trouble writing the syntax myself.

Any help is greatly appreciated.

Lawrence

Timeline Help--how Do I Make An Animation Stop Instead Of Replaying?
how do I stop the timeline from playing a loop?
I made an animation of a picture fading onto the screen. It takes 40 fps for the whole picture to load, but then it starts over again and goes through the whole process. i just want it load once.

How-to Pause, Stop, And Play External Timeline
Hi FlashKit'ers. My scenario:
I have a button that loads an external .swf into an empty MC. I need to be able to pause, play, and stop the external .swf's timeline using the pause, play, stop button located on the mainstage where the empty MC is also located.
Now, i know how to do all of the functions if the timeline i want to pause, play, and stop is the mainstage's timeline, but i have no idea how to do all of those functions if the timeline i want to pause is an external timeline. I'm sure there is a very simple answer to this problem, and any ideas or answers would make me one very happy camper.
take care.

Timeline Control - Play, Stop, Pause, Etc.
Is there any where I can find a tut on how to build a timeline controller that has play, stop, pause, etc buttons.

Something along the lines of http://www.macromedia.com/resources/...apps/overview/

or

http://www.macromedia.com/software/breeze/overview/

Does Macromedia Flash MX 2004 or Breeze have these components built in. Any help would be great.

Help Stop Movie AND Sound (timeline Not Video)
I've looked ALL over, ALL afternoon for a tutorial that will show me how to build a toggle button that will just 'pause' the whole Flash animation as well as the sound and then start it again.

Everything I've found ONLY pauses one or the other? How could I do this?

Thanks! (in advance)

[F8] Rewinding The Timeline - Stop At Frames-rewind
Well heres my problem

* Reversing code is working

*Stopping at certain frames is not

* I cant seem to find an effective way of rewinding to the end of the MC when it rewinds to 1 (_totalFrames)

Heres the code below...
and the FLA is attached.

apologies for reposting, but I posted it so early this morning its already on page two.

I also realise that I have asked this questuion several times, sometimes one thing works and then not the other.
many thanks
Ant


// FORWARD BUTTON ---->
packs_mc.gotoAndStop(5);
fwd_btn.onRelease = function() {
// play the mc normally
packs_mc.play();
}
// BACK BUTTON ---->


rew_btn.onRelease = function():Void {
//enter the movie whose timeline u wish to reverse and the frame u want to rewind until
reverse(packs_mc, 1);

};


function reverse(movie:MovieClip, frameno:Number):Void {
movie.stop();
movie.onEnterFrame = function():Void {
movie.prevFrame();
if (movie._currentframe == frameno) {
delete movie.onEnterFrame;
}
};
}


var aStopFrames:Array = [5, 13, 21, 29];//frames I want to stop it on

if (checkStop(movie)) {
delete movie.onEnterFrame;
}

function checkStop(movie:MovieClip):Boolean {//rewind to the end when it hits frame 1
for (var i = 0; i<aStopFrames.length; i++) {
if (aStopFrames[i] == movie._currentframe) {
return true;
}
}
return false;
}

How To Stop The Timeline Untill Swf Fully Downloaded?
im trying to hold my timeline untill my splash swf is fully downloaded in the main.swf by

stop();
myMCL.loadClip("splash.swf", 4);

How can i do this and then get the timeline to play when it is fully loaded.
i have tried using a trigger file where it fully downloads everything in the splash.swf library but when it meets the key frame in the timeline for the splash.swf it downloads it again?
any help would be very grateful
baz

Code Works On Main Timeline But Stop After....
I made an mp3 player from gotoandlearn.com and it all work on the main timeline, but when I insert it into an animated movie clip it doesnt work. Anyone know why? I attached my files except the mp3s

Movie Clips Stop In Main Timeline
I have a movie clip with 100 frames that I have placed in the main timeline (3 frames for a preloader). The move clip is longer than the main timeline and stops. How do I get longer MC's to play?

How Can I Stop All Movie Clips In The Main Timeline?
How can I stop all MovieClips in the main timeline?
The movieclips in the main timeline include those loaded via loadMovie() or loadClip().Can I stop all those externally loaded movieclips, including those embedded in the loaded movieclips?

Copyright © 2005-08 www.BigResource.com, All rights reserved