A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: How to unload and stop swf from stage ?

  1. #1
    Junior Member
    Join Date
    Jun 2012
    Posts
    5

    How to unload and stop swf from stage ?

    Hi,

    Could anyone help me to unload and stop one swf while replacing other ? It should unload everything of one swf including background music also.


    Requirements:


    For instance, I have 2 swfs.

    1. menu.swf

    2. Category1.swf

    -->> Both files are put in one folder to call eachother.

    -->> menu.swf will have 20 buttons in which Category1.swf button is one of them and has link to open it.

    -->> menu.swf has background music

    -->> Category1. swf has slides and voice over running behind.

    -->> Category1.swf has has 4 buttons as of now.

    1. Previous ---- Works

    2. Next ---- Works

    3. Replay --- Works

    4. HOME --- Doesn't work ( Which points to menu.swf )


    I just want to unload (including background music) menu.swf when go to Category1.swf and vice versa when clicking HOME button on Category1.swf

    Please review this and advice.

    Thanks in advance !

  2. #2
    Flash/Flex Developer samac1068's Avatar
    Join Date
    Apr 2007
    Location
    Here, no there
    Posts
    1,813
    Well since you didn't post any code, it is hard to advise, but you can only unload a movie is the movie was loaded at runtime by code. Using the unLoad command should work, without a hitch as long as you loaded it correctly and place the loaded SWF in a variable that is available to all functions (global). If you don't then the unload function won't be able to find anything to unload.
    Some people are like Slinkies, not really good for anything, but they bring a smile to your face when pushed down the stairs.

Tags for this Thread

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