[Flashcoders] How to use SWC assets?
I have exported a symbol as a SWC from Flash. It's called Motion3D in my library and has a Motion3D.as to go with it. It has graphics, buttons and textboxes. In Flex I have: // ActionScript file package { import flash.display.MovieClip; public class RunMotion3D extends Motion3D { public var inst:Motion3D; public function RunMotion3D() { inst=new Motion3D(); super(); } } } Motion3D.as is not in the Flex project. In Flex, I break and check the variables and inst shows the textboxes properly instantiated, but "this" shows references to the buttons and boxes but they are null. If I remove inst, it still doesn't instantiate the symbol's assets. How can I get direct access to the SWC assets so that I can write code such as this.something.text="Yes"? I would really appreciate your thoughts on this. John ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Re: Flash White Screen of Death
I can confirm that Adobe has released an update which fixes this problem in Flash CS4. The version they initially shipped on CD still had the problem but the update fixes it. No news on an update for CS3 - I haven't tried the Java fix so it might do it. Cheers Joe Joe Cutting Computer exhibits and installations www.joecutting.com 35 Hospital Fields Road, York, YO10 4DZ 01904 624681 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Distributing packaged file on the Mac
Thanks jim - really appreciate the guidance -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Jim McIntyre Sent: 02 January 2009 14:18 To: Flash Coders List Subject: Re: [Flashcoders] Distributing packaged file on the Mac Paul, Simplest route: If your app is self-contained, just place it in a folder, then drag the folder onto the Disk Utility application (installed in /Applications/Utilities). Choose "compressed" for the format - which will also make the volume read-only, and choose a location. If you want to tweak the appearance of the Finder window that opens when the disk image is mounted, then choose the "read/write" format instead of "compressed". After the image has been created, mount it and make the changes you want, unmount it, and use Disk Utility to convert it to a compressed image. There are a couple of tools out there to help you customize the image - just Google. (I haven't used any so I can't recommend one.) A very unscientific test just now suggests that a compressed disk image adds about 50 K of overhead to the size of the material (after compression). Hope this helps, Jim Paul Steven wrote: > Thanks Jim > > I did look into the disk image option but it appears to create huge files. > My game is self contained and approx 7 mb in size however it seems to create > a disk image that is about 40mb. > > Any advice on how to create the disk image much appreciated. > > Thanks > > Paul > ___ 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
Re: [Flashcoders] Distributing packaged file on the Mac
Paul, Simplest route: If your app is self-contained, just place it in a folder, then drag the folder onto the Disk Utility application (installed in /Applications/Utilities). Choose "compressed" for the format - which will also make the volume read-only, and choose a location. If you want to tweak the appearance of the Finder window that opens when the disk image is mounted, then choose the "read/write" format instead of "compressed". After the image has been created, mount it and make the changes you want, unmount it, and use Disk Utility to convert it to a compressed image. There are a couple of tools out there to help you customize the image - just Google. (I haven't used any so I can't recommend one.) A very unscientific test just now suggests that a compressed disk image adds about 50 K of overhead to the size of the material (after compression). Hope this helps, Jim Paul Steven wrote: Thanks Jim I did look into the disk image option but it appears to create huge files. My game is self contained and approx 7 mb in size however it seems to create a disk image that is about 40mb. Any advice on how to create the disk image much appreciated. Thanks Paul ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Making a CS3 SWC code library look "pretty"
Ah, excellent. For future reference: The document class used to extend Sprite - I simply changed this to extend LivePreviewParent, now what I've placed on the stage shows up (at the correct size too) when the swc is dragged from the component panel. Thanks for the pointer :-) 2009/1/2 Muzak > Have a look at the fl.livepreview package: > > > http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/fl/livepreview/package-detail.html > > http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/fl/livepreview/LivePreviewParent.html > > > - Original Message - From: "Samuel Adu" > To: > Sent: Friday, January 02, 2009 1:01 PM > Subject: [Flashcoders] Making a CS3 SWC code library look "pretty" > > > > Hey guys - Quick one here. >> So I've created a swc code library which I will distribute in an MXP >> (targeted for CS3/CS4 users only for now). With all other "normal" SWC >> components, you can add a custom Icon easily + a live preview. It seems >> that >> you cannot do these things easily when it comes to creating a code >> library. >> >> The icon issue is not so difficult to get around - You simply un-archive >> the >> SWC, add the icon png and edit catalog.xml then re-zip it all up. My >> problem >> is that when a user drags the library from the components panel onto the >> stage they see just a bounding box. Once that loses focus, they see >> nothing. >> I've added graphical elements to the FLA which I created that code lib SWC >> from and it ends up a fraction of the size that it should be, so you can >> hardly see it. I've even tried modifying catalog.xml to add a live preview >> swf, and it's the same thing. >> >> Has anybody managed to do this successfully? >> >> Thanks in advance >> >> Sam >> > > ___ > 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
Re: [Flashcoders] Making a CS3 SWC code library look "pretty"
Have a look at the fl.livepreview package: http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/fl/livepreview/package-detail.html http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/fl/livepreview/LivePreviewParent.html - Original Message - From: "Samuel Adu" To: Sent: Friday, January 02, 2009 1:01 PM Subject: [Flashcoders] Making a CS3 SWC code library look "pretty" Hey guys - Quick one here. So I've created a swc code library which I will distribute in an MXP (targeted for CS3/CS4 users only for now). With all other "normal" SWC components, you can add a custom Icon easily + a live preview. It seems that you cannot do these things easily when it comes to creating a code library. The icon issue is not so difficult to get around - You simply un-archive the SWC, add the icon png and edit catalog.xml then re-zip it all up. My problem is that when a user drags the library from the components panel onto the stage they see just a bounding box. Once that loses focus, they see nothing. I've added graphical elements to the FLA which I created that code lib SWC from and it ends up a fraction of the size that it should be, so you can hardly see it. I've even tried modifying catalog.xml to add a live preview swf, and it's the same thing. Has anybody managed to do this successfully? Thanks in advance Sam ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Making a CS3 SWC code library look "pretty"
Hey guys - Quick one here. So I've created a swc code library which I will distribute in an MXP (targeted for CS3/CS4 users only for now). With all other "normal" SWC components, you can add a custom Icon easily + a live preview. It seems that you cannot do these things easily when it comes to creating a code library. The icon issue is not so difficult to get around - You simply un-archive the SWC, add the icon png and edit catalog.xml then re-zip it all up. My problem is that when a user drags the library from the components panel onto the stage they see just a bounding box. Once that loses focus, they see nothing. I've added graphical elements to the FLA which I created that code lib SWC from and it ends up a fraction of the size that it should be, so you can hardly see it. I've even tried modifying catalog.xml to add a live preview swf, and it's the same thing. Has anybody managed to do this successfully? Thanks in advance Sam ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Flash White Screen of Death
Hello, yes the JAVA_TOOLS_OPTIONS seems to work when setting its value to 128 or 256. If I understand well, Flash was using a 64M value. Actually, I thank all of you. I will give a try with the Flex aspect of compiling (since the bug is tied to the Flash IDE JVM), and I read yesterday evening on Jobe Makar's blog that the CS4 update (but nothing for CS3) resolves that specific issue. You can't picture how devastated I was on the 31st at 9pm. it smelt like I had lost the last 7 years of experience, my framework was failing silently in Flash. Wow! I mean: WOW! Note to Adobe: Hey, Adobe, one thing is for sure, if you put 'Professional' in the software's name and write thousands of lines about how cool RIAs are, please, please, let your killer app handle such amount of classes, or at least, display some Error/Warning :) I can't imagine that no one ever did some tests with fair big amounts of code :D I can't imagine At least, this proves that no one uses Flash to build RIA, or big applications ;) Cedric Hey Cedric, The Java tools option worked for me.. When i tried the higher mem amounts, it didn't work though.. I had to use -Xmx128M or -Xmx256M .. otherwise flash would complain that it needed a reinstall. See the coments at: http://www.negush.net/blog/5005-unknown-error- optimizing-byte-code/ Goodluck! - Original Message - From: "Cedric Muller" To: "Flash Coders List" Sent: Thursday, January 01, 2009 4:39 PM Subject: [Flashcoders] Flash White Screen of Death Hello, I am facing one of these White screens, and I must admin I am quite lost. The project has more than 100 classes, and works fine if I comment some of the 'imports'. The options / solutions provided in this technote kb.adobe.com/selfservice/viewContent.do? externalId=kb405257&sliceId=1> are ridiculous. SWC ? I cannot, won't. Loading in ? Man, this is something I would prefer not be doing on such project. I tried setting the JAVA_TOOLS_OPTIONS environment variable, but I don't know if this was setup correctly, as setting 512MB does not solve the problem. The latest, and most optimistic solution i have is to use the ASC compiler instead of Flash IDE. It seems the problem would go away. Now, how can I (simply and quickly) compile one AS3 CS3 FLA (only document class in it, with a few symbol exports) with ASC ? if anyone has any info I would be more than thankful Cedric ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders __ NOD32 3731 (20090101) Informatie __ Dit bericht is gecontroleerd door het NOD32 Antivirus Systeem. http://www.nod32.nl ___ 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
Re: [Flashcoders] Flash White Screen of Death
Hello Juan! Thanks a lot for this very clear explanation. I will give it a global try. Cedric Maybe you've already tried this or maybe it won't work for you easily (without making many changes), but if the problem is that the IDE can't handle 100 or more classes, you could try a different approach. Let the Flash IDE just compile the graphic part (movieclips, sprites, etc, etc) and use the Flex SDK to compile the classes and build the swf. I think you could remove the document class from your .fla (assuming this is the "main point" that includes references to other classes, which in turn include references to other clasess and so on). That way, you won't be forcing the IDE to compile so many classes. Use the .fla to generate a .swc. It will export all "linked" symbols, so you'll still be able to reference them from Flex Builder, FlashDeveloper or any other IDE that can use the Flex SDK to compile. In your IDE of choice, create a pure AS 3 project, add the swc to your project and replace the Main class that is likely to be created automatically for you when you set the ne project (at least in FlashDevelop) with you current Document Class. If in that class you have references to symbols created on the timeline, you'll have to export those as well and add them by code. Or, maybe you could put all the stuff in the root timeline in a new symbol and just export that one. Then, try to build the project from FD or FB (I don't know if you have used FD or FB, but if you don't, I'd recommend using FD, if you're running windows; it's free and it works out of the box; you only have to configure the path to the Flex SDK and that's almost it). Hope this helps. Cheers Juan Pablo Califano 2009/1/1, Cedric Muller : Hello, I am facing one of these White screens, and I must admin I am quite lost. The project has more than 100 classes, and works fine if I comment some of the 'imports'. The options / solutions provided in this technote kb.adobe.com/selfservice/viewContent.do? externalId=kb405257&sliceId=1> are ridiculous. SWC ? I cannot, won't. Loading in ? Man, this is something I would prefer not be doing on such project. I tried setting the JAVA_TOOLS_OPTIONS environment variable, but I don't know if this was setup correctly, as setting 512MB does not solve the problem. The latest, and most optimistic solution i have is to use the ASC compiler instead of Flash IDE. It seems the problem would go away. Now, how can I (simply and quickly) compile one AS3 CS3 FLA (only document class in it, with a few symbol exports) with ASC ? if anyone has any info I would be more than thankful Cedric ___ 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 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Distributing packaged file on the Mac
Thanks Jim I did look into the disk image option but it appears to create huge files. My game is self contained and approx 7 mb in size however it seems to create a disk image that is about 40mb. Any advice on how to create the disk image much appreciated. Thanks Paul -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Jim McIntyre Sent: 31 December 2008 15:07 To: Flash Coders List Subject: Re: [Flashcoders] Distributing packaged file on the Mac Depends on the target audience, and the requirements of your application. Many smaller Mac apps, especially shareware or freeware published online, is distributed in .dmg (disk image) format. Double-clicking the .dmg file mounts the image, which can be in a compressed, read-only format. The appearance of the Finder window that opens when the image is mounted can be customized to include design elements and simple instructions. One common technique is to place an alias to /Applications at the root level of the disk image, allowing the user to copy your application's folder into their Applications folder. Firefox and Thunderbird both use this approach. That works only if your application is self-contained, and doesn't need to install files into other locations before first launch. Let me know if you want more info. -Jim Paul Steven wrote: > I have created a game using Flash CS3 and would like to distribute it for > the PC and Mac. For the PC, I am using the free "Inno" installer to create > an installer. However for the Mac, I am not having much joy finding a > suitable installer application. Can anyone recommend a Mac installer? This > is a one off job so I don't want to spend too much on the Mac installer > software. The game is a single file with all assets embedded so I am not > looking for anything too complex. > > I guess the alternative is just to zip the file and distribute it as a zip > but my client is keen to have an installer to make it really simple for > users. > > Thanks and a happy new year to everyone!! > > Paul > > ___ > 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 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Flash White Screen of Death
Hey Cedric, The Java tools option worked for me.. When i tried the higher mem amounts, it didn't work though.. I had to use -Xmx128M or -Xmx256M .. otherwise flash would complain that it needed a reinstall. See the coments at: http://www.negush.net/blog/5005-unknown-error-optimizing-byte-code/ Goodluck! - Original Message - From: "Cedric Muller" To: "Flash Coders List" Sent: Thursday, January 01, 2009 4:39 PM Subject: [Flashcoders] Flash White Screen of Death Hello, I am facing one of these White screens, and I must admin I am quite lost. The project has more than 100 classes, and works fine if I comment some of the 'imports'. The options / solutions provided in this technote kb.adobe.com/selfservice/viewContent.do? externalId=kb405257&sliceId=1> are ridiculous. SWC ? I cannot, won't. Loading in ? Man, this is something I would prefer not be doing on such project. I tried setting the JAVA_TOOLS_OPTIONS environment variable, but I don't know if this was setup correctly, as setting 512MB does not solve the problem. The latest, and most optimistic solution i have is to use the ASC compiler instead of Flash IDE. It seems the problem would go away. Now, how can I (simply and quickly) compile one AS3 CS3 FLA (only document class in it, with a few symbol exports) with ASC ? if anyone has any info I would be more than thankful Cedric ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders __ NOD32 3731 (20090101) Informatie __ Dit bericht is gecontroleerd door het NOD32 Antivirus Systeem. http://www.nod32.nl ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders