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




Simple One. This Code Won't End/stop Looping



onClipEvent (enterFrame) {
this._alpha = _alpha+1;
if (this._alpha>=100) {
setProperty("this", _alpha, "100");
}
}

Its a movie which starts at 0 and i want it to stop when it gets to whatever i specify in the >= (and then set the property to that ammount so it stays there)

Presently the image just becomes more and more opaque without stopping.

ta!



ActionScript.org Forums > ActionScript Forums Group > ActionScript 1.0 (and below)
Posted on: 09-04-2007, 05:44 PM


View Complete Forum Thread with Replies

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

Simple Way To Get Movie To Stop Looping?
whats the simplest way to get my movie to not loop??
(kind of a pathetic question, but im a n00b, what can ya do?)

thank you thank you
-matt

Simple ._rotation Code To Stop..
hmm..

if i have a backround effect spining ( mc._rotation +=0.5; )

how can i call for this to stop?

Code For A Simple Stop/play Button
Hello All,
I've created a product demo in flash and now the client would like to add a "pause" button so the viewer can pause the demo at any point. I am new to ActionScript 3 and really need some help figuring out how to add this functionality. I tried searching the forums but I could not figure it out.

The demo has a voiceover audio track that would need to be paused as well, in case that matters for the AS code.

Many thanks.

Need Simple Code For A Button (go Back 30 Frames And Stop)
http://butlerbuildinganddesign.com/gallery.html

My goal is to get my "back" button to bring viewers back 30 frames in the clips_mc for each hit and STOP. (30 frames is approxwhere each image should be at 100% alpha)

the buttons are in the clips_mc (the clip transitions) which I placed on the stage as one mc. my other buttons work fine.

restart:
Code:

on (release, keyPress "<Up>") {
   gotoAndPlay(1);
}


play:
Code:

on (release, keyPress "<Right>") {
   play();
}


stop:
Code:

on (release, keyPress "<Down>") {
   stop();
}

I would attach the fla file if I knew how.
This should be fairly simple, right. I'm very limited in my as. knowledge. But I know I should be able to do this.
Thanx a Mil-
Bobbi Jo

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);

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

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

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

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

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

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>

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

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.

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.

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

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?

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

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

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

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

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?

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

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

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

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.

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?

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

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

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

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

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 ?

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.

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

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

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

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?

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)

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

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

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...

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

Can't Stop Looping...
//Banging head against wall
I've got a movie with 3 scenes. Scene 1 is basicly a preloader which contains a button on the last frame which when clicked takes you to the first frame of Scene 2.
The last frame of Scene 2 contains a button, which when clicked takes you to the first & only frame of Scene 3.
I have a stop() action in frame 1 of Scene 3 but the movie loops back to Scene 1.
I can't for the life of me figure out why.
You can view the problem I am having here:
http://www.morter.com/healthweekend.php
Any ideas on what is causing this would be greatly appreciated.

http://www.Morter.com

Stop Looping
How can I stop a clip from looping? I made a clip with the stop(); thing in a layer I called "actions" and it works fine. It only runs once. It's whem I import this clip to a diferent flash movie that I have the problem: I can't make it stop looping. Must be simple... Anyone? Thank you.

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)

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

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

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

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

***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.

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