Jump to content
Search Community

Search the Community

Showing results for tags 'preloade loadermax'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

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

Product Groups

  • Club GreenSock
  • TransformManager
  • Supercharge

Categories

There are no results to display.


Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Personal Website


Twitter


CodePen


Company Website


Location


Interests

Found 1 result

  1. Hello! I have a swf "main.swf" with four button that loads four external swf. When I open "main.swf" load the first swf "home.swf" import com.greensock.*; import com.greensock.loading.SWFLoader; import com.greensock.events.LoaderEvent; import flash.events.MouseEvent; var loader:SWFLoader = new SWFLoader("home.swf",{onInit:initHandler, onProgress:progressHandler, onComplete:completeHandler, container:this}); var swf = new Array(home,about,contact,works); for (var i:int=0; i<swf.length; i++) { swf[i].addEventListener(MouseEvent.CLICK, openSwf); } function openSwf(e:MouseEvent): void{ var newURL:String = e.target.name + ".swf"; loader.url = newURL; loader.load(true); // reload SWFLoader and flush/unload old content } function initHandler(event:LoaderEvent):void { //fade the swf in as soon as it inits TweenLite.from(event.target.content, 1, {alpha:0}); } function progressHandler(event:LoaderEvent):void { progress_mc.progressBar_mc.scaleX = event.target.progress; trace("progress: " + event.target.progress); } function completeHandler(event:LoaderEvent):void { trace(event.target + " is complete!"); TweenLite.to(progress_mc.progressBar_mc, 1, {alpha:0}); } //load the first swf loader.load(); I would like to write a code to preload my site and at the same time the first content (Home.swf) in a different total progress bar for for example "total_bar". I suppose that should be used a queue:LoaderMax and append all I want to load...is that right? But I should do it on main.swf or should I create another swf file (for example index.swf) that loads the main.swf and home.swf? Thanks for your help and sorry for my english!
×
×
  • Create New...