Connect
To Top

FLASH OPEN SOURCE: Preloader driven animation

I know it has been way, way too long since I have uploaded any new open source to any of my sites. I used to have a better balance between design and production/actionscripting but lately have been concentrating almost entirely on design and I wanted to get things back in balance. I have started work again on the new version of my portfolio site, have been sprucing up this blog and have been coding again.

I started back in with this simple file that uses a preloader to control the progress of a timeline animation. In this case the couch animation is broken up into eight parts and each part will only play once the corresponding percentage has been loaded. If the whole file loads right away like in this case the animation will play straight through. The best way to see it in action is download the file, publish it and run the ‘simulate download’ under the View option.

The heart of the script looks like this –

p = Math.round((_root.getBytesLoaded()/tkb)*100);
// This calculates the amount of the file that has loaded in bytes and concerts it to a percentage.

// This uses the range calculated what part of the animation should be played.
if (p >= 90) {
this.couch.targetnum = 8;
} else if (p <= 89 and p >= 80) {
this.couch.targetnum = 7;

and so on. This runs in a loop until the file is loaded and it goes on to play the transition to the image.

Download for Mac | Download for PC

You must be logged in to post a comment Login

Leave a Reply

More in Digital culture

Creative Director, Designer, Brand Builder, Speaker, Podcaster, Crazy One. As a designer, I have 20+ years experience creating the strategy, concepts, and designs for award-winning integrated global advertising campaigns, building multiple global Fortune 500 brands and creating innovative digital experiences. As a leader, I have 15+ years transforming agency and client-side teams using a mix of creativity, business strategy, process and political skill to create innovative, world-class work and cultures that change industries and companies. My clients have included American Airlines, W Hotels, Disney, Citi, ExxonMobil, Acura, Old Navy, Nationwide Insurance, Verizon, Subaru and many others. My work has received over 150 international awards, my app designs have been named as one of the World’s 100 Greatest Apps, Apple has featured my work in 9 keynotes, 4 TV commercials and more.

Follow Me On Instagram

 Thanks to @the_villainess for an amazing work in progress shot of the soon to be crown jewel of our collection - a huge (8' wide) commission from @tristaneaton based on the lives of @thechiclibrary and I. Can't thank him enough knowing how busy he is and I'm SO F*CKING EXCITED!!! #streetart #streetartist #streetartnyc #streetartofficial #tristaneaton #tristaneatonart #tristaneatonmural  @visionaireworld X @louisvuitton from back in the day when Kidrobot actually made art toys #louisvuitton #lv #kidrobot #visionaire #visionaireworld #monogram #louisvuittonmonogram #murakami #takashimurakami  Got a vintage @huckgee Skullleader as a new addition to the collection #urbanvinyl #huckgee #mech #robotech #robot  @thechiclibrary in full effect at New York Fashion week for the photographers tonight in @ika_editions @blackscale and @tomford #nyfw #newyorkfashionweek  Forgot to mention I got to see @huckgee new Skullhead mech work in progress which I think is one of the best pieces he has ever done. I already put in dibs on at least one. #huckgee #huckgeeskullhead #urbanvinyl
 Extremely honored to have been chosen by @ghoshal and @erondu to join 25 design leaders from AirBnB, Uber, Facebook, Slack, Google Ventures, IDEO and more for High Resolution, a 25 episode video series on design. Look for my episode focusing on creativity and leadership coming soon. @highrespodcast #creativity #leadership #design #podcast  Spent the morning with @the_chris_buck new book Uneasy which is a fantastic look at the work of one of the most creative people I know. Get your copy at chrisbuckuneasy.com #chrisbuck #photography #photographer #portraitphotography #portrait #portraits  Some days I feel like I should wear this @huckgee armor to work. #huckgee #urbanvinyl #mech #armor #toy #kidrobot #dunny  If you listen to The #CrazyOne podcast you have @lukewessman to thank for it. He gave me the push to finally launch it and it was one of the best decisions I've ever made. He is a constant inspiration, someone who makes me want to be a better man and I always feel lucky to count him as one of my friends. Thanks for the support brother. #crazyones #lukewessman #tattooartist #lag #crazyone  @nychos under scaffolding in Haight Ashbury #streetart #streetartist #nychos #streetartofficial #streetartsf
 A pile of pugs and a @steelers blanket - what else do you need on a day off? #pug #pugs #pugsofinstagram #steelers #yinz #burghproud #herewegosteelers  FYI - it's pronounced 'art' not 'toy'. These @huckgee pieces are hand made and can take up to a year to produce. #huckgee #robotech #mech #robot #urbanvinyl  Happy Valentines Day to @thechiclibrary - love of my life fierce and true. #chic #nyfw #fashion #love  Because of Snowmaggeddon in NYC I'm having to do my meetings from home today and apparently everyone thinks they are a Creative Director in this house. #pug #pugsofinstagram #design #creativedirector #puglife #designer #dogismycopilot  @huckgee amazing work in progress #urbanvinyl #huckgeeskullhead #huckgee

Copyright © 2015 Stephen Gates