To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here


A Flash Developer Resource Site

Go Back   Flash Kit Community Forums > Flash Help > Flash General Help

Reply
 
Thread Tools Search this Thread Display Modes
Old 04-07-2006, 06:18 PM   #1
Thankful
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
Thankful is offline   Reply With Quote
Old 04-07-2006, 06:23 PM   #2
tongxn
XRave
 
tongxn's Avatar
 
Join Date: Apr 2005
Location: Somewhere near Here
Posts: 868
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
tongxn is offline   Reply With Quote
Old 04-07-2006, 06:40 PM   #3
Thankful
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
Thankful is offline   Reply With Quote
Old 04-07-2006, 07:41 PM   #4
philipPryce
Junior Member
 
Join Date: Apr 2006
Posts: 2
do you really have to destroy it? try making invisible.
name._visible = false;
philipPryce is offline   Reply With Quote
Old 04-07-2006, 07:44 PM   #5
Thankful
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
Thankful is offline   Reply With Quote
Old 04-07-2006, 07:51 PM   #6
Thankful
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
Thankful is offline   Reply With Quote
Old 04-08-2006, 05:44 AM   #7
tongxn
XRave
 
tongxn's Avatar
 
Join Date: Apr 2005
Location: Somewhere near Here
Posts: 868
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
tongxn is offline   Reply With Quote
Reply

Go Back   Flash Kit Community Forums > Flash Help > Flash General Help

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:08 PM.


internet.commerce
Be a Commerce Partner
 »  »  »  »  »  »  »
 »  »  »  »  »  »
 

    

Acceptable Use Policy


The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.