A Flash Developer Resource Site

Results 1 to 1 of 1

Thread: load unload

  1. #1
    Junior Member
    Join Date
    May 2002
    Posts
    1

    Exclamation load unload

    I have a problem with the loading and reloading of an swf; this is my code:

    var ldr:Loader = new Loader();
    var url:String = "mio2.swf";
    var urlReq:URLRequest = new URLRequest(url);

    function goFullScreen(event:MouseEvent):void
    {
    stage.displayState = StageDisplayState.FULL_SCREEN;
    mc.visible = false
    }

    mc.addEventListener(MouseEvent.CLICK,goFullScreen) ;

    function fullScreenRedraw(event:FullScreenEvent):void
    {
    if (event.fullScreen)
    {
    ldr.load(urlReq);
    addChild(ldr)
    }
    else
    {
    mc.visible = true
    ldr.unload()
    }
    }

    mc.stage.addEventListener(FullScreenEvent.FULL_SCR EEN, fullScreenRedraw);

    i have a button that start a fullscreen, the button vanish and a .swf is loaded. If u exit from the fullscreen the button appear again. till now everything is ok!!!

    THE PROBLEM:
    If i click again the button the fullscreen starts but the .swf is not loaded again!
    Please help me

    Thanks!!!!
    Last edited by skill83; 11-06-2008 at 07:13 AM.

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