ActionScript 2.0 :: Delete This.onEnterFrame When The Clip Reaches The Desired Width - Lag In Tweens?
Jan 30, 2004
i am using the following AS to scale a movieclip with ease
[Code]...
should i be using a delete this.OnEnterFrame when the clip reaches the desired width? the problem is that ive noticed a lag in my tweens and i wonder if this is whats causing it.
View 7 Replies
Similar Posts:
Jan 30, 2004
i am using the following AS to scale a movieclip with ease
[Code]....
should i be using a delete this.OnEnterFrame when the clip reaches the desired width? the problem is that ive noticed a lag in my tweens and i wonder if this is whats causing it.
View 7 Replies
Mar 29, 2008
onEnterFrame=null, onEnterFrame=undefined & delete onEnterFrame....
Which one to use??? What are the performance considerations. If all my movieclips on-stage are running a MovieClip.prototype.onEnterFrame = function() {run initial stuff before setting onEnterFrame=null/undefined... }, will there be performance hits? It's sad that delete onEnterFrame doesn't work unless I delete the prototype enterFrame as well, which would make the clips reinitailise itself again once you declare the enterFrame prototype again (i need to do this since there's more movieclips that end up appearing on-stage, and they need to automatically initialises themselves the moment they appear).
[Code]...
View 5 Replies
Sep 26, 2008
any consise methods to restart a deleted onEnterFrame that has been deleted?
View 3 Replies
Jun 20, 2004
can you delete a onEnterFrame that is placed on the MC its self, for example:
Code:
onClipEvent(load){i=0}
onClipEvent(onenterFrame){
i++
if(i>50){
delete this.onEnterFrame
}
}
the concept is simple and works when placed on the timeline but does not work when placed directly on the MC.
View 7 Replies
Dec 14, 2009
trying to stop the onEnterFrame loop but it won't stop.
[Code]...
I'm trying to exit the loop and go to frame openWin but that doesnt jumps so I tried to delete the onEnterFrame but the loops contiues.
1) how can I exit the loop to frame openWin? thats most importent it's what I need!
2)if I dont use this.onEnterFrame = function(){ just earth.onRelease = function doent work either unless its in the onEnterFrame why? the earth has animation on it but here i'm using it just as a button so I see no conection to why it isnt working unless its in the onEnterFrame?
View 3 Replies
Jul 12, 2005
i have this code:
Code:
gallery_mc.thumbs_mc.onEnterFrame = function() {
if (this._currentframe == 95) {
loadThumbs(0);
delete this.onEnterFrame;
[code].....
problem is when i get to 95, everything works well, but when i get to 105, the onEnterFrame had already been deleted so that code doesnt run anymore. how can i accomplish this so that the code on 105 runs?
View 6 Replies
Apr 20, 2006
I'm using a number of onEnterFrame functions in my project and to slow down the CPU consumption I want to delete them when they've done their job. I've got this code to work with things like alpha fades, but the delete this.onEnterFrame doesn't work with the easeing code. I think it's the division part of the code that's affecting it. Can someone lend me a hand?
Code:
var targetY = 220;
this.onEnterFrame = function() {
[code].....
View 4 Replies
May 15, 2008
onEnterFrame = function(){
if(such and such){
delete this.onEnterFrame;
}else if(such and such){
start this.onEnterFrame;
}
}
whats the proper syntax for this one?
View 1 Replies
Mar 3, 2007
how can i delete all the onEnterFrame event in my movie/swf?
View 4 Replies
Oct 22, 2007
Would it be a wise idea to delete tween objects once they have played?
Say I have one function that moves an MC across the stage to the right and another which moves the same MC back to the left. Should I remove each tween after it has reached the target?
Code:
function moveRight():Void{
var tweener:Tween = new Tween(MC, "_x", Strong.easeOut, 0, 500, 2, true);
tweener.onMotionFinished = function():Void{
delete tweener;
}
}
View 3 Replies
Nov 24, 2008
I've got a minor issue with a non-functioning delete instruction in a onEnterFrame statement. Here's the code
this.onEnterFrame = function() {if ((_root.gira1 == 1) && (_root.gira2 == 1) && (_root.gira3 == 1) && (_root.gira4 == 1)) {gotoAndPlay("action");delete this ["onEnterFrame"];_root.tunnelaperto = 1;
}}
what you suggest? Till now "delete this ["onEnterFrame"]" always went allright...
View 1 Replies
Apr 16, 2005
[code]How can I create a condition to delete this onEnterFrame at the proper moment?
View 2 Replies
Dec 13, 2009
The object is then tweened starting from a large number and going to a small number. Except my tweens aren't working. From the trace statements, my objects are shown to end up being to x=-20.55 and y=-107373766.65.
My code:
package {
import flash.display.*;
import flash.events.*;
import flash.utils.Timer;
[code]....
View 7 Replies
Dec 13, 2009
An object has been attached. The object is then tweened starting from a large number and going to a small number. Except my tweens aren't working. From the trace statements, my objects are shown to end up being to x=-20.55 and y=-107373766.65.
[Code]...
View 0 Replies
Mar 5, 2005
how can I check if "delete this.onEnterFrame;" is working or not?
View 5 Replies
Mar 5, 2005
Is there any method how can I check if "delete this.onEnterFrame;" is working or not?
View 5 Replies
Oct 19, 2010
I am placing and modifying a movie clip using actionscript, and I want to know how I can use an if statement with the movie clip ending. I tried using this. but it didn't work:
addChild(thing);
thing.width = (500/3)+25;thing.x = 225;thing.y = 250;trace(thing.totalFrames);if (thing.currentFrame >= thing.totalFrames){ removeChild(thing);
}
It plays and resizes the movieclip, but doesn't get rid of it(i.e. it keeps looping). I also noticed that when I just used removeChild(thing); without the if statement, it only removed the graphics, and not the sound.
View 9 Replies
Jun 24, 2010
I have a movie clip on stage which length is 600 frames. I put a actionscript 3 code "stop();)" at the end of movie. it stops when it reaches to 600 frames but it disappears from the stage as well. Which I don't want. It should stop animating but stay with last fram which has a welcome message.
View 1 Replies
Jan 27, 2011
i am creating a movie clip(gotoAndStop1) which when a movie clip reaches x = 0 it will gotoandstop(2).
View 5 Replies
Sep 20, 2008
I hope the following is pretty self explanatory. There is a ball movie clip "mc1" on stage. The addEventHandler simply starts a tween and the ball rolls from left to right until it's off the stage. I'm simply trying to make the clip stop when it reaches a certain x value on stage. I'm trying to teach myself simple techniques for the if statement and loops.
[Code]...
View 13 Replies
Nov 12, 2005
i just wrote a radial preloader. i have a problem though: there seems to be some "residue". it is for a small gallery.. so when i test the loader using the bandwidth simulation, the first time it look perfect, but the second time, i can see part of the preloader from the first frame, and as soon as the preloader reaches the leftover region, that region is cleared.
View 1 Replies
Jan 14, 2008
I have a number of menu buttons (home, about, contact, etc). Each button loads a new/different movieclip onto the scene. Each movieclip when loaded plays up to frame 25 and stops. When I click on any of the menu buttons, I want the current/loaded movieclip to continue playing until it reaches the end of the clip before loading the next. I tried this actionscript with no luck!
[Code]...
View 2 Replies
Sep 19, 2010
how to add an onEnterFrame event to a newly created movie clip.
This is what I'd do in as2:
Code:
var mc:MovieClip = new MovieClip()
mc.onEnterFrame = function(){
//Code here
[Code]......
View 6 Replies
Feb 21, 2006
I'm trying to delay a function which then sets the onEnterFrame of a clip The colde I am trying will not work
[code]...
View 2 Replies
Aug 9, 2004
I haven't been able to find documentation on why loaded movies via 'loadMovie' into another movie clip don't seem to obey onEnterFrame commands. The following code represents a movie clip, 'container', which has a loaded external .swf file, 'box.swf'.
I have set the container to begin a decreasing alpha change. I've also added a trace to see if the onEnterFrame is performing at all. What happens is that the box does not appear to have an alpha change. There is, however, a trace that returns an output of '100' only. But no other numbers, suggesting that the command has stopped.
// Start
container.loadMovie("box.swf");
container.onEnterFrame = function () {
[Code]....
View 6 Replies
Aug 9, 2004
I haven't been able to find documentation on why loaded movies via'loadMovie' into another movie clip don't seem to obey onEnterFramecommands. The following code represents a movie clip, 'container',which has a loaded external .swf file, 'box.swf'.I have set the container to begin a decreasing alpha change. I've alsoadded a trace to see if the onEnterFrame is performing at all. Whathappens is that the box does not appear to have an alpha change.Thereis, however, a trace that returns an output of '100' only. But noother numbers, suggesting that the command has stopped.
// Start
container.loadMovie("box.swf");
container.onEnterFrame = function () {
[code]......
View 6 Replies
Feb 1, 2010
i'm very new to Flash (although have plenty of experience in Java, C++, PHP, etc). For a University assignment, I am creating a World Cup Guide and i'm creating a countdown to the tournament. I've followed a tutorial and modified it slightly but i'm receiving an error message. The error message is:
[Code]....
View 1 Replies
Aug 1, 2007
download the .fla (file updated for flash8) file, run it and you'll see the problem.
when i do this:
PHP Code:
_root.image._width=200;_root.image._height=200;
ist seems that the motion tweens don't work any more.
View 5 Replies
May 11, 2009
I have a project that works perfectly when I publish it for Flash Player. However, when I publish it in AIR (which the final project needs to be published in), selective MovieClip symbols lose their tweens. One contains a dynamic text box field thats updated with data input from the user, the other just contains static text. Other movie clip symbols have tweens that still work just fine, and other symbols like buttons are tweening fine.
View 2 Replies