A Flash Developer Resource Site

Results 1 to 1 of 1

Thread: .........tell my mc to goto a variable..... please.......

  1. #1
    reMember
    Join Date
    May 2001
    Location
    Boston, Massachusetts, USA
    Posts
    128

    .........tell my mc to goto a variable..... please.......

    Never Mind:
    I figured it out.
    I had to use the with method instead of tell target.




    I'm making a loading sequence with a 3D cube that fills as the movie loaded percentage increases. I made my mc with 100 frames and a stop action on frame 1 so it won't just play through and gave it an instance name of loadbar.

    Here's the code that doesn't work:

    loaded = getBytesLoaded();
    total = getBytesTotal();
    x = loaded*100/total;
    x = Math.round (x);
    y = x + "%";
    per = (total - loaded);
    if (per>1) {
    tellTarget ("_root.loadbar") {
    gotoAndStop (x);
    }
    gotoAndPlay (1);
    } else {
    play ();
    }

    The x variable is a whole number and works for the percentage text field but my mc does nothing.
    Last edited by ChrisG; 11-07-2002 at 03:21 PM.

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