views:

455

answers:

3

Hey guys, I have been programming with as3 for the past 4 months and Ive been getting rather good at it. I just recently decided to work with flashdevelop. I notice that there is alot of code that is availible in the flex sdk that isn't available in as3 with flash cs4. Like embedding of assets and such. I've been trying to find some up to date tutorials on how to embed things like xml and so far the tutorials are inaccurate or unclear about how to go about doing so. Ive been trying to find some good books that cover that and havnt been able to.

The books either cover as3 with flash or as and flex builder. Which is more towards working with the mxml. I havnt been able to find any books on how to work with as3 and flex sdk. Which show examples like embedding of xml and so on. I was just curious does anyone know of any good books that cover EVERYTHING there is to know about as3 and the flex sdk. Not so much on flex builder and mxml.

In a sense, I just want to get better with working with as3 projects with flashdevelop. And it would be great if there was books that covered that. Cause lets just face it, We developers sometimes just get sick of searching the web for bits of pieces of things. and its just great to have that one good book that references everything.

If no one know's of any good books then I guess website can do. but they cant be http://dispatchevent.org/roger/embed-almost-anything-in-your-swf/ or http://mattmakesgames.com/blog/2009/06/embedding-xml-in-as3.html

The first one wasn't too bad, they just wasn't clear on how to tap into the nodes, second one was just wrong about how parse the xml. atleast for me he was. I did it line by line and got errors. I just need to get better at flash develop.

Thanks guys!!

+3  A: 

Ok, so it seems like when you refer to the "Flex SDK" you are actually mean the MXMLC (the Flex compiler), and not the SDK (although the compiler is part of the SDK).

Both Flash Builder (Flex Builder) and FlashDevelop use MXMLC to compile your SWFs. An exception is that in FlashDevelop if "No Output" is checked in your project settings, then it will tell Flash (Authoring) to compile your SWF. Flash uses its own compiler.

Using the MXMLC compiler, does not mean you must use the Flex framework. It can compile pure AS3 projects too.

Ask youself - Do you need to "embed" the XML document? Can't you just load it in at runtime?

Here is a great run through of MXMLC by Senocular. It's a little dated, but it all should still work, and will give you a greater understanding of what is actually going on. It is a little long, so you could print it out, staple it together, so it feels like a book :) Here is another quicker guide to MXMLC from Erik Johnson.

I think you just have to find a good workflow that works for you. Usually I create all my assets in Flash, then publish them out to a SWC. Then I have a Pure AS3 FlashDevelop project that imports the SWC (right click the SWC in FlashDevelop and click "Add to Library"). I then just use AS3 to chuck the graphics around and do all the magic. Read this post for more info.

TandemAdam
honestly if there any references (book or Website) that gives a good run down on how to embed symbols into you as3 that would be great. Sorry to be so confusing its just I am a little confused on how flex and flashdevelop work. Reason I want to embed my xml is because I am making games that require all assets to be in a single swf file along with the game. It makes it easier to distribute your game through out the web cause most sites only allow a single file upload.
numerical25
From what I learned, theres Flex Projects, and AS3 Projects. AS3 projects have everything flex projects have except AS3 projects arent meant for implementing the Flex interface tags (I assume). I pretty much want to be more familiar with the AS3 that only flex has that flash cs4 doesnt (i.e. things like [Embed(source='../files/level1.xml', mimeType="application/octet-stream")].... I dont even know what they are called!! lol. I need something to explain that for me. But Not so much the interface tags that flexs has. I hope I am making sense. I will also check out the link. thanks alot
numerical25
I read a little bit of Senocular tutorial and it looks like exactly what I am looking for. I don't want to speak too soon but I will let you know.
numerical25
I definitly think that anyone creating Flash content should read that article from Senocular. He explains a lot of stuff that you can easily overlook.
TandemAdam
A: 

You can embed almost anything you want in your swf

Creynders
A: 

FlashDevelop's own wiki has also some good workflow tutorials for all three compiling options (i.e. Compile using Flash, Compile using Flex SDK and create assets using Flash, and Compile using Flex SDK only).

http://www.flashdevelop.org/wikidocs/index.php?title=AS3

Tahir Ahmed