A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: External movie Self-destruct button for Flash 8

  1. #1
    I'm learning... Thankful's Avatar
    Join Date
    Jun 2005
    Location
    e.v.e.r.y.w.h.e.r.e
    Posts
    487

    External movie Self-destruct button for Flash 8

    Hello my forum friends and all of you wonderful visitors !

    I have one question, it may sound pretty stupid, but hey... we learn till the very last day, right ?

    Ok, here I go...

    Inside the timeline of the MAIN.swf movie, I have a holder to load my EXTERN.swf external movie (SWF as well). I gave it an instance name EXTERNclip. Command for that action is:

    Code:
    loadMovie("EXTERN.swf", EXTERNclip);
    If I want to completely shut down that externally loaded SWF from within itself, I usually put a button inside my external movie, I call it self-destruct button, and give it this action:

    Code:
    on (press) {unloadMovie(EXTERNclip)
    }
    When I load MAIN.swf and then external EXTERN.swf is loaded into MAIN.swf, as soon as you press self-destruct button, movie unloads itself as it should... but only when saving my file as a Flash 6 version. As soon as I save it as a Flash 7 or 8 version, that doesn't work at all... why ?

    I need to save this particular file as a Flash version 8, because I have some video files using On2 VP6 codec and it has to go through Flash 8.

    Any clues or any advices, it would be greatly appreciated.

    Thanks in advance !
    :: ONLINE PORTFOLIO :: web site (Flash version 7 required, recommended screen resolution: at least 1024x768 pixels)

    :: SASHA-Z-CREATIONS :: web site

  2. #2
    XRave tongxn's Avatar
    Join Date
    Apr 2005
    Location
    Somewhere near Here
    Posts
    870
    yea that happens sometimes, new versions don't reckonise old tricks...
    When you actually know what "OMG I have so much homework!" means, you won't want to be me.
    Xrave

  3. #3
    I'm learning... Thankful's Avatar
    Join Date
    Jun 2005
    Location
    e.v.e.r.y.w.h.e.r.e
    Posts
    487
    Yes, and I would really like to find out what can "replace" this little "trick" in Flash 8... I really need to be able to close that externally loaded SWF from within itself...
    :: ONLINE PORTFOLIO :: web site (Flash version 7 required, recommended screen resolution: at least 1024x768 pixels)

    :: SASHA-Z-CREATIONS :: web site

  4. #4
    Junior Member
    Join Date
    Apr 2006
    Posts
    2
    do you really have to destroy it? try making invisible.
    name._visible = false;

  5. #5
    I'm learning... Thankful's Avatar
    Join Date
    Jun 2005
    Location
    e.v.e.r.y.w.h.e.r.e
    Posts
    487
    Well that way I could also just point to the last empty frame in my external movie, but that's not good. It is always good to close externally loaded movies when you doon't need them any more, so they won't "suck" additional system resources (processor's time)...
    :: ONLINE PORTFOLIO :: web site (Flash version 7 required, recommended screen resolution: at least 1024x768 pixels)

    :: SASHA-Z-CREATIONS :: web site

  6. #6
    I'm learning... Thankful's Avatar
    Join Date
    Jun 2005
    Location
    e.v.e.r.y.w.h.e.r.e
    Posts
    487
    I just replaced

    unloadMovie(EXTERNclip);

    with this:

    unloadMovie(this);

    And it works like a charm... anyone knows why Flash 8 handles this function this way ? Sure I am happy it works, but I would really like to hear on why is it doing things like this...

    Thanks!
    :: ONLINE PORTFOLIO :: web site (Flash version 7 required, recommended screen resolution: at least 1024x768 pixels)

    :: SASHA-Z-CREATIONS :: web site

  7. #7
    XRave tongxn's Avatar
    Join Date
    Apr 2005
    Location
    Somewhere near Here
    Posts
    870
    lol that's unexpected, like when i typed in AS:

    startDrag("");

    it drags the movieclip itself, even if it's a button i am putting the AS on!

    funny how things work..
    When you actually know what "OMG I have so much homework!" means, you won't want to be me.
    Xrave

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