I'm not sure what you mean by "(has the skin)".

TextButton.as should have a TextButtonView.as already.

One option would be to replace TextButtonView with a version that changes
states in a skin class.  The skin class would be TextButtonSkin.as or
TextButtonSkin.mxml that references a set of fxg files.

On the JS side, TextButtonView.js would do something similar. The
TextButtonSkin.js would switch between 3 "somethings".  Then you'll have
fun tweaking the compiler to output different somethings and tweaking the
TextButtonSkin.js

Another option is that you replace TextButtonView with a version that
expects 3 Sprites that will be the compiled FXG files.  On the JS side,
that version would expect 3 "somethings".

That might be better because then there are fewer layers.  But we can
change our minds on that later.

-Alex



On 3/1/14 11:00 PM, "OmPrakash Muppirala" <bigosma...@gmail.com> wrote:

>On Sat, Mar 1, 2014 at 8:13 AM, Alex Harui <aha...@adobe.com> wrote:
>
>> OK.  Do you think you can build a new example in MXML/AS/FXG?  The
>> skin/view would simply choose a different FXG file for each state.  In
>> theory you should be able to get a working SWF without any Falcon
>>changes,
>> then I can run that through FalconJX.
>>
>>
>Will do.  Although, I am not yet clear how you want the classes to be
>organized.  For ex., for the TextButton, the classes would be:
>
>TextButton.as (has the skin) -> TextButtonSkin.as (has references to) ->
>TextButtonUpState.fxg, TextButtonDownState.fxg and
>TextButtonOverState.fxg.
>
>On the JS side, it could either be:
>
>TextButton.js (has the skin) -> TextButtonSkin.js (has references to) ->
>TextButtonUpState.svg, TextButtonDownState.svg and
>TextButtonOverState.svg.
>
>(or)
>
>TextButton.js (has the skin) -> TextButtonSkin.js (has SVG drawing
>functions) -> drawUpState(), drawDownState() and drawOverState()
>
>Am I on the right track?
>
>Thanks,
>Om
>
>
>
>> Thanks,
>> -Alex
>>
>> On 3/1/14 12:01 AM, "OmPrakash Muppirala" <bigosma...@gmail.com> wrote:
>>
>> >So, if it were up to me, we'd start with a test case where an MXML or
>>AS
>> >
>> >> skin points to an fxg file for each state.  The Falcon compiler
>>should
>> >> already generate the right thing for the AS side.  Then, we have to
>> >>apply
>> >> a similar hook to the FXG compiler that we did to get JS output for
>> >> FalconJX and start coding up however we want the JS/SVG output to
>>look
>> >> like.  It could call this Graphics component, but may not need to, it
>> >>may
>> >> just generate SVG or JS calls.  But for sure, you're welcome to write
>> >>the
>> >> Graphics class for both AS and JS and teach BarChart to use it.
>>We'll
>> >> need that no matter what.
>> >>
>> >
>> >I will get working on the Graphics class then.  Will try to push
>>something
>> >soon.
>> >
>> >
>> >>
>> >> Anyway, if this plan is acceptable to you, what I'd prefer to do is
>> >>this:
>> >> I would apply the hooks to the FXG compiler and get it to output
>> >> "something".  I'd point you to the change list so you can see what
>>files
>> >> need to be modified.  Then you can try your hand at modifying those
>>Java
>> >> source files to get whatever output you want.  You really don't have
>>to
>> >> know much about compilation, you are basically taking a tree
>>structure
>> >>and
>> >> converting it to some textual representation.  Then we don't have to
>>do
>> >>as
>> >> much coordination between the two of us.
>> >>
>> >
>> >This sounds good to me.  Please go ahead, add the hooks and let me
>>know!
>> >
>> >Thanks,
>> >Om
>>
>>

Reply via email to