Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Jun 2007
    Posts
    36
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Preload 30% of movie then play

    I am trying to edit this actionscript so that my movie will load after 30% of the total movie is loaded. Does anyone have any ideas?



    if(_root.getBytesLoaded() == _root.getBytesTotal()) {
    gotoAndPlay(3);
    }
    else {
    gotoAndPlay(1);
    }
    www.MendYourFuelishWays.com
    Save the environment, run your car on vegetable oil

  • #2
    Senior Coder gnomeontherun's Avatar
    Join Date
    Sep 2007
    Location
    Houston
    Posts
    2,846
    Thanks
    10
    Thanked 238 Times in 229 Posts
    This should do it, just by multiplying the total bytes by .3.

    Code:
    if(_root.getBytesLoaded() >= (_root.getBytesTotal() * 0.3)) {
    	gotoAndPlay(3);
    }
    else {
    	gotoAndPlay(1);
    }
    jeremy - gnomeontherun
    Educated questions often get educated answers, and simple questions often get simple answers.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •