Topic: Unload embebbed SWF completely

Hi,
I bought the TiltViewer Pro Recently and Its working perfectly! Beautiful!

I'm not an actionscript expert, but when I remove the TiltViewer from my main SWF the listeners that were created by the tiltViewer remains loaded and trying to access the TiltViewer Objects that aren't there anymore.

According to Adobe forums this is a bug that has 2 solutions. Using Adobe Flash Player 10, you can use the method UnloadAndStop(), then flash try to remove everything linked with that SWF. Even though they said this solution isn't 100%.
I tried this solution and really didn't work perfectly flash stills output the following error:

TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at away3d.core.clip::Clipping/screen()
    at away3d.containers::View3D/clear()
    at away3d.containers::View3D/render()
    at TiltViewer/onEnterFrame()

The other solution is to remove everything manually. The only way to do this is by knowing the code. Am I right?

Obvious that the source code must not be exposed, but maybe, if you include a method like the visibility option that completely removes the gallery. Or if you can write a method that I can use to completely remove the gallery.

Can anyone help me?

Thank you!

Re: Unload embebbed SWF completely

I found the answer on the flash_embed_multiple.fla.

Since I was not swtching between Gallerys, I didn't look in that file. But the answer is there.

Sorry to disturb!

Re: Unload embebbed SWF completely

Hi,

Was wondering how you did use the unload feature?

I'm busy with a website with 2 buttons a next and a previous button, by each click a different swf wil be loaded on stage.
But when the flash_embed.swf is turned on it works just fine until i want to go to or the next swf or the previous.

Thirst i got the same errors #1009 or even eventually #1010, but when i used the unload method in my if statement i did not get the errors, but the tiltviewer isn't unloading.

stituation 1

    if (htxt.x == -1199.95){
        var hmin3:Tween = new Tween(htekst,"x",Strong.easeOut, -1200,-1983.25,1,false);
//        Object(ldr.content).removeChild();
        ldr.unload();
        ldr.load(meSWF);
        ldr.x = Xpos;
        ldr.y = Ypos;
        addChild(ldr);
        }
* here i get all the errors but meSWF is loaded

situation 2

    if (htekst.x == -1199.95 && Object(ldr.content)._app != null){
        var hmin3:Tween = new Tween(htekst,"x",Strong.easeOut, -1200,-1983.25,1,false);
        Object(ldr.content).removeChild();
        ldr.unload();
        ldr.load(meSWF);
        ldr.x = Xpos;
        ldr.y = Ypos;
        addChild(ldr);
            }
8 here the errors are gone but the tiltviewer doens't disappear and the next swf doesn't appear.

hope you or Felix can help me,
Best regards Edward