http://www.mail-archive.com/flashcoders@chattyfig.figleaf.com/msg37404.html

:)


On Jan 22, 2008 8:54 AM, Latcho <[EMAIL PROTECTED]> wrote:

> Hi list,
>
> Playin with setup strategies, my major hassle was a shared library.
> When I load library.swf in main.swf with MCloader,
> i noticed there was no way of doing a loadBitmap from within main.swf
> to get to the bitmap-data of the linked bitmap in the library.swf
> An experiment followed:
>
> I put this in the root of library.swf and recompiled:
> *_Library.swf
>
> _*import flash.display.BitmapData;
> Object.prototype.libload=function (_lnk){
>    var b:BitmapData;
>    b=BitmapData.loadBitmap(_lnk);
>    return b;
> }
> ASSetPropFlags(Object.prototype, "libload", 7)
>
> _
> *Main.swf:*_
> //after the library was loaded !
> var _bmp:BitmapData=libload("librarylink")
> trace("checkwidth:"+_bmp.width)
>
> To my amazement this traces the actual width of the library linked bitmap
> !
> I can even attach the bmp it to an clip in main.swf
>
> Now I have some questions:
>
> If above is the case, that you can't use a loadbitmap() to get to a
> library-asset of a (loaded) external swf,
> then why is it that this works ? And then why in the first place was
> this functionallity not implemented in the flash 8 api ?
> Are there cleaner ways or is this a lonely invention?
>
> Regards,
> Latcho
>
>
>
>
> _______________________________________________
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to