A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Load swf and load again

  1. #1
    Member
    Join Date
    Sep 2000
    Posts
    70

    Load swf and load again

    Hi all

    With this I load in 1.frame

    var thisRequest:URLRequest = new URLRequest("first.swf");
    var thisLoader:Loader = new Loader();
    thisLoader.load(thisRequest);
    stage.addChild(thisLoader);

    in frame 2

    I want my second.swf to load ------- and the first.swf to unload

    BUT how :-)

  2. #2
    Flash/Flex Developer samac1068's Avatar
    Join Date
    Apr 2007
    Location
    Here, no there
    Posts
    1,813
    Maybe I'm missing something, but if you first remove the child then load your second SWF the same way you loaded your first SWF.

    [Second Frame]
    stage.removeChild(thisLoader);

    thisRequest = new URLRequest("second.swf");
    .......
    Some people are like Slinkies, not really good for anything, but they bring a smile to your face when pushed down the stairs.

  3. #3
    Junior Member
    Join Date
    Jan 2008
    Posts
    15
    I think that you can make gotoAndPlay(frame2); but the problem is with the timing, how long is your first .swf file.? If you don't need any timing, I believe that you should just name two different frames, and give order after one .swf is done to gotoAndPlay("second.swf") or ("second frame")

  4. #4
    Member
    Join Date
    Sep 2000
    Posts
    70
    Hi Samac


    [Second Frame]
    stage.removeChild(thisLoader);

    Thanks .. the remove works fine but the load dont

    thisRequest = new URLRequest("second.swf");

    been trying to add a Child ...but still not working
    this AS3 teasing me


    flemming

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