A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Calculating position in a movieclip from progressbar

  1. #1
    Member
    Join Date
    Sep 2004
    Posts
    44

    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.

  2. #2
    Member
    Join Date
    Sep 2004
    Posts
    44
    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

  3. #3
    var x:Number = 1; x /= 0;
    Join Date
    Dec 2004
    Posts
    549
    instead of "this._xmouse", use "(this._width-this._xmouse)"

  4. #4
    Member
    Join Date
    Sep 2004
    Posts
    44
    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
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center