views:

63

answers:

2

What are main diferens between flash ActionScript and Flex actionscript? Why Flash can not compile AS files generated from Flex (with keep-as) directly?

Somy problem is - I want to compile generated from MXML .AS files using Flash CS5... But it appeares to me I can not... Why?

A: 

Actionscript is the same, you can work with the Flex Builder for the code and compile everything with the Flash Authoriting Tool. What you can't do is using specific Flex technologies like mxml in Flash Authoriting, but it's not related to actionscript.

wezzy
+3  A: 

The reason is that there's a difference between Flex Builder (the software program you use to create Flex apps) and the Flex Framework.

The Flex Framework is a set of classes and components built on ActionScript that extend what's already there. Flex Builder has access to all of the code in the Flex Framework - Flash Professional does not.

That's why, for instance, the [Bindable] keyword doesn't work in Flash - all of the code that makes it magically work in Flex apps doesn't exist in Flash.

That said, they've come a long way towards integrating the two. Right now you can build a component in Flash CS5 and drop it into Flash Builder (they renamed Flex Builder to Flash Builder recently) and use it - but it's still not possible to take an .mxml file from Flash Builder and compile it in Flash.

I hope that helps, I know the distinctions can be tricky.

Myk
+1 for giving a considered, patient explanation to someone who has never accepted an answer from anyone.
Robusto
Aww, thanks. :)
Myk