> > To end the discussion, I wasn't able to use the same trick
> for other
> > types of assets (bitmap or vectors).
> > If any pionneers feels the need to investigate further.
> >
>
> I have used the same technique for sharing AS2 classes ... never
> tried with bitmaps or vectors though
With bitmaps you could use the bitmapdata to draw it in another movie.
Lets say you have a movieclip which holds a logo (library name:
companyLogo).
In that movieclip, you'll have to have something like this as code:
import flash.display.*;
function attachMe(target:MovieClip, objectName:String){
var t:MovieClip =
attachMovie(objectName,"image",target.getNextHighestDepth(),{_x:5000,_y:5000
});
var b:BitmapData = new BitmapData(t._width,
t._height,false,0x000000);
b.draw(t);
t.unloadMovie();
target.attachBitmap(b,target.getNextHighestDepth());
delete b;
}
Now from another movie you load the holder (lets say holder.swf)
And you can call: holder.attachMe(__myTargetClip,"companyLogo");
Bernard
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com