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




Why Why Why... The Stop() Won't Work



I have a stop action on frame1, and a modular MC with a progress script on it, but when I put actions on that MC it the stop action in frame1 stops working.

the script on the MC is as follows...

onClipEvent(load){
_parent.MCprogress=0;

}

onClipEvent(enterFrame) {
var MCtotal=_parent.getBytesTotal();
var MCloaded=_parent.getBytesLoaded();
//make sure movie has begun loading
if (MCtotal > 4 && MCloaded >4) {
_parent.MCprogress = Math.round((MCloaded/MCtotal)*100);
// @ 100% loaded
if (_parent.MCprogress == 100){
_parent.gotoAndPlay(2);
trace("done");
}
}
}



FlashKit > Flash Help > Flash ActionScript
Posted on: 12-02-2004, 04:49 PM


View Complete Forum Thread with Replies

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

How Can I Stop THIS Movie? This.stop() Does No Work?
I try to stop a small movieclip writing

onclipEvent(Enterframe){

if(_root.myvar==1){
this.stop();
//this._visible=false
}

}


It becomes invisible if I use the second line. But it does not stop if I use the first line.

What's the problem??

Thanks

Stop() Does Not WORK
Hello, I am making a web site on flash. Im trying to do much of it with AS.
Only on 2 movieClips I have more then 1 Frame and on the first frames
both have them stop(); command, however both those stop(); commands
do NOT work upon site load.
Anyone have any idea why this happens ?
thanks so much.

Stop Function Will Not Work...
Well like I said my stop funtion will not work. Im making a quick lil albumn that reads from a list and displays thumbnails, then when you click on it, a larger version comes up and you can browse though it.

My problem is that all my actionscript coding is in Script.as and gets included using the #include. The problem is that after the first frame it is suppose to stop. Problem is that it doesnt and just plays on to the end which is frame 5.

In my first frame I have:

#include "Script.as"
stop();

That should work, at least that is what I thought. I've added stop() even into the .as file but still no luck. Any help would be wonderful, thank you.

NeoSpawn

AS3 Stop(); Doesn't Work
Hey, I just got Flash CS3. I'm trying to get my main timeline to stop in the begining, on button press to play and at the end stop again. In AS2, you would just put stop(); on the first keyframe and stop(); on the last key frame and program your buttons accordingly. The stop(); does not work!!!! It's driving me crazy. What am I missing? I've gone through the tutorials in Flash and they don't work either. Help!

Also, if you have MovieClip that contains an animation and you don't want the movie clip to be on a continuous loop how do you stop it from playing. In AS2, I would put a stop(); on the last keyframe of the movieclip's animation. This also does not work in AS3. Any help would be great!

Thanks!

My Stop Actions Won't Work?
I have a movie and on 3 frames I have 3 stops actions where I want it to stay. When I click on a button I want it to jump to 2nd frame and stay upon closing go to frame 1 and stay. but they play at there own will. Very disheartning

Help Stop() Doesn't Work
I have been working in flash for years and this has never happened to me before. I am creating a calendar with a labeled area for each calendar, plus a labeled area for each month to load an external intro movie for the month.

There are just basic stop actions in the labeled areas and I cannot figure out why it wouldn't be working. Is there some bug in Flash 8 that I haven't been able to discover?

Stop() Won't Work? [renamed]
okay I did the full site tutorial, but I always like to be one step ahead of myself. So, I wanted to make my title swing in on top and then buttons to drop in on the left. I figured then I could load movies like the tutorial stated on the right area of the screen. Unfortunately, I then got distracted on how to get new text to the site so I took another tutorial on making blogs. Now, I have the title come across the top and the external .swf (blog) load into the empty movie on the right (no navigation yet). However the entire movie keeps looping. I put a stop in my title symbol and it won't stop??
Sorry, I noticed it is a common problem, but none of the solutions I have read worked. I must have really messed something up. It might look a bit funny because I had to shrink the document size to post the .fla. I tried zipping it but, like I said I must have screwed something up because it was like 246kb before the zip
I had a short 6 week course 3 years ago, but I am rusty and aparently we didn't learn much. In the fall I have a much better class with flash and then I won't bother you

Stop Actions Won't Work?
I hav e amovie with 3 frames I have a stop action on each and it just won't stop. It does in the beginning but after using buttons it just gets nutz and goes at its own will? Frustrated!!

Stop() Doesnt Work
Hi all

I am usually not asking such simple questions but for some reason on any simple flash, when i try to put a stop() in the first few frames, it movie plays through it as if it wasn't there. what is it? classes are not loaded on time? How do you go around it?
thanx
mg

Site Is All Screwed Up...none Of My Stop()'s Work
i don't know what happened... all of a sudden, my site isn't working. When i load in my external swf files, they play the intro transition, then get to where they used to stop, and restart at the beginning and play the transition!!! I haven't changed any code in them, except removing an mc that was bogging down theprocessor and cause the Flash Player to freeze. I have checked everything a million times, and all my coding is correct. has anyone ever heard of such a thing?... and how do i fix it?

Each site section works fine when published and played by itself...but when i load the files into the main file, they screw up!!

any suggestions?...

i will try to strip down the files and post them, though i don't know a stripped down version will help.

Stop(); Doesnt Work Fla's Included
Here are the two files .fla.

http://www.gimehost.com/BINKSo5Tc5gQ3iDEMR2U = main interface

http://www.gimehost.com/FeBjYZfq7js5kPNuuDMk = 2nd interface/control

to big to attach sorry

basicly my 2nd interface keeps playing and i want it to stop


Place in the same directory

[F8] Stop Animation, But Still Have Buttons Work?
I need to know how to stop the animation on my web page from looping, but not have the stop command affect the ability to use the buttons.

The web page:
http://www.dreamsthunder.com/hotlink/index.htm

The stop command hits after the flower-links finish blooming, but the same stop command also nullifies the ability to click on the flowers. While some of the stuff is running from movie clips, the animation on the flowers and title are in the main movie, and it would be too complicated and out of the question to make them all into movie clips... I'm hoping (and kind of assuming) there's an easier way to go about this?

Thanks much for any help~

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

Stop Action Doesn't Work
I have a simple website with five pages set up. There is no code other than the code on the first frame, plus a stop action on each section. The first thing in the code is the stop action, but it still keeps running through all the frames when I test it, and a movie clip set up in a similar way does the same thing. What could be causing this? I tried taking all the code out of frame 1 except the stop action but it didn't make any difference. I am starting to work with actionscript 3.

thanks







Attach Code

stop();

//LINKS FOR MAIN BUTTONS - ACTIONSCRIPT 3 CODE
//home button
//make new function called home which sends to home page
function goHome(e:Event)
{
gotoAndStop("HOME")
}
//make listener for home button,
//tells it to use goHome function on mouse click
btnHome.addEventListener(MouseEvent.CLICK, goHome);

//group button, name of button is btnGroup,
//name of page is "GROUP", name of function is goGroup
function goGroup(e:Event)
{
gotoAndStop("GROUP")
}
btnGroup.addEventListener(MouseEvent.CLICK, goGroup);

//reviews button
function goReviews(e:Event)
{
gotoAndStop("REVIEWS")
}
btnReviews.addEventListener(MouseEvent.CLICK, goReviews);

//clientlist button
function goClientlist(e:Event)
{
gotoAndStop("CLIENTLIST")
}
btnClientList.addEventListener(MouseEvent.CLICK, goClientlist);

//listen button
function goListen(e:Event)
{
gotoAndStop("LISTEN")
}
btnListen.addEventListener(MouseEvent.CLICK, goListen);

//END LINKS FOR MAIN BUTTONS

Stop(); In First Frame Doesn't Work. Why?
Hi!

I sometimes run in to this weird problem where my stop(); frame doesn't actually stop. I have a movieclip named NestingMc which I bring to the stage via actionscript. Inside my NestingMc I have a movieclip ChildMc. ChildMc has a timeline on it's own and on the first keyframe of that timeline I have written a simple stop(); command. But my ChildMc doesn't actually stop in the first frame it just plays to the next keyframe that has a stop(); command.

Anyone?

Stop Animation, But Still Have Buttons Work?
Hello all~

I'm making a main page for my website in Flash 8, and I need to know how to stop the animation on my web page from looping, but not have the stop command affect the ability to use the buttons.

The web page:
http://www.dreamsthunder.com/hotlink/index.htm

The stop command hits after the flower-links finish blooming, but the same stop command also nullifies the ability to click on the flowers. While some of the stuff is running from movie clips, the animation on the flowers and title are in the main movie, and it would be too complicated and out of the question to make them all into movie clips... I'm hoping (and kind of assuming) there's an easier way to go about this?

Thanks much for any help~

Play/stop Doesn't Work Properly With MC
hi there
please go to www.pasha.be
you can choose some loops at the right bottom... a LED is also playing when the loop plays, but if you push a loop one time (while the LED is playing) is stops again.... :O(
can somebody help me?
greetz
melvin

My Play, Stop, And Replay Buttons Won't Work At End Of Swf
I am converting avi/mpeg video clips to swf with our logo and player on them and have got it where it stops on the last frame, because it was looping before. The problem is that the stop, play, and replay buttons work throughout the clip, but once you get to the end they wont work. Any suggestions?


Thanks in advance,
Adam Crighton

[MX04] Buttons Under LoadMovie Still Work? How Do I Stop This?
Hi, I wouldn't say I'm an expert at ActionScript but I have some knowledge there, one thing that has always got me - because I've never been taught otherwise, is something to do with loadMovieNum.

I want the visitor to click a button which then loads another Movie clip ontop of the Movie clip where the Button is but the original button still works even though the Movie Clip is covered - how do I stop it doing this?

I have this on the button,

Quote:




on (release) {
myArt.stop();
myArt.onEnterFrame = function() {
this.prevFrame();
if (this._currentframe == 1) {
delete this.onEnterFrame;
}
loadMovieNum('/portfolio/college.swf',3 );

};
}






So College.swf loads into Level 3, over the current Clip in Level 2. It animates in over the top then in College.swf a button lets you go back, so it animates back as above only with unloadMovieNum. I got that but how do I stop the buttons on Level 2 from working while Level3 has something there?

Anyone? I sense I have to unload Level2 and load it back up from College.swf?

Preloader Causing The Stop Command To Not Work[CS3]
Hi,

I am using CS3 actionscript 2. I am having trouble with the preloader. It works, but it is causing the stop commands throughout the rest of the movie to not work. I know it is the preloader because when I remove it, it works. It is just a basic preloader. index12.fla has it with the preloader and index13.fla doesn't.

The file is located here: http://www.gregbrophydesign.com/test1/index12_13.zip

The swfs can be viewed at http://www.gregbrophydesign.com/test1/index12.html

http://www.gregbrophydesign.com/test1/index13.html

Any help would be greatly appreciated.

Thanks,

Greg

Simple Stop Script Refuses To Work - Sometimes..
So I have a couple of flash banners that I'm making, they are different sizes of the exact same thing. I used this script to stop all the animation inside a movie clip called main_ufo on the main timeline:
_root.main_ufo.stop();
_root.main_ufo.door.gotoAndStop(89);
_root.main_ufo.outterlights.stop();
_root.main_ufo.lights.stop();

This works on one of the sizes, but will not work on another size. I checked and double checked the publish settings (both are set to player 6, actionscript 2.0), made sure all the movie clips were named correctly and present at the time of the script, and I went into every single movie clip to make sure there were no conflicting scripts inside them. Still nothing. I even copied the ufo clip directly from the working banner and pasted it into the non-working banner and replaced it in the library. I tried changing all the _root.'s to this.
I've run out of ideas. It works on my 120x600 banner and doesn't on the 728x90.
If I had hair I would officially be pulling it out. Open to any ideas/suggestions at all.

Buttons Under LoadMovie Clip Still Work, How Do I Stop Them?
Hey guys,

Good an okay knowledge of Actionscript but I'm feeling in over my depth now.
http://debug.isproductions.co.uk/ is what I'm working on for myself, click the top right black square.

The black square underneath the loadMovie clip is still active and no doubt it will be the same for every other black square I turn into a button - how do I stop them working when something loads ontop.

Here is the actionscript I'm using for the button;

Quote:




on (release) {
myArt.stop();
myArt.onEnterFrame = function() {
this.prevFrame();
if (this._currentframe == 1) {
delete this.onEnterFrame;
}
loadMovieNum('/portfolio/college.swf',3 );

};
}




Likewise for me to return I'm using the exact same but 'myArt' changed to the clips instance name and loadMovie changed to unloadMovie...

Is there anyway I can get actionscript to Unload the movie underneath, or just stop the buttons underneath from working, then load them back up when I hit the back text in college.swf so it looks like it's been underneath all along? And then get it to do the original animation back in. To me I need to unload and load it again but I really can't work it out.

Any help would be a huge help guys! *fingerscrossed*

Simple Stop, Then Play OnMouseOver...doesnt Work
attached is the file. I just want the movie to stop, then play when I rollover. When I add the stop script, the "On" commands become disabled. What is wrong? I tried doing it as a button too, but it didnt work.

Please help, i know this is soo simple for some of you.

Simple Stop, Then Play OnMouseOver...doesnt Work
attached is the file. I just want the movie to stop, then play when MouseOver. When I add the stop script, the "On" commands become disabled. What is wrong? I tried doing it as a button too, but it didnt work. Please help, i know this is soo simple for some of you.

Stop Command Doesnt Work In The Main Timeline?
the stop command doesnt work in the main timeline. i have a button which has the following command
(release)
{ gotoAndPlay (1169)
}
then i have a stop command on frame 1180 and the command doesnt work at all. just keeps going past it. im going crazy (this shouldnt happen)

any ideas.?????

How Do You Stop Flash Animation & Allow Menu Buttons To Work
A site I'm designing in Flash 8 opens with a Flash animation which is followed by a three-button menu. I tried actionscripting "stop ();" on the last frame of the animation and put an instance of a button on the same frame (different layer) with this code:

on (release) {
gotoAndPlay(280);
}

as I want the button to trigger a small animation of its own beginning in the next frame. However, I get this error message:

**Error** Scene=Scene 1, layer=Work button, frame=279:Line 1: Mouse events are permitted only for button instances
on (release) {

Total ActionScript Errors: 1 Reported Errors: 1

I don't understand this because the button is an instance I pulled in from the library which I want triggered by a click of the mouse.

Please tell me what I am doing wrong.

Thanks!

How Do I Stop Flash Publishing Graphics Beyond The Work Area?
I set the dimensions of my work area in flash to the size I want, but usually some of the graphics flow over the edges. I do not want these to be visible in the final movie. How do I make sure they are not? I in affect I want to crop the movie to the size of the work area but I can not see any way of doing it.

Any help would be much appreciated.
Thanks,

Stephen

Stop Action Doesn't Work, My Animation Keeps Looping
Help!
Can anyone identify why my movie is looping even though I placed stop(); code at the end of my main timeline frame?
I just want my main stage to play a movie for a few sec. then stop the movie.
And on button click to fade out (btn including 3 movies at the same time) and go to the second stage.
But my movies keep looping twice and it will play through stage 2 and stop at stage 3.
At the end of each movie clip, I placed stop(); and this plays fine by itself when I was eliminating the problem.

Here's my code:
Code:

import fl.transitions.Tween;
import fl.transitions.easing.*;
import fl.transitions.TweenEvent;
var btnTween:Tween = new Tween(btnEnter, "alpha", Strong.easeOut, 1, .0, 15, true);
var topTween:Tween = new Tween( bg_top, "alpha", Strong.easeOut, 1, .0, 15, true);
var mTween:Tween = new Tween( m, "alpha", Strong.easeOut, 1, .0, 15, true);
var introTween:Tween = new Tween( intro, "alpha", Strong.easeOut, 1, .0, 15, true);
btnTween.stop();
topTween.stop();
mTween.stop();
introTween.stop();

import flash.events.MouseEvent;
btnEnter.addEventListener(MouseEvent.CLICK, advance);
function advance(e:MouseEvent){
btnTween.start();
topTween.start();
mTween.start();
introTween.start();
btnTween.nextFrame();
}


Above action is on the 1st frame of the button when it's fading in from 0 (fading in animatn done on main timeline)
to activate the button function, that when clicked it will stop fading in and start fading out to 0 again and play next stage.

Thanks!

Stop Action Doesn't Work Inmovie Clip In A Movie
I have a movie clip that has a stop action at the end of it. I imported it into the library of the movie I want to view it in. Yet when I play the host movie, the stop action in the imported movie clip does not work. It just loops. What's up with that?

T.

"stop" Command Won't Work
I'm working on a website and stumped. The stop command which always works won't work. I put it at the end of the timeline and the thing starts looping. The only other code I have in the site so far (I just started) is for a loader, I was thinking maybe this might be affecting the loop but maybe not.

stop();
myInterval + setInterval (preloader, 100);
function preloader () {
if (getBytesLoaded() >= getBytesTotal()){
play();
clearInterval (myInterval)
}
loader.mytext.text=Math.round(getBytesLoaded()/getBytesTotal()*100)+"%";
loader.mask._yscale = (getBytesLoaded()/getBytesTotal()*100);
}

Help!

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

[F8] Movie Plays > Stop > Reverse > Stop > Play
I am fairly new to involved action scripting. I have successfully scoured flashkit threads for years to get my answers but this one has been driving me crazy for the past couple days. I have tried numerous solutions but none of them do exactly what I am trying to do.

I am creating an online portfolio that I want to control with two buttons that will play forward on release and stop at every piece unless the user is pressing and holding down - I also would like the scrolling animation to play in reverse on press and stop at every piece unless press and hold which happens to be skateboards in this section. I am posting the .fla for this section. This is what I have been able to accomplish so far. I moved everything into the main timeline from a movie clip because I could not get that to work at all. Should I move it back to movie clip? I also want it to stop at the first board.

here is the code I was able to peice together that just plays continously without stops.

Empty movie clip on second frame.

PHP Code:




onClipEvent (enterFrame)
{
    if (_root.goBack)
    {
        _root.prevFrame();
    }
    else
    {
        _root.nextFrame();
    }
    _root.frameNo = "Frame : " + _root._currentFrame;
}







Forward button.

PHP Code:




on (press)
{
    _root.goBack = false;
}







Reverse Button.

PHP Code:




on (press)
{
    _root.goBack = true;
}







I have only done basic stops; goToAndPLay, getURL and such I am a little out of my league here but I started the ball rolling and would like to make this work as I intended. Any help making this do anything close to what I am describing would be much appreciated

How To Make The Wings Of A Fly Stop When The Flash Movie Stop?
Hello,

I made a simple "Fly Flying" flash animation. The wings of the fly are moving up and down while the fly is flying from one location to the other. My problem is:

The wings of the fly are still moving up and down when the fly is landed on the ground. I tried to add a stop(); action script at the last frame. However the wings are still moving even the movie is stopped.

How can I make the wings stop moving when the flash movie is stop? Please download and take a look at my flash file (fly_flying.fla):

http://space.uwants.com/batch.download.php?aid=313219

Thanks and best regards

Alex

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

Cannot Stop Movie Clip - This.stop() Confusion
Hello,

In my pong game when someone scores a goal I want the ball to pause in the middle of the screen, wait xx seconds and then randomly move.


Code:
// Return to kick off position
this.stop();
this._y = 325;
this._x = 275;
a = 0;
var myInterval = setInterval(this, "wait", 30*1000);
This calls function wait that simply uses this.play(); to allow the ball to move again.(See below)


Code:
onClipEvent (load) {
this.wait = function() {
this.play();
clearInterval(myInterval);
};
}
However I cant EVER get the ball symbol to stop no matter what I do.

Ive included all the code attached to the clipevent for the ball below.
Im thinking it must be due to the nested loops or somethings, very very confused


Code:
onClipEvent (load) {
this.wait = function() {
this.play();
clearInterval(myInterval);
};
}
onClipEvent (enterFrame) {
//Kick Off, play whistle and select random direction from 4 diagonals
if (a == 0) {
_root.kickoffwhistle.start();
//Use variable to ensure random numbers are generated only once per game
var randNumber1:Number = Math.pow(-1, Math.floor(Math.random()*2));
//-1 ^1 or ^2 = 1 or -1
var randNumber2:Number = Math.pow(-1, Math.floor(Math.random()*2));
//move it on the y axis at -1 or 1 & //move it on the x axis at -1 or 1
this._y += this.randNumber1;
this._x += this.randNumber2;
++a;
//set a trigger to increment so only actioned once.
}
if (randNumber1>0) {
this._y += this.yspeed;
//move it on the y axis at the set speed
} else {
this._y -= this.yspeed;
//move it on the y axis at the set speed
}
if (randNumber2>0) {
this._x += this.xspeed;
//move it on the x axis at the set speed
} else {
this._x -= this.xspeed;
//move it on the x axis at the set speed
}
// Ball(this) collides with PL1 and ball travelling upwards then deflect off randomly {
if (this.hitTest(_root.P1footballman) && this.yspeed<0) {
// Define boundaries for collision detection
var pl1bounds:Object = _root.P1footballman.getpl1bounds(_root);
this._x = Math.round(Math.random()*(pl1bounds.xMax-pl1bounds.xMin))+pl1bounds.xMin;
//Revert direction of ball by using formula below
this.yspeed = this.yspeed*-1;
//Randomly play miss sound effect if ball in goal area
if (this._x>133 && this._x<450) {
var result = Math.round(Math.random()*2);
if (result == 0) {
_root.MissedGoal.start();
}
}
//play football kick & header sound
_root.footballkickorheader.start();
}
if (this.hitTest(_root.cpu) && this.yspeed>0) {
var cpubounds:Object = _root.P1footballman.getcpubounds(_root);
this._x = Math.round(Math.random()*(cpubounds.xMax-pl1bounds.xMin))+cpubounds.xMin;
this.yspeed = this.yspeed*-1;
if (this._x>133 && this._x<450) {
var result = Math.round(Math.random()*2);
if (result == 0) {
_root.MissedGoal.start();
}
}
//play football kick & header sound
_root.footballkickorheader.start();
}
//Roatation properties of the ball
i = getProperty(this, _rotation);
setProperty(this, _rotation, i+5);
//Rotate ball i degees per frame
_this.rotation = i;
//Player Scores routine
//If ball object is beyond defined CPU goal area
if (this._y<75 && this._x>133 && this._x<450) {
_root.goalcry.start();
_root.P1footballman.score++;
//add1 to the cpu score
_root.playertxt = 'PLY: '+_root.P1footballman.score;
//Play start whistle for KICKOFF
_root.kickoffwhistle.start();
//Return to kick off position
this._y = 315;
this._x = 275;
a = 0;
//Stop ball in correct position
this.stop();
//5 seconds then calls function "wait" to use this.play() to move ball
var myInterval = setInterval(this, "wait", 5*1000);
}
//CPU Scores routine
//If ball object is beyond defined Player goal area
if (this._y>470 && this._x>133 && this._x<450) {
_root.goalcry.start();
_root.cpu.score++;
//add1 to the cpu score
_root.cputxt = 'CPU: '+_root.cpu.score;
//Play start whistle for KICKOFF
_root.kickoffwhistle.start();
// Return to kick off position
this.stop();
this._y = 325;
this._x = 275;
a = 0;
var myInterval = setInterval(this, "wait", 30*1000);
}
if (this._x>620 || this._x<5) {
this.xspeed = this.xspeed*-1;
//if it hits an edge inverse the xspeed
_root.bounce.start();
//Play bounce side effect
}
if (this._y>470 || this._y<75) {
this.yspeed = this.yspeed*-1;
//if it hits the top or bottom of pitch inverse the yspeed
_root.bounce.start();
//Play bounce side effect
}
}

How To Stop MC At Same Time As Sound Stop?
Hi and thanx for u trieing to help me.
I have used this code to play a sound from the library.

with (song_link) {
sound1 = new Sound(song_link);
sound1.attachSound("inga");
sound1.setVolume(100);
sound1.start(0, 0);
}

and when the sound stops i would like to stop a MC that loops.

if there is any way to have an if command in the MC that waits for a variable to be sended and then stops.

or to set some kind of countdown when u start to play the sound that tells the MC to stop.

i would be very glad if u could help me!

Stop Movie - Don't Stop Sound
Hello,
I'm making a intro for somebody's site. The intro plays a loop. At the last frame I made a stop script. But I want to the muis (a loop) to play on and on. So the music won't stop when the movie stops.
Can somebody help me?
Tnx & greetz, Big_Boss_Man

Stop Sounds When Stop Film
Hi. When I open my flash movie in the Flash Player (I have MX) and play it, it works fine. But if I make a breake (stop the playback), the film stops, but the sound still goes on. I have seen animations where sounds and the movie stop if I stop the film. How can I do it. Thx, leu

If I Stop The Sound I Want To Play It From Where Is Stop :)
hi all

i want a button if i cilck on it the sound will stop and another button if i click on it the sound will continue from where it is stoped is it possible in flash or not

and the sound where is the best place i place it ( movie clip - main frame - action ????


thanks

if any one can give me an open file to be clear or the code

Strange Bug....won't Stop At Stop Action
My movie isn't stopping when there is a stop action. I don't know if its a bug in my site or if its a bug with flash MX. Here is the file home.fla. The error occurs when you click on one of the buttons under the Profile heading. If you look at the Profile Scene you'll see I have stop actions placed at the end of each labeled section. For some reason the philosophy section keeps repeating itself and won't stop even though there is a stop action. Can some please take a look and let me know what I can to fix this. Thanks!!

Movie Won't Stop On Stop Command ?
Hello again. I have a movieclip following a motion guide. At the end of the guide, a window comes up with some text. On this frame, on it's own seperate layer, I have a stop command. What is suppossed to happen is after reading the text, you click on the window, it dissappears, and the movieclip follows another motion guide. For some reason though, when I output the FLA, it blows right past the stop command. I have tried making the stop command multiple frames, and I have double checked that there is no other command overriding the stop on that frame. I have no clue. Any ideas? Thanks,

(I would post the file, but it's so large it's killing my G5)

Movieclip Won't Stop On Stop Command?
Inside a movieclip (track) I have a ball on a motion path. At the end of the first motion path, a box comes up and the movie is suppossed to stop on it. For some reason, it keeps going right on to the next motion path. The stop is on it's own layer, and the weird thing is, there are two other stop commands on the same layer, at the beginning and the end of the movie, which both work. I have tried everything I know. Please help. Thanks,

-A

_root.stop Doesnt Really Stop
Hey guys,

I have a pretty complex game im working on..and when you win the game, it sends you to the 4th frame on the root timeline.

This shows the win message and such...however, it keeps automatically sending them from the 4th back to the 3rd frame. I have been searching thru the flash for hours to find something that is doing this, but there is nothing!

Is there a way to like override all other things and have a FULL stop?

I cleared the intervals (but none of them have anything to do with changing frames) but nothing works.

Any help would be amazing. Sorry I can't post the example, as its a HUGE complex flash file.

I pretty much am looking for something similar to _root.stop that actually stops EVERYTHING.

Thanks!

Goto And Stop Doesnt Stop?
hi there..
i have stupid problem again..
thats very basic and i dont knwo what the hell is wrong and its driving me crazy!
ok here it is.. im using

on (release) {
gotoAndStop("main");
}

it goes back to main labeled frame stops around 3 sec.. then plays the whole movie.. again! and again!
i changed it to frame number like

on (release) {
gotoAndStop(45);
}

still same! even there is a stop(); action on frame 45(main)
what is that?!
what am i doing wrong?

thanks..

Stop Scene Loop Without Stop();
I have an interactive flash application that I'm building, but it's gotten kinda large (~200k) because of one large png file. So, I want to build a preloader for it, but I seem to have some difficulty getting it to a) stop looping back to scene 1, or b) look good if I use stop();

for some reason, the folowing scene's moving elements look crappy if I use stop(); in it's first frame in order to stop it from going back.

I don't want scene 1 to continuously reappear, but stop messes with the moving elements in scene 2.

Any novel suggestions? Thanks in advance for even reading this.

Goto And Stop Doesnt Stop?
hi there..
i have stupid problem again..
thats very basic and i dont knwo what the hell is wrong and its driving me crazy!
ok here it is.. im using

on (release) {
gotoAndStop("main");
}

it goes back to main labeled frame stops around 3 sec.. then plays the whole movie.. again! and again!
i changed it to frame number like

on (release) {
gotoAndStop(45);
}

still same! even there is a stop(); action on frame 45(main)
what is that?!
what am i doing wrong?

thanks..

Making A Stop Button, Or Telling A Button To Stop A Streaming Video
Hello,

I've searched the forums and tried to find an answer to this question, but most of the posts go unanswered or are way beyond my understanding.

I'm using a form based application in Flash professional 8.

I have a .flv video of a movie trailer that I created from Quicktime. I intend to stream this video.

I also have a button called "Trailer". When I click on the "Trailer" button, I see the .flv video I created along with the play/pause control skin that I added in the import video wizard. I press the play/pause button, and the movie plays.

This is as I had expected it to be.

Now, when I want to go to something different, for example clicking a "Photos" button that displays a slideshow, the video continues to play.

Is there a way I can tell the "Photos" button to stop the streaming video?

I've searched the forums, and found a few answers, but I don't really understand them. I added them to the script of the "Photos" button anyways to see if they did anything, and every time the video still kept playing.

Here's what I've tried so far:
------------------------------------------
button.onPress = function (){
player_mc.clearVideo();
}

Where player_mc is the instance name.
-------------------------------------------
Adding a stop component, but this isn't really what I want. I'd like the "Photos" button to stop the movie without the user having to hit a separate stop button.
-------------------------------------------
.stop() and ._visible=false;

I don't really understand this.
-------------------------------------------
removeMovieClip("component_mc");
-------------------------------------------
instance.stop()

From what I understand this is only for adding to a keyframe to stop a movie that's looping, and not for what I would like to do. Is that correct?
-------------------------------------------

I would greatly appreciate any help, not only just for me, but for any other newbie who may run into this problem.

Thanks!

Drop Menu : Rollovers/GetURL In A Movie Don't Work...and The SWF Doesn't Work In FF
My links/rollovers don't work in Mozilla and the dropdown menu part don't work (the rollovers and the getURLs) in any browser.

What's wrong with this??? I think it's something simple.
I've already tried:

Code:
this._lockroot = true;
I also tried writing the AS as:

Code:
one.title.text = "The Text";
one.onRollOver = over;
one.onRollOut = out;
function over () {
this.gotoAndPlay(2);
}
function out () {
this.gotoAndPlay(11);
}
one.onRelease = function(){
getURL("http://www.thelink.com");
}
...didn't work...

I hope someone can help!

Download the: Source File


(Lately I've gotten no help off this site and it's been very depressing because this site people used to be very helpful...I hope someone can change my mind)

Fscommands Dont Work In .swf Format :( HOW DO YOU MAKE THEM WORK
Well i tried making them work forever in swf format butit doesnt work!

So i tried windows projector it works wtf.

please help me get it to work in the .swf format

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