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








Stop Looping


How do I make my flash swf file loop 3 times then stop?

This is the code that I have on the last frame of my movie currently but it doesn't seem to be working properly.

Can anyone help.

if (_root.counter!=3){
_root.counter++;
}else{
stop();
}

Thanks,
Moose




ActionScript.org Forums > ActionScript Forums Group > ActionScript 1.0 (and below)
Posted on: 05-17-2005, 07:44 PM


View Complete Forum Thread with Replies

Sponsored Links:

Stop Actionscript Function At A Specific Frame (stop Looping)
I want to stop an effect at a specific frame but I dunno how.
Do I have to put something in the code?
I'm confused.
Or just tell me how to stop it from looping.
Edit:
Is it possible to attach this to a movie clip? Then i can stop it or use onEnterFrame and then escape();
I actually have no idea what I am talking about. /Edit

Here is one of the code I borrowed:

MovieClip.prototype.placeInSpace = function(id) {
var ratio = this.focaldistance / Math.sqrt(this[id].z * this[id].z);
this[id]._x = this[id].x * ratio;
this[id]._y = this[id].y * ratio;
this[id]._xscale = this[id]._yscale = 1000 / this[id].z;
}
MovieClip.prototype.randomPlace = function(id) {
var radius = this.rmin + (this.rmax - this.rmin) * Math.random();
var polar = 2 * Math.PI * Math.random();
this[id].x = radius * Math.cos(polar);
this[id].y = radius * Math.sin(polar);
this[id].z = this.zmin + (this.zmax - this.zmin) * Math.random();
}

Here's the other code cause I can use two in my movie:
function mover() {
// Move the particle over time
this._y += this.speed;
this._yscale += 10;
this.speed++;
if (this._y>500) {
this._y = 0;
this.speed = Math.random()*10;
this._yscale = 100;
}
}
function starField(x, y, n) {
// Generate a starfield of specified dimensions with n stars
for (var i = 0; i<n; i++) {
var star = this.createEmptyMovieClip("star"+i, i);
var dot = star.createEmptyMovieClip("dot", 0);
star._rotation = Math.random()*360;
star._x = x;
star._y = y;
dot.lineStyle(0, 0xFFFFFF, 100);
dot.moveTo(0, 10);
dot.lineTo(0, 15);
dot.onEnterFrame = mover;
dot.speed = Math.random()*10;
}
}
starField(275, 200, 100);

View Replies !    View Related
How Can I Stop Flash From Looping And Stop On The Last Frame
I am having a problem with looping. I created a flash file and published it. I only want it to play through once and stop on the last frame. I can't get it to stop, it keeps looping through and playing the movie.

I have tried to add a layer that has some script in it with a start and a last tag on frame 1 and frame 310 there is 315 frames total.

the action script was
<code>
// this was in the first frame
ifFrameLoaded ("last") {
gotoAndPlay("start");
}

//this was in the second frame
gotoAndPlay(1);

//this was in the last frame 315
stop ();
</code>

your help is greatly appreciated.

skj

View Replies !    View Related
How Do I Stop It From Looping
how do i stop my movie from looping i want it to display only once

View Replies !    View Related
Stop Looping
I know I can put a stop action after a a complete movie but I want to stop each image after it "enters" onto my scene. Every time I put a "stop" in the time line, it stops my whole movie. For instance, I floated in roses and then wanted to add wording and have that float in as well. When I put in a stop action, after the roses, it stops the words from completely entering onto my scene as well as the roses. In other words, where to I put the stop action to stop each individual item that I want to stop at various times rather than stopping my whole movie. Thanks! iAppeal

View Replies !    View Related
Stop Looping
Can someone help me. How can I get my swish effect to stop looping?

View Replies !    View Related
Stop Looping
Ok, i clicked 'Flash Player 6', went on 'HTML' and stopped the unchecked Loop. Still...it loops. Please help ASAP!

View Replies !    View Related
How Do I Stop Looping?
i am new and this is my first test
.net in vb
here is the code
thanks for any help
stan

OBJECT id="great" codeBase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
height="70" width="400" classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000" VIEWASTEXT>
PARAM NAME="_cx" VALUE="10583">
PARAM NAME="_cy" VALUE="1852">
PARAM NAME="FlashVars" VALUE="10583">
PARAM NAME="Movie" VALUE="images/great.swf">
PARAM NAME="Src" VALUE="images/great.swf">
PARAM NAME="WMode" VALUE="Window">
PARAM NAME="Play" VALUE="1">
PARAM NAME="Loop" VALUE="1">
PARAM NAME="Quality" VALUE="High">
PARAM NAME="SAlign" VALUE="">
PARAM NAME="Menu" VALUE="-1">
PARAM NAME="Base" VALUE="">
PARAM NAME="AllowScriptAccess" VALUE="always">
PARAM NAME="Scale" VALUE="ShowAll">
PARAM NAME="DeviceFont" VALUE="0">
PARAM NAME="EmbedMovie" VALUE="0">
PARAM NAME="BGColor" VALUE="FFFFFF">
PARAM NAME="SWRemote" VALUE="">
EMBED src="great.swf" quality="high" bgcolor="#FFFFFF" WIDTH="400" HEIGHT="70" NAME="great"
ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">
/EMBED>
OBJECT>

View Replies !    View Related
Looping..and How To Stop It
hello i am very new to flash..got it yesterday....and i would like to no...(step by step) plz.....how to make an animation so it only plays once...because i cant stop the loop.........thanks alot

View Replies !    View Related
How Do I Stop Looping?
I'm sure this is an easy question to answer... but how do I stop my flash file from looping? I just want it to play once and stop. Thanks.. from a complete newbie.

View Replies !    View Related
Stop Looping
can anyone help please. I have finished my small flash movie and i was wondering, when i play it in the flash player it keeps looping how do i get this to stop.

View Replies !    View Related
Why Does My Swf Stop Looping?
To see the swf that I'm loading into another swf goto http://www.caillouette.com/Mov_people/

then to see the main movie goto
http://www.caillouette.com/working/
In the main movie click on Illustrations, then people. You will see the Mov_people starts but stops and doesn't loop.
I have a
Code:
gotoAndPlay(4);
at the end of Mov_people.

But when loaded into the "working" swf. it doesn't loop.

Any ideas?

thanks

View Replies !    View Related
How Do I Stop It Looping?
Hi

I've just created my first flash movie (is it a movie?). It's a logo and I want it only to play once and not keep looping as it is doing when published as a webpage. How do I make it play only once (unless the page is reloaded).

I'm usin Flash MX (Not 2004)

Simon

PS There seems to be a lot of tutorials out on the web but does anyone have any particular favourites?

View Replies !    View Related
Stop Looping
i woudl liek my swf to stop looping, how woudl i amke it so it only plays once, and thats it?

View Replies !    View Related
Stop Looping
i would like my swf to stop looping, how woudl i amke it so it only plays once, and thats it?I'm using latest Flash MX

View Replies !    View Related
Need To Stop The Looping
Ok, im kindof new to fash code, but heres what i want, and whats not happing. I want this varable to play duplicate movie clips one, then stop or go to the next frame. what is happening is it (the duplicate movie clip) just loops over and over and over no matter what frame i go to. How can i get it to play one loop then jump to the next frame, or stop all together.

here is my code that i have worked out so far.

onClipEvent (load) {
for (i=1;i<60;i++){
duplicateMovieClip(line,"line"+i,i);
r=random(650);
setProperty("line"+i,_y,r);
setProperty("line"+i,_x,i*7);

}

gotoAndStop(2)
}

ok, this is prob easy, but i just cant figure it out.

any help with it is greatly apreachited.

Thnaks...

Fluster and pondering

De-Zypher

View Replies !    View Related
How Can I Stop Looping. Help
I'm wondering how I can stop a SWF from looping?

View Replies !    View Related
How Do I Stop Looping
I have created rotating text on a background that explodes but I cannot stop the looping, even though I add the action script stop(); either on the last frame or the first frame. What it does it stop the motion altogether. What do I need to do?

View Replies !    View Related
How To Stop Looping
When I playback a movie, it loops unless I uncheck loop in the player.
In MX, loop playback is unchecked but I can't find anywhere else to stop it from looping after I render it to .swf.

I appreciate anybody's help.

Thanks
Steve

View Replies !    View Related
Can't Stop Looping
Can anyone suggest a hack to this code that will cause the movie to stop at the end? The Loop param is set to false, but that doesn't stop it. This was output from Techsmith Camtasia; their support has a known issue and their solution is a version upgrade which I would rather not do if I can find some code to end the loop.

(just drag slider to the end and watch the loop kick in)

http://www.healthdataservices.com/Fr...deCorrect.html

Any help appreciated, thanks.

John
jdove@healthdataservices.com

View Replies !    View Related
How Do I Stop This From Looping?
Hi,

I'm trying to make this movie clip play in random intervals using setInterval. However I cant seem to stop it from looping. Im guessing every time the instance of that MC is called it executes the function again. Anyways here is the source file for u to look at:
crast.us/tatsumaki/block_test.zip

Any help is much appreciated!
Dan

View Replies !    View Related
Stop The Looping
when i test the movie, it loops, How do I turn that off before testing the movie, or importing it to dreamweaver.

View Replies !    View Related
Stop Looping
I just got a button working in AS 3.0 (thanks to these forums)

Now the only problem is that the SWF loops anyway so the button is useless. I do not want it to loop, how do I stop this from happening?

View Replies !    View Related
Stop Looping
Does anyone know how to stop looping with this file? http://www.flashden.net/files/38139/preview.swf

View Replies !    View Related
Stop Swf From Looping. How?
Hi all, I have a problem here with my swf animation looping constantly.

Code:
if(brick.hitTestObject(ball)) {
brickChannel = brickSound.play();
brickDelete.x = brick.x;
brickDelete.y = brick.y;
addChild(brickDelete);
bricks.splice(i,1);
removeChild(brick);
That's the loop where I insert the animation and playing it. brickDelete is the animation using brickDelete.load(url). The animation plays at the right position as I want it, now I just need it to play only once and I'll be happy =(

Can anyone help me out on this?

Wiinis

View Replies !    View Related
Cant Stop Looping
I cant stop my flash from looping. When i import a flash file it exports it looping even when it didn't befor. I can't find where to stop it. Im useing Adobe Flash CS3.Pleaze help





























Edited: 07/13/2007 at 04:06:22 AM by ruzztec

View Replies !    View Related
How To Stop Looping
hi... I hope someone can offer some simple advice how to stop my nmovie from looping back to the beginning. I have wroitten and action script to start it with a mouse event, but how do I stop it when it has run to its 30 frames automatically ?

View Replies !    View Related
How To Stop Looping?
A web page I'm working on has a simple swf placed into a template layer that I want to play once and then stop, as it's text content. The swf itself has a stop action on it, but despite this, whenever I test the template movie, the embedded swf loops. I've unchecked every loop playback function I could find, and even tried putting a stop action on the swf layer, all to no avail. Any troubleshooting advice given would be greatly appreciated so I don't pull any more of my hair out.

View Replies !    View Related
How Do I Stop Looping?
Hey all users,

hopefully someone is able to help me. I cant seem to get my exported Flash movie to play properly. When clicked on the buttons I have made, should send you to the next scene, but instead of stopping there the movie just rolls ahead in a very quick tempo. Why do you think that is, when I have written "go to and stop"? What am I missing here? Any ideas?

- C

View Replies !    View Related
Stop Looping?
Hi guys

ok here's the thing i have a movie clip all done from the time line it also has
3 buttons spinning in the center of the stage. my issue is i want to stop the entire movie except the spinning buttons i tried using ' stop(); ' in the keyframe but it stops the entire movie also tried using it in the actual movie clip outside of the time line please lend some assistance in the issue and bare in mind i'm a nubee


thanks in advanced

View Replies !    View Related
How Do I Stop Looping
I put my flash movie on my web site, but how do I stop it from looping?

View Replies !    View Related
Stop Looping?
Whenever I add more than one frame to my website it loops repeatadly, as in it never stops. Is it something wrong with the code? The software? Am I going insane?

View Replies !    View Related
How Do I Stop This From Looping
function stopIt() {
duration == 208
ns.pause();
}

Tired this... and I had no luck... how do i tell this player to stop at the end of the clip

thanks in advance...

http://azulinteractive.com/video_basics_8_FINISHED.fla (the .fla)

View Replies !    View Related
How Do I Stop This Looping
Hi,

I'm trying to make this movie clip play in random intervals using setInterval. However I cant seem to stop it from looping. Im guessing every time the instance of that MC is called it executes the function again. Anyways here is the source file for u to look at:
crast.us/tatsumaki/block_test.zip

Any help is much appreciated!
Dan

View Replies !    View Related
Stop Looping?
just simple probably, but how can i get the movie to stop looping. i made a short movie and just want it to end with a link at the end. another question: how do i make a hyperlink that changes color when mouse over? thanks

View Replies !    View Related
Can't Stop The Looping
I have some simple animation at the begining of my site, where the navigation fades in. i can't figure out how to get it to stop once it has faded in completly, because the film starts over again...

View Replies !    View Related
Stop Looping?
Hi guys

ok here's the thing i have a movie clip all done from the time line it also has
3 buttons spinning in the center of the stage. my issue is i want to stop the entire movie except the spinning buttons i tried using ' stop(); ' in the keyframe but it stops the entire movie also tried using it in the actual movie clip outside of the time line please lend some assistance in the issue and bare in mind i'm a nubee


thanks in advanced

View Replies !    View Related
How Do I Stop This From Looping
function stopIt() {
duration == 208
ns.pause();
}

Tired this... and I had no luck... how do i tell this player to stop at the end of the clip

thanks in advance...

http://azulinteractive.com/video_basics_8_FINISHED.fla (the .fla)

View Replies !    View Related
Help Stop Looping
Thanks for taking the time to read my question.

I have finally figured out (with a lot of help) how to make a button change color on mouse over.

It works great, except it keeps looping over and over. I would like it to change color once, and stay at the new color until I take my mouse away.

Stop The Loop!

I have tried to attach the test file I am working on, hopefully it is there for you to see what I've done. Please describe how to stop the loop.

Thanks,

Brad

View Replies !    View Related
Stop The Looping
It appears the default setting for a flash movie is looping. How do I turn this feature off? I just want my intro to play once.

Thanks

View Replies !    View Related
Stop Movie Looping
How do I stop the movie from looping when it starts??? is this possible???

View Replies !    View Related
Stop Looping On .exe From Projector
I have just created a lengthy presentation that will be used as a demo for my company. The problem I have is the presentation will be burned onto a CD using the projector .exe file. How do I stop the presentation from looping because I have links that are to be clicked?

Any help on this would really be appreciated.

Snydes

View Replies !    View Related
***How Do I Stop My Movies From Looping?***
Simply put on this try, how do I stop my movies from looping?

Sorry for the *s in the post title but I get little response when I write.

View Replies !    View Related
Brower It Keeps Looping How Stop It?
I stop the looping when I view it in the swish player but when I run the .swi file in my browser it keeps looping..How do I stop that...Thanks!

Tim

View Replies !    View Related
Looping Does Not Stop In Netscape?
Help!
I'm am kind of a newbie in this flash technology.
I created a flash(5) intro, when I publish and view it in IE5 the movie does not loop. But when I load that same page with NEtscape ver.6 it loops indefenitly.

In my HTML I made sure to insert the following:
<PARAM NAME=loop VALUE=false>

but it still loops. I also made sure to clear the cache.
Am I missing some parameter? How can I stop looping in Netscape?

Thanks in advance.
AG

View Replies !    View Related
Stop Looping Sound
How can I stop a looping sound with actionscript?
In the "sound movie" are 2 layers - 1 with sound and the other with frames with labels and actions. The first frame has stop() and is labelled as stop. Why is this not working:

tellTarget ("_root.snd") {
gotoAndStop("stop");
}

thx!

View Replies !    View Related
How Do I Stop My Page From Looping
After my page is made it loops. I don't want it to loop. Where do I change this?
Thanks.
-Jay

View Replies !    View Related
Video Won't Stop Looping...
I imported a video file and it rubns for 270 frames...I'm trying to send it to frame 2 afterwards with a keyframe at 271, and a
Gotoandplay - (Scene 2, 1) action...but it won't work...


help...!

View Replies !    View Related
Swish - Stop Looping
I just started using Swish. I have 3 elements on the scene with added effects. I would like to play effects only once when the web site is loaded, but I don't know how. All effects are looping. How to stop it. I have unchecked "loop preview animation" and it's still the same. Plese help :-)

View Replies !    View Related
How To Stop A Looping Soundclip
mornin allz,

just some sort of little problem.

well, i have a movieclip, completly emtpy, just a sound at frame 2 with a stop(); and a stop(); at frame one (Empty frame)

_root.MovieClipName.gotoAndPlay(2); starts the sound

_root.MovieClipName.gotoAndStop(1); don't stops the sound (WHY?)

the sound which is looped 80000 times, nearly endless, won't stop when i give the movieclip the command to jump to an emtpy frame.

just tryed it with new Sound();crap to directly stop that, hasn't worked that properly, and it really sucks on the scriptet way.

any ideas for that, i'm at my end of knowledge.

regards )

View Replies !    View Related
Why Is It Looping, Only Once, And I Have A Stop Action In It.
Helllooooooo it's been forever since I posted.

I am having one heck of a time here.

I have a main timeline with 25 frames, with a stop action on the last frame.

On this timeline I have a movie clip which is 15 frames long.
This movie clip contains a tween, and also contains a stop action in its last frame.

WHen I play my movie, the movie clip loops ONCE, then stops.
It is looping back to frame one of the movie clip (i did a test and found this out.)

Sooo i created a new flash movie and did the same thing, and that one is working fine.

What on earth can be going on here?? Thanks for any help!

Sam

View Replies !    View Related
Stop A Movie From Looping?
hi,

i have a movie file embedded in my flash document that i would like to stop looping so that a button within that movie file can be clicked. otherwise, it keeps going around and around without just stopping.

the general idea is that my file first opens with things flying in, representing the background, and then in the middle of that, a movie starts playing which involves a series of words fading in that ask the viewer to click in order to continue. i want the movie to pause there until the user clicks the button. i have a button made and everything, and the action works when its clicked, i just cannot figure out how to make the movie pause and wait for the viewer to click on it.

if this is not enough information, please email me or IM me at thesilly@aol.com thank you very very much!

View Replies !    View Related
Copyright © 2005-08 www.BigResource.com, All rights reserved