Well, it's almost this :-)Actually, my library looks like this (don't mind the "bitmap-id" stuff, it's only some late testing):
<?xml version="1.0" encoding="iso-8859-1" ?> <movie version="9" width="640" height="480" framerate="31"> <background color="#646464"/> <library> <frame><clip id="imgPanelB" bitmap-id="imgPanelB" import="library/Artwork/Bottom.png"/> <clip id="imgPanelT" bitmap-id="imgPanelT" import="library/Artwork/Top.png"/> <clip id="imgPanelL" bitmap-id="imgPanelL" import="library/Artwork/Left.png"/> <clip id="imgPanelR" bitmap-id="imgPanelR" import="library/Artwork/Right.png"/> <clip id="imgPanelBL" bitmap-id="imgPanelBL" import="library/Artwork/BottomLeft.png"/> <clip id="imgPanelBR" bitmap-id="imgPanelBR" import="library/Artwork/BottomRight.png"/> <clip id="imgPanelTL" bitmap-id="imgPanelTL" import="library/Artwork/TopLeft.png"/> <clip id="imgPanelTR" bitmap-id="imgPanelTR" import="library/Artwork/TopRight.png"/> <clip id="imgPanelTR" bitmap-id="imgPanelTR" import="library/Artwork/TopRight.png"/> <clip id="imgPanelRH" bitmap-id="imgPanelRH" import="library/Artwork/ResizeHandle.png"/> <font id="Fnt_Generic_10" import="library/Artwork/Arial.ttf"/>
</frame> </library> </movie>
While in the MMFlash IDE, when i place a picture in the library and assign it a "linkage" name, it is then accessible directly with this name. Eg: Bitmap.loadBitmap("linkage_name"). The problem with my SWFMill is that the bitmap is put *in* a movieclip, which name is the specified linkage ID. So my flash workaround is what you told, loading the MC first, then getting the bitmap. That's kind of dirty, and since i want my sources to be compilable either from MMFlash and mtasc + swfmill, i had to code this:
private function GetBitmap(szID:String) :BitmapData { if (CClientGameEngine.REALMMCFLASH) { return BitmapData.loadBitmap(szID); } else { var mcLoader :MovieClip = _root["mcLoader"];mcLoader = _root.attachMovie(szID, "mcLoader", _root.getNextHighestDepth()); var bitLoad :BitmapData = new BitmapData(mcLoader._width, mcLoader._height, true, 0x0);
bitLoad.draw(mcLoader); mcLoader.removeMovieClip(); return bitLoad; } }What i want to achieve is to really have the bitmap "named" with the linkage string, exactly like it would be in MMCFlash...
Well, anyway thanks for your answer. Hope you will have another idea :-) Pierre Luke Schreur wrote:
I hope this is what you are trying to do. In the first frame you create your library (similar to Flash's export in first frame). Then you import a bitmap into your library. Then you place the bitmap inside a library movieclip. Now you can attach the movieclip to the stage or whatever. I did this from the top of my head so there could be typos: <?xml version="1.0" encoding="iso-8859-1" ?> <movie width="320" height="240" framerate="12"> <background color="#ffffff"/> <frame> <library> <clip id="foo" import="library/foo.jpg"/> <clip id="FooClip"> <place id="foo" name="myFooInstance" x="10" y="10" depth="1" /> </clip> </library> </frame> </movie> In AS2.0 attachMovie("FooClip", "myFooClip", 0); Hope this helps... -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of MARTIN Pierre Sent: Tuesday, 18 July 2006 10:48 To: swfmill@osflash.org Subject: [swfmill] (flash8) add linkage to jpg/png directly - *STILL* possible ? + Fonts (Text version of previous post)Sorry, last post seemt to be a bit tricky to read because of my HTML formating... Here is a text version so everybody will be able to read itin the archive. ------------------------------------------------------------------------ -------- Hello list people,I'm trying to understand the how to use SWFMill to use bitmaps in my movieclips, accessed from AS2 only. I have tried a lot of workarounds, and have currently one which works with the SWFMill "bug" (Which attach the bitmap within a container).Recently, i have found this post: http://www.osflash.org/pipermail/swfmill_osflash.org/2005-October/000264 .htmland so have tried to make the attached 0.2.11.1 version to work the way i want. Anyway, and after a ton of tests, i can't manage it to attach my bitmap the proper way.So my question is, is it a solved issue? Have i to keep my movieclip-container-size-detection-loadbitmap-tricky workaround?Another question, very simple. Is it possible to avoid the "smooth" effect when using SWFMill imported fonts? For instance, if i want to getan embeded version of the "Arial" (Some of windows default fonts) size 10 in my SWF, what is the trick to avoid antialiasing?Last question, because the online "official" version is still the 0.2.11, and because i only have found the 0.2.11.1 version with a luck on the mailing list, i really appreciate if someone can tell me where toget latest versions. If this developpement is dead, is Dan now involved in another, more recent, similar project i can use? I know a bit about HAXE, but it seems very unstable and "fragile", and i really wish to keep my FLAME set up as it is now...Anyway, thanks a lot for any kind of answer. Friend regards, Pierre.P.S.: Please excuse my poor english. BTW i'm french and the french lack of documentation really hurts ;-)_______________________________________________ swfmill mailing list swfmill@osflash.org http://osflash.org/mailman/listinfo/swfmill_osflash.org
begin:vcard fn:MARTIN Pierre n:MARTIN;Pierre org:Creative Hazard adr:;;17 rue de Verdun;Nontron;Dordogne;24300;France email;internet:[EMAIL PROTECTED] tel;home:+33 5 53 56 18 36 x-mozilla-html:TRUE url:http://www.CreativeHazard.com version:2.1 end:vcard
smime.p7s
Description: S/MIME Cryptographic Signature
_______________________________________________ swfmill mailing list swfmill@osflash.org http://osflash.org/mailman/listinfo/swfmill_osflash.org