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




Need To Stop An OnClipEvent



In actionscript 2, I have the code below attached to a movieclip that causes it to slide in vertically once the page loads. The movieclip is made up of several buttons that each load a .swf (each of those buttons has their own code i.e. onRelease, etc). What I need is a way to stop or "freeze" the onClipEvent when one of the .swfs are loaded, so that it stops moving, and then start it again where in place when it is unloaded. Is this possible?

onClipEvent (load) {
this._y=-300;
endPos = 100;

}

onClipEvent ( enterFrame ) {
currPos = this._y;
diffPos = endPos-currPos;
movePos = diffPos/15;
this._y = this._y+movePos;

}

}



FlashKit > Flash Help > Flash ActionScript
Posted on: 08-01-2007, 01:48 PM


View Complete Forum Thread with Replies

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

How To Stop An OnClipEvent(enterframe)?
onClipEvent (enterFrame) {
this._rotation -= 10;
this._x += 5;
this._y += 5;
}

Is There A Way To Stop An OnClipEvent(enterFrame) ?
Is there a way to stop an onClipEvent(enterFrame) from firing but leave the MC in the timeline ?

I know it could worked around like this:
onClipEvent(enterFrame){
if(!initialised){
//do some stuff
initialised=true;
}
}
where 'initialised' is a condition set by an another action somewhere else.

But, what I would like to be able to do is actually stop the enterFrame from firing at all - something like the way you would stop a javascript event from firing with this sort of syntax: event.srcElement.onmouseover=null;

Stop OnClipEvent Action
Is there a way to cause the onClipEvent(enterFrame) action to stop until a button is pressed? I am using a simple script to scale a MC, however, when the MC is scaled to the right size, the onClipEvent action continues running and slows down my other animations.

Any help would be appreciated.

Alden

Stop OnClipEvent (enterFrame)
I have the following script
onClipEvent(enterFrame) {
trace(_currentFrame);
if (_currentFrame == 100) {
delete this;
}
}

How can I stop the onClipEvent(enterFrame) when _currentFrame equal to 100. I tried "delete this", but it doesn't work..

How Do I Put A Stop To OnClipEvent (enterFrame) {
Is there any way to stop this other than removing the clip off of the stage

onClipEvent (enterFrame) {
gotoAndStop(loadedIndicatorFrame());
if (quickPlay == true) { //quickly play the anim
if (_currentframe == _totalframes) {
_parent.gotoAndStop("loadfloors");

}
} else { //wait for the preload
if (_parent.getBytesLoaded() >= preLoad) {
_parent.gotoAndStop("loadfloors");

}
}
}

STOP An OnClipEvent(enterFrame)
Hi, there all..

Someone toll me that if I use "lots" of onClipEvent(enterFrame) events
my movie it may get just a lot slower.... so..

is there a script or way to stop the enterFrame when its events have been processed?

I was thinking to use:

onClipEvent(enterFrame){
// do Stuff calculation from 1 to 100
calculation = calculation +=1;
if(calculation <= 100){
// do stuff until calculation => 100;
}else{
break;
}

is it ok, or is there a smarter way?

THANKS

How To Stop An OnClipEvent Handler
Hi...

First here is my code:


Code:
onClipEvent (enterFrame) {
if (this.hitTest (_root._xmouse, _root._ymouse, true)) {
_root.maincell_mc.designcell_mc.nextFrame();
_root.maincell_mc.printtext_mc.nextFrame();
_root.maincell_mc.printtext_mc.printWorkText_mc.nextFrame();
} else {
_root.maincell_mc.designcell_mc.prevFrame();
_root.maincell_mc.printtext_mc.gotoAndStop(1);
_root.maincell_mc.printtext_mc.printWorkText_mc.gotoAndStop(1);
}
}
...Simple really. This event handler tells 3 different movie clips to play forwards and backwards depending if the main movie clip has been rolled over. This all works fine... what I can't seem to work out is when the movie clip is clicked I would like this event to stop and become disabled.

Any ideas?

Thanks

STOP An OnClipEvent(enterFrame)
Hi, there all..

Someone toll me that if I use "lots" of onClipEvent(enterFrame) events
my movie it may get just a lot slower.... so..

is there a script or way to stop the enterFrame when its events have been processed?

I was thinking to use:

onClipEvent(enterFrame){
// do Stuff calculation from 1 to 100
calculation = calculation +=1;
if(calculation <= 100){
// do stuff until calculation => 100;
}else{
break;
}

is it ok, or is there a smarter way?

THANKS

OnClipEvent EnterFrame {this.stop}
Hallo,
is it possible to stop a movieclip through a onClipEvent (enterframe)?
If I run the debugger, the movieclip appears to be frozen at frame 1, but if I attach a trace command, it is still running (and it shouldn't because it loads CPU).

Some code:

ActionScript Code:
onClipEvent(enterFrame) {
if (a > 20) {
this.stop();
}
a++;
// code doing some heavy stuff here
}




thank you in advance
m.

Any Way To Stop Or Pause An OnClipEvent(mouseMove)?
Hi,
Is ther any way to stop or pause an onClipEvent(mouseMove)?
I need to turn it off and on again later. Is there alternate syntax I should be using? I tried to make a function within it and that didn't work. THanks in advance.

OnClipEvent(enterFraame) Stop Action.
How can i stop a onClipEvent a action has completed. I'm trying to load a movie after a certain amount of elasped time. But, the enterFrame tries to load the movie multiple times, all i here is a clicking sound. If i paste the loadMovie code outside the onenterFrame it executes loads without a problem.

thank you.

nClipEvent(enterFrame){
trace(getTimer());
if (getTimer() <= pausetime)
{
fpause();//stay
}else if(getTimer() >= pausetime){


loadMovie(myMovie.swf);
onEnterFrame = null; //doesn't work in this clipEvent case.

}
}

OnClipEvent(enterFrame) Seems To Stop Entering Frame?
Hi all,

Has anyone ever experienced a situation where duplicated movie clips (whom all call the same function onClipEvent(enterFrame)) would stop executing their function??

I have 4 clips (duplicated from an original) and they do not all function the same. The kicker is that sometimes they will behave ALL properly, sometimes not. There does not seem to be an obvious pattern to the failure.

Any suggestion mych appreciated....
I can provide more details if necessay....

thanx in advance,

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!

Stop Function Created In OnClipEvent Handler
How do you do what is in the topic? LEt's say that function is on a MC, and then you are a few MCs away and a few parents up. How do you refer to it. You use the delete action, right? I just can't picture how I would do it. For _root.onEnterFrame and within the same frame or same MC, you just use
"delete _root.onEnterFrame", right? But how about when it's in an onClipEvent (enterFrame).
Do I just use something like this to stop one and start another:

ActionScript Code:
onClipEvent (enterFrame) {if (_root.gsSolved) {delete _parent_parent.myMovieClip.growGreenScale();shrinkGreenScale();}}

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!

Stop Function Created In OnClipEvent Handler
How do you do what is in the topic? LEt's say that function is on a MC, and then you are a few MCs away and a few parents up. How do you refer to it. You use the delete action, right? I just can't picture how I would do it. For _root.onEnterFrame and within the same frame or same MC, you just use
"delete _root.onEnterFrame", right? But how about when it's in an onClipEvent (enterFrame).
Do I just use something like this to stop one and start another:

ActionScript Code:
onClipEvent (enterFrame) {if (_root.gsSolved) {delete _parent_parent.myMovieClip.growGreenScale();shrinkGreenScale();}}

HELP HitTest Doesn't Work When OnClipEvent(load) But OnClipEvent(enterFrame)?
Somehow it works for my embedded xml links (coz of using hitTesting) but some of the actions don't run.
Is there anyway to resolve this ?? Coz I want to have clickable xml links embedded within flash. Along with other effects that run at the same time.
I realised that I can only use onClipEvent(enterFrame) instead of onClipevent(load) to trigger the actions. But why is this so???

Hope I'm making sense here...

PS: I tried using only on(rollOver) and on(rollOut), simple button to trigger all the actions and they did. But I can't use buttons as there are xml links embedded within.



ActionScript Code:
onClipEvent(enterFrame){
   if (this.hitTest(_root._xmouse, _root._ymouse, true)){
    _root.button01_mc.gotoAndStop("over");
    _root.image01bg.setMask(_root.blindOpen02);
    _root.blindOpen01.gotoAndPlay(1);
    _root.image01bg.tween("_x",10,0.75,"easeOutExpo"); 
    _root.lines_mc.alphaTo(100,0.25,"easeOutExpo");
   }else{
     _root.button01_mc.gotoAndStop("up");
    _root.image01bg.setMask(_root.blindClose01);
    _root.blindClose01.gotoAndPlay(1);
    _root.image01bg.tween("_x",760,0.75,"easeOutExpo");
    _root.lines_mc.alphaTo(0,0.25,"easeOutExpo");
       }

OnClipEvent(keyUp) And OnClipEvent(keyDown): Misbe
Hi,

We are trying to trap the keypresses in an input text box, which is placed inside a Movie Clip, using the onClipEvent(keyUp) and onClipEvent(keyDown) events.
We have also disabled the tabEnabled properties for the button, movieclip, and textFields.

The problem:
The Flash player 7 is unable to detect the onClipEvent(keyUp) event when the Tab key is pressed. The movieClip has the focus since the type is Input Text. Interestingly, the problem only occurs in Flash player 7 (OCX version). The same code (written in Flash MX) works absolutely fine in Flash player 6 (both stand alone and OCX) and the Flash 7 stand-alone version.

What could be going here? Is this a Flash player issue? Has Macromedia changed the event behaviors or are we missing something here! What surprises us is the fact that the Flash 7 stand-alone and OCX player behavior is different!

We would be delighted to have any solution/fix that doesn’t require us to modify/recompile the code.

All suggestions are welcome!

Regards,
Varun

OnClipEvent(load) And OnClipEvent(enterFrame)
Hi all,

I'm using the code contains onClipEvent(load) and onClipEvent(enterFrame) and duplicateMovieClip() to make the snowing effect in the 2 first movie-clips but then, i cannot stop them in the next movie-clips. (All of my movie-clips in 1 scene only.)

Please help!

OnClipEvent(load) And OnClipEvent(enterFrame)
Hi all,

I'm using the code contains onClipEvent(load) and onClipEvent(enterFrame) and duplicateMovieClip() to make the snowing effect in the 2 first movie-clips but then, i cannot stop them in the next movie-clips. (All of my movie-clips in 1 scene only.)

Please 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
}
}

OnClipEvent?
i'm trying to make a seceret link;

ie. hold down 4 keys and this will load another movie

any clues???

OnClipEvent
anyone know why the following script works with the loadMovieNum but not with the gotoAndPlay??

very frustrating -

onClipEvent (enterFrame) {
if ((Key.isDown(82)) && (Key.isDown(83)) && (Key.isDown(85)) && (Key.isDown(75))) {
loadMovieNum ("rubicon.swf", 0);
}
}


onClipEvent (enterFrame) {
if ((Key.isDown(82)) && (Key.isDown(83)) && (Key.isDown(85)) && (Key.isDown(75))) {
gotoAndPlay ("rubicon", 1);
}
}


thanx in advance, nick

OnClipEvent .......help
I have a ball that is following my mouse. I would like the ball no to go outside a bounding box. I almost have it working. The below code works. Only thing is, once the ball hits any part of the bounding box it sticks to the edge and the else statement won't execute. Any help on getting the ball not to stick to the edge? Thanx in advance guys!

onClipEvent (enterFrame) {
if (this._x>570 || this._y>349 || this._x<248 || this._y<247) {
} else {
xDistance = _root._xmouse-_x;
yDistance = _root._ymouse-_y;
this._x += (xDistance)*.015;
this._y += (yDistance)*.015;
}
}

OnClipEvent
Im having a problem with onClipEvent. Whe ni try to put it in i cant type anything after it. Im using flash 5. Please help.

OnClipEvent Bug?
I have a movie clip which uses onClipEvent(enterFrame) to check the state of a variable loaded from an asp file to determine if a visitor has logged in. It was working peacefully until I added a pre-loader scene to the main movie timeline with the if FrameLoaded loop. Now the onClipEvent movie clip is not working. Help!

OnClipEvent.......what Does It Do?
Are there any tutes out there that explains the different functions of the OnClipEvent? I'm not sure how/why it is used or what the different events mean. ie: What is enterframe vs. load?
Thanks

OnclipEvent ?
I have two mc's. Instance names are box1 and box2. I also have a dynamic text box named test. Here is the code on box2. All elements are on the _root, but the text is not showing up in the textbox. Do I have this code in the wrong place? Is enterframe wrong? Thanks for your help.


Code:
onClipEvent (enterFrame) {
if (hitTest(box1)) {
var test = "This is where the box stops.";
} else {
var test = "keep going.";
}
}

OnClipEvent
I have an

onClipEvent (mouseDown) {

-->some actions

}

the question: Is it possible to have the "some actions loop, inside the onClipEvent? So when the mouse is down the actions inside the onClipEvent will loop. Thanks.

OnClipEvent
Is the onClipEvent only used in SmartClips??
I can't get it from being dim???

Thanks for any help

OnClipEvent Fun
I have a vertical nav bar that I've attached some actions to:

onClipEvent (mouseDown) {
targetX = _root._xmouse;
targetY = _root._ymouse;
}
onClipEvent (enterFrame) {
_x += (targetX-_x)/5;
_y += (targetY-_y)/5;
}



this code tells the nav bar to move to the point where the mouse was clicked, and to gradually come to a stop while doing so.

What's wrong with this, is that when the user clicks one of the buttons, it moves ever so slightly, because of the code above.

Basically, what I'm looking for is some code that tells the onClipEvent code attached to the MC of the nav bar to stop executing the code if the mouse gets pressed on one of the buttons.

Thanks for your help.

-A

OnClipEvent
When do I have to use "onClipEvent" and when only "on"?

OnClipEvent
I was trying to do something like this:

onClipEvent(enterFrame)
{
i=Random(100);
if(i==5)
{
//do some stuff
}
}

Its on a movie clip, but the code is only executing once. I wanted to have it execute at every frame. Any ideas? Thanks.

OnClipEvent (key.Down)?
I have 4 Movie Clips and each one has a sound file that starts in the middle of the movie. Using the onClipEvent(key.Down) I have tellTarged each movie to Play.

If I hit the buttons too fast, the current movies sound file won't stop and it will overlap the new movies sound file.....How can I stop this from happening??

Also the new movie won't start either till the sound from the previous movie stops. This wasn't happening till I added the sounds files?

Any help would be appreciated......Thanks

Onclipevent Help
hi can anyone me :

Take a look at this
http://www24.brinkster.com/markdawson/

As you can see from the swf file on click of the buttons
the box scales but is there away to on click of a button to check if the movie is scaled if so then scale down to show all boxes and then back up to the new position.

thanks in advanced

OnClipEvent
I am wondering how does onClipEvent work?

THe thing is I put a action keyframe on an mc instance, telling it, and another mc instance to play when it arrives to that frame.

Within these mc, there are STOP actions, but how come when the onClipEvent triggers them to play, they keep playing THROUGH the Stop actions?

OnClipEvent
Hi,

Is there a way to use more options with the onClipEvent?
e.g. I want to move the movie forward with mouseDown but also with every other key (keyDown).. is there a way to trigger both??

OnClipEvent ......
Hi,

I have a movie clip, with several movie clips inside. Each movie clip inside is used as a 'button'; but is set as a movie clip for more control.

so,

---------------------------------------------------------------
Home Portfolio Services Clients
__________________________________________________ _____________


each of the text headers is a separate movie within the box -which is also a movie- .... what I'm doing is controlling the movies inside with something like :

// CODE
onClipEvent(enterFrame)
{
if (home.hitTest(_root._xmouse, _root._ymouse, true))
{

home.gotoAndPlay(2);
}
}
//

On mouse over, it goes to frame 2 of the movie home and plays the 'on mouse over' effect I want. Now what I need, is a way to take it back to frame 1 of movie home and stop when the mouse exits the area. In sum, I need the REVERSE of the code above ...

Anybody know!??

Thanks!!

Onclipevent Of Just If?
ok im working on a very simple rpg. if i want to run a script at the beginning at a battle, that would constantly check both players HPs for >0. can i just put an if statement on frame 1 thru the end of the battle?

OnClipEvent
how do you do a onClipEvent for flash 4 or something similar to it.

If anyone knows anything remotely close to it please let me know ASAP, have a project due tommorrow and it has to play in flash 4, right now it only plays in 5 and 6.

Please help.

OnClipEvent SOS
Hi!

I'm using loadVariablesNum("vars.txt", 0 ) and loadVariables("vars.txt", "_level0/myClip") but can't seem to access any of the defined variable names in the onClipEvent(load) using the trace method.

However, if I add a button on my movie clip and trap the on(press) event I can see my variable using the trace method.

Please help,
Thanks!!

Onclipevent
What's the deal with "onClipEvent (load)" or "onClipEvent (keyDown)"? I do it just as the tutorial says to but I get this error message: "Clip events are permitted only for movie clip instances". Help?

OnClipEvent
when I using the onClipEvent in FlashMX it says -- You must export your movie as Flash 5 to use this action. There are several other actions highlighted this way. What does it all mean?????
What does this mean and how can I get around it?

DD

OnClipEvent?
This Flash MX is driving me Crazy!!! I'm trying to use this code to do something very basic.

onClipEvent (mouseDown) {
nextScene();
}

It will not work!!! What am i doing wrong? I have another scene and it's place in the action script (F9) of a movie.

OnClipEvent..........help
ok,
i wanna make a short game in flash by using actionscript (daaaa)
and i wanna make it so when i press left on the keyboard that it plays the movie clip of a person walking left.
then if i wanna turn right i press right and then it plays the movie clip that has the person walking right.

if ya get what im saying then plz help me with the best tutorial that you know of or anyinfo that you know.

thnx
if ya wanna send me anything here is me email:
stick_death@hotmail.com


thnx again

later!!!!!!!!!!!!!!!!!!!!

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