A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: using CurrentStateChange in flex 2.0

  1. #1
    Junior Member
    Join Date
    Sep 2007

    using CurrentStateChange in flex 2.0

    I am a newbie in flex 2.0 and action script 3.0.
    When i press the button, i need two things to happen.
    one is change my view state and other one is calling a inline actionscript function.
    <mx:Button x="84" y="192" label="Button" id="Button1" click="getit()"/>
    (where getit() is my inline function in actionscript).
    i know how to create a new state and so on. But, i need to know, how can i make these two things happen in a single button click. I heard something called CurrentStateChange which handles this functionality. Kindly let me know how to use this CurrentStateChange, or if you have anything to say!

    Your help is highly appreciated!


  2. #2
    Mod cancerinform's Avatar
    Join Date
    Mar 2002
    press the picture...
    There is something on the Adobe site about that using an outside button, which however sounds overly complicated. What I would do is have a second button with the new view state appearing on top of the first button.
    - The right of the People to create Flash movies shall not be infringed. -
    | www.Flashscript.biz | Flashscript Biz Classes/Components |

  3. #3
    Junior Member
    Join Date
    Sep 2007
    Hi Cancerinform,
    i got the solution for it. It goes like this....

    when ever u have to perform two actions with your button click,,
    ie., first action - change the state
    second action - process the data

    wat u've to do is..

    <mx:Button x="84" y="192" label="Button" id="Button1" click="currentState='GridState'; getit();"/>

    where getit() is my function !!..

    thanks very much for your rply..

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width

HTML5 Development Center