Jump to content

Search the Community

Showing results for tags 'array as3 dynamic'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • GreenSock Forums
    • GSAP
    • Banner Animation
    • Jobs & Freelance
  • Flash / ActionScript Archive
    • GSAP (Flash)
    • Loading (Flash)
    • TransformManager (Flash)

Product Groups

  • Club GreenSock
  • TransformManager
  • Supercharge


There are no results to display.

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Personal Website



Company Website



Found 1 result

  1. I am new at greensock I wanted to see if someone can help me out with this and see if loadermax can do what I need it to do. Below is as3 code to dynamically load in an external .swf from the same directory the external .swf are named clip0.swf','clip1.swf','clip2.swf In the main flash i have the as code as followed below. What I want to accomplish is to load up clip0.swf' dynamically. then when I refresh the page or republish the main file it should show clip1.swf then do it again for clip2.swf. in that order everytime the page refresh the new .swf gets loaded. the below code randomizes these flashes & works with math.round. but I dont want to randomize the flashes I want it to be in sequence order ( 1,2,3) not 3.1,2 or 2,1,3 I hope this was explained good. I hope someone can help me out. I feel like I have 95% done but cant figure out what I am doing wrong to load these in sequence ----AS3 CODE--------- stop(); var movieArray:Array = ['clip0','clip1','clip2']; var loader:Loader = new Loader(); var index:int = movieArray.length * Math.random(); var url:String = movieArray[index] + '.swf'; trace("Attempting to load", url); loader.load(new URLRequest(url)); loader.contentLoaderInfo.addEventListener(Event.CO MPLETE, loaderComplete); loader.contentLoaderInfo.addEventListener(IOErrorE vent.IO_ERROR, loaderIOError); addChild(loader); function loaderComplete(e:Event):void { trace("Successfully loaded", url); } function loaderIOError(e:IOErrorEvent):void { trace("Failed to load", url); }