Hello, 

we are giving the first steps on defining a workflow with designers
for integrating Flash CS3 content on our Flex 2 applications, using
the Flex Component Kit for Flash CS3 on labs
(http://labs.adobe.com/wiki/index.php/Flex_Component_Kit_for_Flash_CS3).

I have made a test case where we simply have on Flash CS3 one
movieclip draggable that updates a public variable on the exported
class with it's current x position, when dragged.
Then, I have successfully imported the generated SWC to Flex 2, as you
can see on
http://www.riapt.org/opensource/FlashIntegration_Bindable/FlashIntegration_Bindable.html
(view source enabled, and the zip file has the Flash CS3 source code).

What i want to achieve can be easily understand with the code:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";
layout="absolute" xmlns:local="*" backgroundColor="0xFFFFFF"
viewSourceURL="srcview/index.html">
        <mx:Text x="10" y="10" text="{flashscroller.posx}"/>
        <local:FlashScroller id="flashscroller" x="10" y="100"/>
</mx:Application>

I want to bind the text on my TextBox to the posx public var on
FlashScroller.as (see the fla.zip inside the source). The first time i
tried this, obviously Flex complained that flashscroller.posx wasn't
bindable. Ok, so i tried in Flash CS3 to add the [Bindable] metadata
to the posx variable. And it didn't complain. But it also didn't work:
now neither Flash CS3 or Flex 2 compilers give errors, but the code
don't work, since the textbox isn't properly update.

I guess i can't use [Bindable] on Flash CS3 content, but it would be
important to recreate the feature to allow better integration between
flash and flex. Is there a solution to this? Maybe recreate in AS3
what the [Bindable] does behind curtains?

Thanks, 

João Saleiro



Reply via email to