Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 11-17-2006, 09:52 AM   #11
pixelwit
village halfwit
 
pixelwit's Avatar
 
Join Date: Jul 2001
Location: USA, PA
Posts: 3,330
Default

I think the problem is that unloadMovie works asynchronously. The ActionScript Definitive Guide states that unloadMovie is only executed when all other scripts in the current frame have completed.

So basically, you're copying the clip's content into the bitmapData, instantly attaching the bitmapData to the clip, and then moments later unloading that clip's entire contents (including the bitmapData).

But if that's the case, I don't understand how your code would work as expected but you say it does. Muy misterioso.

-PiXELWiT
http://www.pixelwit.com
__________________
There are no answers, only choices.
pixelwit is offline   Reply With Quote
Old 12-07-2006, 05:35 AM   #12
Peter Cohen
Registered User
 
Join Date: Dec 2006
Posts: 1
Default

Hi folks. Thanks for the code. Due to logon problems earlier I posted my solution based on yours over at ultrashock. Solves the unloadmovie problem and also the problem they were having with losing property values like (_rotation, _alpha, etc).

Arcmedia
advanced multimedia solutions

www.arcmedia.com.au
Peter Cohen is offline   Reply With Quote
Old 12-07-2006, 06:41 AM   #13
Flash Gordon
rather be programming
 
Flash Gordon's Avatar
 
Join Date: Feb 2005
Location: City of Angels
Posts: 10,140
Default

Quote:
Originally Posted by pixelwit View Post
I think the problem is that unloadMovie works asynchronously. The ActionScript Definitive Guide states that unloadMovie is only executed when all other scripts in the current frame have completed.
Didn't understand what you meant until today, so I put off replying. Below is a little test
ActionScript Code:
var m:MovieClip = this.createEmptyMovieClip("m", 0); m.lineStyle(40); m.lineTo(.5, 0); m._x = m._y = 200; m.unloadMovie(); // removeMovieclip() would work here instead of // unloadMovie() as long as you created it again var bmp:flash.display.BitmapData = new flash.display.BitmapData(100, 40, false, 0xFF0000); m.attachBitmap(bmp, 1);

And yup, the bmp instance never shows up.

Do you know if this handling of unloadMovie() is considered a bug or feature?

@peter, thanks for the plug
__________________
trace("Good bye Flash.") Log.i(TAG, "Hello Droid");

Last edited by Flash Gordon; 12-09-2006 at 03:08 AM.
Flash Gordon is offline   Reply With Quote
Old 12-07-2006, 09:56 PM   #14
pixelwit
village halfwit
 
pixelwit's Avatar
 
Join Date: Jul 2001
Location: USA, PA
Posts: 3,330
Default

I don't know if it's a bug or feature. It's mentioned in the ASDG for MX but not in the standard ASDG.

My guess is that it's probably due to some sort of "legacy" code used to avoid referencing a clip which was unloaded elsewhere.

Glad you "got it". I thought you were just ignoring me like MichaelxxOA.

-PiXELWiT
http://www.pixelwit.com
__________________
There are no answers, only choices.
pixelwit is offline   Reply With Quote
Old 03-16-2007, 08:37 PM   #15
badasspuppy
Member
 
badasspuppy's Avatar
 
Join Date: Aug 2004
Posts: 62
Default a solution

http://www.frontend-multimedia.com/smoothImageLoader/

this is a function that you can call pretty much like loadMovie, and handles everything for you.
badasspuppy is offline   Reply With Quote
Old 05-17-2012, 07:21 AM   #16
nahdan
flash stalker
 
nahdan's Avatar
 
Join Date: Mar 2005
Location: providence
Posts: 30
Send a message via AIM to nahdan
Default

Quote:
Originally Posted by badasspuppy View Post
this is a function that you can call pretty much like loadMovie, and handles everything for you.
so im a little late to this thread.
but i was crunching late tonight trying to figure this out because my images were all jaggy.
and MAN this thing works great!! you're a lifesaver.
nahdan is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Load external image file and resize mancroft Animation and Effects 3 03-05-2007 06:09 PM
Menu on external swf to load other swf's on main swamyg1 ActionScript 2.0 4 05-05-2005 01:01 PM
load external swf and go to specific frame in specific scene conniehsc Simple Stuff (Newbies) 1 02-10-2005 07:44 PM
I can load external .swf but buttons don't work rberry88 ActionScript 1.0 (and below) 10 09-09-2004 11:24 PM
How do I load external sound into a movieclip vs. a Sound object? CodeNRun ActionScript 1.0 (and below) 3 08-11-2004 02:40 PM


All times are GMT. The time now is 09:52 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.