Hey, so I've been making some games in Flex Builder myself.  Basically I 
got fed up with the Actionscript editor in Flash a few years ago, and 
then switched to Flash Develop.  Flash Develop is a really great (and 
free) tool.

However, I ditched that once I got Flex Builder, because as much as I 
loved Flash Develop, Flex worked a lot better for me.  I still use Flash 
Develop if I have to compile in the Flash IDE.

Anyway, the others are right, Flex and Flash are all Flash.  The reason 
to use the Flex framework is to get some great UI components, and a 
great framework to develop a rich internet application in.

I use Flex all the time, though that said, I stay clear of it for games 
since typically the framework is overkill in the "application" 
department for what I need.

Flex Builder, though, is VERY handy for making games.  Specifically your 
example with the rectangles - there are two ways to do this.
The first is like what you said and to make a SWF.  You can simply embed 
the SWF using the embed metatag.  I'm going to completely butcher it, 
but it's something like this:

[Embed( file='myswf.swf', symbol='myrectangle')]
public var myrectangle:Class

You can do this with pngs, gifs, jpgs, or swfs.  Its simply just another 
graphical resource to use.  It's a little wacky though because you have 
to assign type it as a class first, and then you can say:

var x:myrectange = new myrectangle();

Typically I tend not to do this.  My method of choice is to compile a SWC. 
If you embed a SWF in the above fashion, you will lose any and all code 
associated with it.  That means if you have any frame labels, any, 
stops, any gotoAndPlay's in there, it's lost.

If you use a SWC you can use it just for graphics, or you can make your 
graphics smarter with some code.  Just go to the file properties and add 
the SWC into the library. 

In this fashion, you now have code completion, and dont have to worry 
about embedding as the library is linked to the project.

All you have to do is make sure that your rectangle has AS3 export 
linkage assigned in the symbol properties in the Flash IDE, and then 
just export the SWC.  Once in Flex Builder, you don't import anything 
(as its all in the local namepsace), and just do new myrectangle();

Hope that helps.  SWCs are great stuff.
ben


Axonn wrote:
>
>
> Hm, I think I didn't ask the right question, because somebody told me 
> that it
> *is* possible.
>
> What I want is this:
>
> - Create a FLA file in Flash.
> - Draw 2 rectangles.
> - Create an AS file in Flex 3.
> - Attach it to the Flash.
> - Export as SWF.
> - Continue development in Flex 3. When hit "debug", my Flash-created SWF
> starts but the debug code is attached to Flex 3, because I am in Flex 
> 3. But
> you know Flex 3 creates that default SWF. I don't want that. I want to use
> the Flash SWF, which *DOES* have my AS class from Flex in it.
> - DO modifications to the AS but DON'T START FLASH AGAIN until I need to
> modify graphics and such.
>
> Axonn.
>
> That is correct. Flex can only debug code in flex itself.
>
> I did see a book at barnes and noble last week that dealt with games in
> Flex (but I forgot the name of it).
>
> -- 
> View this message in context: 
> http://www.nabble.com/I-want-to-use-Flex-Builder-3-to-develop-Flash-Games-tp22752546p22766233.html
>  
> <http://www.nabble.com/I-want-to-use-Flex-Builder-3-to-develop-Flash-Games-tp22752546p22766233.html>
> Sent from the FlexCoders mailing list archive at Nabble.com.
>
> 

Reply via email to