Starting/Stoping A Loop On Enterframe And Exit
i am trying to get a scrolling menu (scrolls on x axis) to stop scrolling when the user exits the menu area, and start again when they enter again. i have tried using hitTest commands and am stumped. any ideas? anyone? i am using the script ss shown below
onClipEvent (load) { nScreenWidth = 700; nMaxRate = 15; function moveLeft (nPixels) { this._x -= nPixels; if (this._x<0-nScreenWidth) { this._x = 0; } } function moveRight (nPixels) { this._x += nPixels; if (this._x>0) { this._x = 0-nScreenWidth; } } } onClipEvent (enterFrame) { if (_root._xmouse<nScreenWidth/2 && _root._xmouse>0) { moveRight(nMaxRate-_root._xmouse*nMaxRate/(nScreenWidth/2)); } else { if (_root._xmouse>nScreenWidth/2 && _root._xmouse<nScreenWidth) { moveLeft(_root._xmouse*nMaxRate/(nScreenWidth/2)-nMaxRate); { } } } }
onClipEvent (enterFrame) { if (this.hitTest(_root._xmouse, _root._ymouse, true)) this.nMaxRate = 15; else{ if (this.hitTest(_root._xmouse, _root,_ymouse, false)) this.nMaxRate = 0; } }
FlashKit > Flash Help > Flash MX
Posted on: 12-03-2004, 02:06 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
External SWF's Starting And Stoping
I have five buttons that each load an external SWF when clicked. The external SWF is nothing more than an audio file. The problem is that when someone clicks a button and clicks another button before the first SWF/audio clip has played, you hear both clips.
How can I make it so that as soon as a second button is clicked, the first SWF unloads?
The current code I am using is this:
on (release)
{this.contents.loadMovie("97X.swf");
stop();
}
with the name of the SWF being the only thing that changes for a different button.
Thanks
Stoping/starting An MC's ActionScript
Hello,
I have a nested MC that functions as a continuous slider; when you mouse right of center it slides one way and when you mouse left of center it slides the opposite direction. Right at center it stops. The problem I have is that I'm using this as a menu at the bottom of a .swf and there are other places to mouse on the page, which means that this menu is constantly in motion even when it's not being used. I want it to stop when it isn't being used, only because it's an MC I can't use the onMouseOut command to stop the clip. I tried making a button that targets the clip and stops it when you roll over the button but it doesn't work. Not sure what I need to do but sure would appreciate any and all help.
Here's the script I'm currently using:
onClipEvent (mouseMove) {
xcenter = 467.5;
speed = 1/25;
}
onClipEvent (enterFrame) {
var distance = _root._xmouse-xcenter;
_x -= (distance*speed);
}
onClipEvent (enterFrame) {
var distance = _root._xmouse-xcenter;
_x -= (distance*speed);
if (_x>0) {
_x = -935;
}
if (_x<-935) {
_x = 0;
}
}
-Thanks,
Llyfre
Stoping/starting An MC's ActionScript
Hello,
I have a nested MC that functions as a continuous slider; when you mouse right of center it slides one way and when you mouse left of center it slides the opposite direction. Right at center it stops. The problem I have is that I'm using this as a menu at the bottom of a .swf and there are other places to mouse on the page, which means that this menu is constantly in motion even when it's not being used. I want it to stop when it isn't being used, only because it's an MC I can't use the onMouseOut command to stop the clip. I tried making a button that targets the clip and stops it when you roll over the button but it doesn't work. Not sure what I need to do but sure would appreciate any and all help.
Here's the script I'm currently using:
ActionScript Code:
onClipEvent (mouseMove) { xcenter = 467.5; speed = 1/25;}onClipEvent (enterFrame) { var distance = _root._xmouse-xcenter; _x -= (distance*speed);}onClipEvent (enterFrame) { var distance = _root._xmouse-xcenter; _x -= (distance*speed); if (_x>0) { _x = -935; } if (_x<-935) { _x = 0; }}
-Thanks,
Llyfre
Starting/Stoping Sound Effects
Hi all,
I have a sound effect playing when a movieclip hits another movieclip like as a sound effect... the sound is attached using the following on one of the movieclips:
Code:
sound_1 = new Sound();
sound_1.attachSound("pigbag");
sound_1.start();
How can i go about allowin the user to turn the sound effects on and off, i have an image they can press, i have tried to following code but its not working:
Code:
on (release){
stopAllSounds();
}
and
Code:
on (release){
sound_1.stop();
}
Does anyone know why these are not working?
Problems Starting And Stoping A Sound... Help A Newbie Please
Hi,
All I want to do is add two buttons that will stop and start sound.
Here's what I've done:
I created two buttons and added the following action script to each one.
on (press) {
Sound.stop();
}
on (press) {
Sound.start();
}
The sound name is "Sound". I thought that by reffering to the sound name and the stop or start methods, I could control the sound... I guess not! Can anyone help?
Regards
Nelson Cardoso
Overlaping Movie Clips - Removing, Starting, Stoping
i have 3 buttons that load a different movie in the same spot on the stage. movies are loaded by 3 different buttons that have this script:
on (release) {
tellTarget ("vidone") {
play();
}
}
for other 2 buttons "vidone" is relpaced by different movie clip names.
Movie clips (which are embedded QuickTime movies) play when you click a button. that part works. But they are meant to play one at a time. And when the user clicks on a new button the old movie should clear out and the new movie begin.
How can i stop and remove a movie clip when a button is pressed signaling the choice of a new movie? what is the best way to do this.
i am a beginner at action scripting and would appreciate the help. i've read about duplicating and removing but it doesn't seem to apply. or does it. not sure how to work this one.
75% thanks in advance.
josh
HELP: Stoping Buttons Loop, But Playing Bg Music?
Dear fellow FlashKit members...
I'm using Flash MX (v6) and am a student doing a project...
I have a question:
When any scene opens, a few object fly in from the sides... by tweening; But I made an 'actions' layer and did a 'stop' so they would not reloop... and keep on flying in...
However I want to have music in the background, but it too stops because of the 'actions' layer which is supposed to stop the objects from keep on flying in more then once...
But I want the music layer to keep on playing...
How can I accomplish this?
End Script In Enterframe Loop
Is there a way of running a line of script just once on an (enterframe)and once it's completed, it skips it the next time around.
Example:
onClipEvent (enterFrame) {
this._width = Math.ceil(this._width+accelwidth);
if (this._width eq endwidth) {
this._height = Math.ceil(this._height+accelheight);
}
if (this._height eq endheight) {
trace("hello");
}
}
I only want it to say "hello" once. Not keep tracing it.
Can anyone help?
Don't Want To Loop In OnClipEvent(enterFrame)
Ok. I have two MCs. One a red ball, another a blue. On the red ball, (ball_mc) I have keyboard movement with the arrow keys. I also have the fallowing code on it:
if(this.hitTest(_root.ball2_mc)){
play();
if(ball_mc._currentframe == 6){
stop();
}
}
if(!this.hitTest(_root.ball2_mc)){
_root.ball_mc.gotoAndStop(1);
}
ball2_mc is the blue ball, which is stationairy for now, for testing purposes until later. When the two collide, the red ball should animate and stay at the last frame of that animation (of the red ball shrinking, or imploding kinda), and not do the actions in the hitTest until it's not touching anymore. The red ball turns into a red dot, but it loops the animations over and over because hitTest keeps returning true. I just want it to do that little animation once, then stop if it's still touching the ball.
Thanks in advance
Exit A For Loop
I have a for loop taht pretty much searches an array for something, but I want when it finds what it is looking for stop the for loop. How do I do that?
[F8] Loop Exit
How do you exit a for loop with code? The equivalent of VB for Exit For or exit loop.
Example
For(i=0;i<20000000000;i++){
//run something
If(q>500){
//Exit loop, how do you do this.
}
}
How Do I Exit An AS Loop
Ok I have a loop setup pulling in images. Right now I have it setup to loop constantly, I want to jump out of the loop once it reaches a max number, I wrote a function that jumps out of the loop. I added a stop command but its not working, the loop still continues. Now if I add gotoAndPlay(2); to the stop function everything works well kind of??
Im thinking I need to call onMotionStopped or semething like that, im running AS tweening on my images
Making A Reliable Loop (not DO, FOR Or EnterFrame)
Hi all,
I'm trying to make a function happen -
Code:
function moveClip(clipname) {
do {
clipname._y += (clipname._y /2)
} while (clipname._y < 46)
}
when a button is pressed but DO loops seem always to crash the player. FOR loops are no use because they happen too quickly.
I'm trying to get an MC to move to a certain position dynamically when a button is pressed, then move back when another is pressed. I know i can do this using onClipEvent(enterFrame) but it means messing with different frames of each MC having different scripts in the onClipEvent part (to move it back and forward) and that's clumsy as hell, not to mention a lot of work.
Surely there is a more streamlined way to make a loop, so when the button is pressed, the function checks the _y value of the clip and moves it accordingly until it's in place.
Thanks in advance for any help
-meph-
Trying To Kill OnClipEvent(enterFrame) Loop
Here is my code and what I've tried so far:
Code:
onClipEvent (load) {
gravity = 2;
floor = 585;
bounce = 0.15;
speedy = 57;
function bounceEffect() {
trace("function running");
speedy = speedy+gravity;
this._y += speedy;
if (this._y>floor) {
this._y = floor;
speedy *= -bounce;
}
}
}
onClipEvent (enterFrame) {
bounceEffect();
trace("speedy="+speedy);
trace("enterFrame running");
if (speedy>-.27 && speedy<-.25) {
trace("it is!");
bounceEffect = null;
}
}
When I run this I have 3 traces going - the one inside bounceEffect() stops, but the other 2 inside the enterFrame keep going forever. Is there a way to make that stop? I've attached it if anyone wants to see the actual file.
OnClipEvent - Enterframe Creates Infinite Loop?
I am using the script below to get some data through a Cold Fusion file. Anyway, what happens is that if I use enterFrame on the MC this is attached to, It creates an infinite loop and slows everything way down. If I change the event to 'load', it doesn;t work.
Any Ideas to make it enterFrame once and stop??
onClipEvent (enterFrame) {
FlashLotID = 1;
#include "LotIndicator.as"
}
Thanks
Chad
On EnterFrame Or Frame Loop... What Is Most Speed Efficient?
Has anyone done any test on it? I'm working on a project where I've used onClipEvent(enterFrame) alot, but it's getting very heavy on the cpu... I'm wondering wether I should take the time to rewrite everything to use frame loops (frame 1; do something, frame2; gotoAndPlay(1)), or not....
--
@ndre
Execute An Animation Loop Within EnterFrame Keylistener
Guys,
Need some help in figuring this out. I have this simple fighthing game im scripting in actionscript 3. mcPlayer is the name of my player mc where all the keyframe animation of the character are stored.
Im having problem scripting the heavy punch which requires 26 frames of animation. everytime when, the heavypunch key is hit, i will trigger a loop to complete the animation.
The problem is, this entire thing is running in a game loop, i need to somehow create a delay so that, the animation can be completed. Right now, the character is always playing the first frame of the sequence everytime i hit the punch button. below is the sample code.
ActionScript Code:
public function gameLoop(event:Event) {
checkKeys();
moveObjectInMemory();
render();
}
public function keyUPFunction(event:KeyboardEvent) {
if (event.keyCode == 37) {
arrowLeft = false;
} else if (event.keyCode == 39) {
arrowRight = false;
} else if (event.keyCode == 38) {
arrowUp = false;
} else if (event.keyCode == 40) {
arrowDown = false;
} else if (event.keyCode == 32) {
lightPunch = false;
} else if (event.keyCode == 88) {
heavyPunch = false;
}
}
public function keyDOWNFunction(event:KeyboardEvent) {
if (event.keyCode == 37) {
arrowLeft = true;
} else if (event.keyCode == 39) {
arrowRight = true;
} else if (event.keyCode == 38) {
arrowUp = true;
} else if (event.keyCode == 40) {
arrowDown = true;
} else if (event.keyCode == 32) {
lightPunch = true;
} else if (event.keyCode == 88) {
heavyPunch = true;
}
}
//Below is the problem
public function checkKeys(){
if(heavyPunch){
move_index = 0;
while(move_index < 26){
move_index++;
mcPlayer.gotoAndPlay(61+move_index);
}
heavyPunch = false;
}
Anyway, have experience in handling this?
OnClipEvent EnterFrame Stop Loop Problem
I wasn't sure how to name this thread to well. Ah well. Here's my funk:
I have made a photo slide show and all works well for browsing and viewing. Where I got stuck was when I tried to write code that would center images that were vertical. This is the entire code on the empty mc that has it preload, display then adjust the x of the image. Now, with this code if the image is vertical it flies off the right of the page. haha. sounds fun eh?
ActionScript Code:
onClipEvent (enterFrame) { total_bytes = this.getBytesTotal(); loaded_bytes = this.getBytesLoaded(); remaining_bytes = total_bytes-loaded_bytes; percent_done = int((loaded_bytes/total_bytes)*100); _root.loaderim.gotoAndStop(percent_done); if (total_bytes == loaded_bytes) { if (this._width<this._height) { this._x = this._x+(this._width/2); } else { this._x = 149.8; } }}
I've been playing around with a few alternatives to stop the loop once it has changed the _x position but haven't figured out the best way. I'll figure it out sooner or later but i find whenever i post on here someone tends to beat me . Ok, well thanks in advance to anyone who can help out. The race is on!
OnClipEvent EnterFrame Stop Loop Problem
I wasn't sure how to name this thread to well. Ah well. Here's my funk:
I have made a photo slide show and all works well for browsing and viewing. Where I got stuck was when I tried to write code that would center images that were vertical. This is the entire code on the empty mc that has it preload, display then adjust the x of the image. Now, with this code if the image is vertical it flies off the right of the page. haha. sounds fun eh?
ActionScript Code:
onClipEvent (enterFrame) { total_bytes = this.getBytesTotal(); loaded_bytes = this.getBytesLoaded(); remaining_bytes = total_bytes-loaded_bytes; percent_done = int((loaded_bytes/total_bytes)*100); _root.loaderim.gotoAndStop(percent_done); if (total_bytes == loaded_bytes) { if (this._width<this._height) { this._x = this._x+(this._width/2); } else { this._x = 149.8; } }}
I've been playing around with a few alternatives to stop the loop once it has changed the _x position but haven't figured out the best way. I'll figure it out sooner or later but i find whenever i post on here someone tends to beat me . Ok, well thanks in advance to anyone who can help out. The race is on!
Music Loop After Starting Wrong
So I was making my site with my barely minimum flash skills. Instead of working with scenes, I've worked with different projects. So I have a few number of files which make up my site. Now I want to loop some music, but don't know how to do it with it being cut when you go to another page. So I tried to make the scenes, copying and pasting timelines from the other pages to the new scenes timelines, but when doing that all the symbol attributes were lost.
Damn I'm babbling. Anyway, but I want is continuous music. Anybody can tell me how to have that over different html files, or how to turn those files into scenes wihtout losing the attributes? Or any other solution you can think of? Thanks.
Possible To Exit Out Of Actionscript? - Similiar To PHP's Exit Function
Hi
Is it possible in actionscript to do something like this? I have a lot of functions in my project which display various screens of my project. At the start of each screen I run a function to check out certain things (EG is user banned etc etc). What I want to happen is if those actions are true then to jump to a another function, run it, and then stop all processing of any further scripts. EG Below:
function show_screen () {
_level0.check_settings();
Some more code under the show_screen fuction.
}
At the moment it runs through the check settings function and would then carry on with the rest of the code under the show_screen function. What I want to happen is the ability to exit out of processing anymore scripts should a condition = true in the check_settings() function. Something siliar to PHPs exit() function which stops all processing would be very handy.
Can anyone help?
Thanks.
Possible To Exit Out Of Actionscript? - Similiar To PHP's Exit Function
Hi
Is it possible in actionscript to do something like this? I have a lot of functions in my project which display various screens of my project. At the start of each screen I run a function to check out certain things (EG is user banned etc etc). What I want to happen is if those actions are true then to jump to a another function, run it, and then stop all processing of any further scripts. EG Below:
function show_screen () {
_level0.check_settings();
Some more code under the show_screen fuction.
}
At the moment it runs through the check settings function and would then carry on with the rest of the code under the show_screen function. What I want to happen is the ability to exit out of processing anymore scripts should a condition = true in the check_settings() function. Something siliar to PHPs exit() function which stops all processing would be very handy.
Can anyone help?
Thanks.
Enterframe Conflict With Ext Enterframe
I have this external .as file that I am using in conjunction with my code.
The problem I think is that both my code and the .as file use the enterframe event.
How do I get around ......
Well I thought about it for once and I came to a hack solution.
I just placed a mc called my_mc on the stage and then used the following code
my_mc.onEnterFrame = function () {
instead
Please Help MC Not Stoping.
Ok this is what I am trying to do:
User opens a Movie Clip (MC). When the MC finishes it stops the animation/close the window/open url. This is the script I used:
stop();
fscommand("quit");
getURL("http://www.cutxtwister.org/index1.htm","_blank");
Inside the MC there is a "skip intro" button. When a user clicks on the button the animation will stop/close the window/open url. This is the script I used:
on (release) {
stop();
fscommand("quit");
getURL("http://www.cutxtwister.org/index1.htm","_blank");
}
Now this is what I want it to do but it does not do it. When the user opens the MC and it finish it does not stop or close the window but it gets the url.
When the user clicks the skip intro button it does not stop or close the window but it gets the url.
What am I doing wrong?
Any help is appreciated!
Thanks!
Daniel
Stoping An MC
HI Guys and Gals.
I have an "intro" that contains a MC called "Piclinemove".
this "piclinemove" is a collection of buttons that are moving from the left to right.
when i position the mouse over the buttons the movement stops, when i move the mouse the MC starts to play.
this is the code i am using.
on (rollOver) {
_root.information.piclinemove.stop();
}
on (rollOut) {
_root.information.piclinemove.play();
}
on (press) {
getURL("http://www.yahoo.com");
}
now the problem i am having.
This intro is loaded in to the main Website.
Once it is loaded the code stops working.
the MC still works it moves from left to right but when i position the mouse over the buttons nothing happens.
do i need to change the code?
will someone please give me an exsample on how to do it.
thank you
Vahe
Stoping DuplicateMovieClip ?
I have this action for frame 1. I would like to stop this action at the frame 20 for exemple, and restart at frame 30 and stop at frame....
U know what I meen. And sorry for my bad english.
thanx
count = 1;
while (count<20) {
_root.ovale.duplicateMovieClip("dupovale"+count, count);
_root["dupovale"+count]._x = random(550);
_root["dupovale"+count]._y = random(200);
_root["dupovale"+count]._xscale = random(150);
_root["dupovale"+count]._yscale = random(150);
_root["dupovale"+count]._alpha = random(100);
count += 1;
}
Stoping All Movieclips
hi!
i'm using a JavaScript interface to handle a flash movie. i need to stop all the movieclips within this movie. now, i'm using FSCOMMAND TStopPlay("/name") and it works fine, but my problem is, that i DON'T know how many movieclips are there in the movie, or what their names are. i thought i could get a name of an unknown movie by using GetProperty of the _name property, but evidently it doesn't asign the instance name to the property _name automatically...
so - anyone has an idea how to "run" through the movieclips collection and identify their names?
thanks in advance,
lazerman
Help - Stoping GetTimer()
Hi there,
This is probably a really easy question for many people but it has me stuck.
When the file is loaded (i.e. percent == "100%")
I want to stop the getTimer function so I can tell how long the file too to load.
Any idea's?
onClipEvent (load) {
total = Math.round(_root.getBytesTotal()/1000);
total = total+"k"+"//";
}
onClipEvent (enterFrame) {
seconds = (getTimer()/1000);
download = Math.round(_root.getBytesLoaded()/1000);
download = download+"k";
bytesleft = Math.round(_root.getBytesTotal()-_root.getBytesLoaded()/1000);
bytesleft = bytesleft+"k";
percent = Math.round(_root.getBytesLoaded()/_root.getBytesTotal()*100);
percent = percent+"%";
// loadVariables ("test.txt", "mtv_txt");
// percent = percent + "//";
// loadingone = "total file size=" + total + "k" + "//" + "downloaded=" + download + "k";
// loadingtwo = "percentage=" + percent + "//" + "kilobytes remaining=" + bytesleft + "k";
if (percent == "100%") {
_root.gotoAndplay(2);
}
Cheers,
Sean.
}
Stoping Sounds
how do I get a movie clip to stop playing its sounds when one rolls out of a button so it doesnt continually play when I go to roll over another button?
any help would be great, thanks!
Stoping Without Stop();'s ?
My f*cked up Movie:
I'm having problems with my action script. When you click a sub-menu selection the sub-menu animation quits working. It acts really weird, sometimes tweening, sometimes the MCs overlap each other. Here's the code:
function setTopNav(x) {
if (_root.state == 0) {
_root.state = 1;
// its open
eval("_root.subNav"+x).gotoAndPlay("open");
oldx = x;
} else if (state == 1) {
// it be closed
_root.state = 0;
eval("_root.subNav"+oldx).gotoAndPlay("close");
debugText.text = "closed = "+x;
_root.on1.visible = false;
}
}
function subNavGoSafety() {
_root.zsafety.gotoAndPlay("go");
eval("_root.subNav"+oldx).gotoAndPlay("close");
}
I call subNavGoSaftey() when u click on a sub nav. The sub navs and little blur animations are MCs. Any advice would be mucho mucho apreciated!!!
-- Jennifer
http://xotex.net/jenni
Stoping A Movie?
Hi,
i am new to Flash and got that small problem:
i am trying to create a fading in effect of an object into a scroll pane. Almost everything is fine, except that the movie keep on looping (which i dont want).
I first created a movie: an object fading in and at the end i put the action stop. So this movie alone works fine, it plays once and stop.
Then i include that movie into a scroll pane to create a new movie. The problem arise when I play the scroll pane movie... it loops forever.
How can I play that movie only once?
jo
Sound Not Stoping Help
hey guys i have three movie clips with different sounds in each. i cant get one to stop playing when the other one starts to play. how can i do this? it just has one frame in the clip so it loops, but when the user cliks a button it goes to the next frame and another soundclic mc is in it. but the one before keeps on playing...
any suggestions?
Stoping Sound...
Ok I figured out how to get the sound into the video (clicked on the frame and went to the botten and clicked on sound then selected it). Now I really don't know how to stop the music say halfway through it. I tryed clicking on one of the frames past it and creating a keyframe but alas, nothing happened.
Plz help.
Scrolling Without Stoping
I have a text box that is scrolling from a buttons. I would like to make it scroll with out have to click a whole bunch of times. I dont want to use a mask. here is the the code i use.
"to scroll up"
on (release) {
article.scroll = article.scroll-1;
}
"to scroll down"
on (release) {
article.scroll = article.scroll+1;
}
To check it out in action
http://jimmyshine.com/dennyscoupe.html
Thanks
Mike
Detecting And Stoping
Hey, i got a issue. I am building a game and I need to know how to detect a collision and when my player "MC" touches the MC or Graphic or Button to stop and remain there untill told to go another direction. If you could help me out that would be awesome, i have aim and my name is RobRocker160 if thats ezer to get ahold me and tell me.
Stoping The Animation
I have built my page and published it so I can preview it and have discovered a problem. How do I get the animation to stop and become a web page? What I have is a flock of birds coming in from the lower right and flying up to the upper left of the page dragging the header as they fly. When they fly off the page the header takes up its position and the buttons appear. it should then stop and become a functional page. but the animation just loops. I have tried to apply the stop action but it keeps telling me that an action cannot be applied? what do i do?
The whole site will be flash when it is completed. That is to say there will be a flash "movie" of the page properties,aka buttons, header, and so forth moving into place but afterward just be a regular page. Is there a way to tell the page to only play once per session? or will the pages have to load each time?
Help Stoping A Game
hi guys.
It's me again, with the collaboration of REYCO, I made a "simple" Game.
To finish the game i need some help on stoping the game:
ActionScript Code:
var theScore:Number = 0;
var theLives:Number = 3;
score.text = theScore;
lives.text = theLives;
-----------------------
if (this.hitTest(_root.Tank_mc)) {
theLives--;
lives.text = theLives;
I need a condition here to stop the game if lives reach zero value -with a "GAME OVER" text-.
ActionScript Code:
if (this._x>StageWidth+(this._width/2)) {
this._x = 0-(this._width/2);
theScore += 10;
score.text = theScore;
I need a condition here to stop the game if score reach 500 value -with a "CONGRATULATION" text-.
if you guys want to understand me better here is the game, I hope you guys can help me, thanks in advance!
Stoping The Animation
I have built my page and published it so I can preview it and have discovered a problem. How do I get the animation to stop and become a web page? What I have is a flock of birds coming in from the lower right and flying up to the upper left of the page dragging the header as they fly. When they fly off the page the header takes up its position and the buttons appear. it should then stop and become a functional page. but the animation just loops. I have tried to apply the stop action but it keeps telling me that an action cannot be applied? what do i do?
Stoping A Movieclip
How would I write actionscript for a movieclip ie box1 to go from left to right and stop at
position say 200 on the stage so far I have
box1.onEnterFrame = function() {
this._x++;
};
Thank You
Stoping A Tween
I made a tween effect and after the tween i tryed to put a stop action to stop the tween after it has played but the tween dosn´t stop. What AS should i use to stop a tween fromn looping?
Stoping Countdown
Hi! I've created a date countdown, with help from here-and-there, it's pretty okay now, but the only thing I couldn't do, is to make it stop, jump to nextFrame, of do anything once the countdown is done. Coluld you help me out with this? Is very important for me. Here is my source: http://www.2rdesign.com/help/countdown(1).zip
Thanks a lot!
Stoping A Movieclip
How would I write actionscript for a movieclip ie box1 to go from left to right and stop at
position say 200 on the stage so far I have
box1.onEnterFrame = function() {
this._x++;
};
Thank You
Stoping A Tween
Hi again lol
i made a tween effect and after the tween i tryed to put a stop action to stop the tween after it has played but the tween dosnīt stop. What AS should i use to stop a tween fromn looping?
Stoping Countdown
Hi! I've created a date countdown, with help from here-and-there, it's pretty okay now, but the only thing I couldn't do, is to make it stop, jump to nextFrame, of do anything once the countdown is done. Coluld you help me out with this? Is very important for me. Here is my source: http://www.2rdesign.com/help/countdown(1).zip
Thanks a lot!
Stoping Rewind
could you please tell me how to stop a swf file from playing after its started playing. what i have done is i have got a video of the band i play in and converted it to swf. now i can automatically load it and understand layers. i know how to unload it. i want to know how users can just stop the file by creating a button and start where it has just stopped. and also rewind and fast forward. sorry if this seems to go on.
rob
Stoping Interval
if I call this:
setInterval(functionX, 1000);
how can I stop it????
Stoping MC At Totalframes
i have a scroller that enables the user to scale a movie up or down on the stage once the mc has stoped playing.
but when the mc goes to it last frame it does not stop there it goes back to the the 1 frame of the scalable movieclip. How can i stop this from happening?
heres my code so far
thanks
Code:
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
startDrag("", false, left, 0, _parent.timeline._width-5, 0);
}
}
onClipEvent (mouseUp) {
stopDrag();
}
onClipEvent (load) {
if (value<100) value++;
_parent._parent[_parent.movie].play();
totalFrames = _parent._parent[_parent.movie]._totalframes;
maxScale = _parent.timeline._width-5;
spacing = maxScale/totalFrames;
spacingMovie = totalFrames/maxScale;
}
onClipEvent (enterFrame) {
if (move == true) {
frame = Math.round(_x*spacingMovie);
_parent._parent[_parent.movie].gotoAndStop(frame);
} else {
setProperty("", _x, Math.round((_parent._parent[_parent.movie]._currentframe-1)*spacing)+1);
}
if (_parent._parent[_parent.movie]._currentframe == _parent._parent[_parent.movie]._totalframes) {
_parent._parent[_parent.movie].gotoAndStop(1);
}
}
onClipEvent (mouseDown) {
if (_parent.timeline.hitTest(_root._xmouse, _root._ymouse)) {
move = true;
} else {
move = false;
}
}
onClipEvent (mouseUp) {
move = false;
}
Stoping An MC From The Main Timeline Without Stoping The Main Timeline
My problem is i have a MC that i need stoped or better yet paused when the user puts the cursor over it, and then started again when the cursor leaves the clip. What i have done so far is this: Put a button within a movie clip, then put the movie clip on the main timeline.
The only thing i could think of to get it to stop would be something like:
on (rollOver) {
movieClip.stop();
}
It doesnt work so any help on this is appreciated..
|