Go Back   CodingForums.com > :: Client side development > Flash & ActionScript > Adobe Flex

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-15-2011, 09:45 PM   PM User | #1
DevilRay
New to the CF scene

 
Join Date: Sep 2011
Posts: 3
Thanks: 2
Thanked 0 Times in 0 Posts
DevilRay is an unknown quantity at this point
How do you change states with hyperlink?

I would like to be able to change states in a Flex WindowedApplication by clicking on a RichEditableText hyperlink or some form of clickable text. Is there a way to do this? Thanks.
DevilRay is offline   Reply With Quote
Old 10-16-2011, 05:46 AM   PM User | #2
Inigoesdr
Super Moderator


 
Inigoesdr's Avatar
 
Join Date: Mar 2007
Location: Florida, USA
Posts: 3,601
Thanks: 2
Thanked 397 Times in 390 Posts
Inigoesdr is a jewel in the roughInigoesdr is a jewel in the roughInigoesdr is a jewel in the rough
Code:
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
			   xmlns:s="library://ns.adobe.com/flex/spark"
			   xmlns:mx="library://ns.adobe.com/flex/mx"
			   width="434" height="100">
	<fx:Script>
		<![CDATA[
			
			protected function setState(stateName:String):void
			{
				this.currentState = stateName;
			}
			
		]]>
	</fx:Script>
	
	<s:states>
		<s:State name="state1" />
		<s:State name="state2" />
	</s:states>
	<s:RichEditableText x="38" y="45" text="Click Me! Set State 1" click="setState('state1')" />
	<s:RichEditableText x="38" y="65" text="Click Me! Set State 2" click="setState('state2')" />
	<s:Label x="276" y="45" text="Current State: {this.currentState}"/>
	
</s:Application>
Inigoesdr is offline   Reply With Quote
Users who have thanked Inigoesdr for this post:
DevilRay (10-17-2011)
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 06:15 AM.


Advertisement
Log in to turn off these ads.