简体   繁体   中英

How to change the state in Adobe Flex, using ActionScript?

I`m really new to Flex and ActionScript so please be patient with me.

I want to implement this script: tinyurl.com/yafqrqb ...that is doing this "magic" : tinyurl.com/y9qg32r

...but I want to tweak it a little on InfoWindowTabbedComponent . To be more precisely I`m trying to insert links in that tabs, and when you click one the state will change.

You can see my custom InfoWindowTabbedComponent at the end of the post As you can see, right now I have 2 functions that open url`s.

What I`m trying to do is to change this:

var adobeURL:URLRequest = new URLRequest(" http://www.microsoft.com " ); navigateToURL(adobeURL, "_self");

Into something that change the current state.

Can you please help me?

Here`s my custom InfoWindowTabbedComponent: http://pastebin.com/f387bc3b9

I'm not sure I understand what you want to do. If you just want to set the selected Tab, instead of calling navigateToURL() set myTabNavigator.selectedIndex (or selectedChild)

If you really want to change the state, each component has a currentState property, but then you would have to define the states first (via the tag)

And if you really want to navigateToURL() you could navigate to javascript:somefunction() and then set the application state via ExternalInterface, but that would be horribly circumstantial.

Cheers, Jörg

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM