-
Calculating position in a movieclip from progressbar
Greetings community,
I'm trying to jump to a position in the mc by clicking on a progressbar that is 388 pixels in width
the total frames of the mc I am trying to jump to with the progressbar is 3348
my function is:
Actionscript Code:
progressBarMC.progressBar.onRelease = function() { mc.gotoAndPlay(mc._totalframes / this._xmouse * 24); trace((Math.round(mc._totalframes / this._xmouse * 24)));
};
Any help appreciated!
A
Last edited by threat45; 07-22-2010 at 11:56 PM.
-
It seems the further I press in the progressbar, it returns less and less frames...
If anyone can point me in the right direction? Thanks
A
-
var x:Number = 1; x /= 0;
instead of "this._xmouse", use "(this._width-this._xmouse)"
-
Thanks Zippy, that did it
A
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|