|
-
Can Flash Builder and Flex stuff be used in Flash IDE?
Hi, I'm pretty decent with coding in AS3 in Flash IDE (5.5), but some things I need to do only have tutorials done in Flash Builder and/or Flex, so I wonder if I made the stuff I needed in Flash Builder/Flex (not big things needed to be done), can I then use these in Flash IDE? Doesn't Flash Builder and Flex use swc and xml stuff? I've not used those two filetypes in Flash IDE before.
-
When you know are.
Developing Flex style stuff isn't much different from Flash, if you're building an "Actionscript Project" with it and not a "Flex Project" (which requires the mxml stuff). I've never done a Flex Project before, but I typically build things the Actionscript Project way now.
If you're on Windows, you can use Flash Develop which is free.
The main difference is that your swf is created from an Actionscript class instead. Which is basically the same thing as giving your FLA a document class. You create a swf by adding in a line like this after your imports...
Actionscript Code:
[SWF(width="800", height="600", frameRate="60", backgroundColor="#444444")]
Which will create a blank swf with those dimensions, at 60fps and a bg with that color.
For any Flash assets you need to import into your "Actionscript Project", you'll have to import them in a .swc. In your FLA, in the publish settings there's an option for "export swc". With that selected, any thing you have in that FLA with a class name (audio, movieclips, bitmaps) will be exported into the .swc file. You add that .swc file to your "Actionscript project" and then you'll get auto-complete for all of those assets from your FLA. So you can import them as normal.
The main problem I've had with this though, is if you give a swc assets the same class name as an .as file, they won't be linked together automatically. Your project will instantiate the .as file instead of the movieclip file, for instance. To get around this you can give the MovieClip a similar name buy append it with a "UI" or something and then manually instantiate it within that class.
Actionscript Code:
package game.character { import game.character.CharacterUI;
// you have to make the class extend a displayobject like Sprite if you want to addChild(body) public class Character extends Sprite {
private var body:CharacterUI = new CharacterUI(); // and you can access your movieclip from this body variable
} }
This is how I understand it to work, I always wish for a way for it to work like it does when you do things 100% in Flash but I haven't found a way.
-
Ok, thanks 
Will prolly run into problems, but this is a start at least.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|