A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: event listener for pre loader

  1. #1
    Member
    Join Date
    Feb 2010
    Posts
    32

    Unhappy event listener for pre loader

    hi everyone.

    i have my main swf that loads different swfs for content.
    on a portfolio page i have two buttons web and print.
    by default print loads first.
    but lets say someone has entered my portfolio and while print is loading the user clicks on web, the print has not done loading so its even listeners will not be removed causing a clash with my web swf pre loader and letting it work.

    is there a way around this ive been trying for two day with no success.

  2. #2
    Moderator enpstudios's Avatar
    Join Date
    Jun 2001
    Location
    Tampa, Fl.
    Posts
    11,282
    I would use Event.Complete:

    Actionscript Code:
    myLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, printLoaded);

    function printLoaded(evt:Event):void
    {
    addChild(web);
    }

    This way print loads in and then when it is fully loaded you can load in web.

  3. #3
    Member
    Join Date
    Feb 2010
    Posts
    32
    thanks i will try this

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