header
ask question
Click here to ask Question Now Its free No registration required. Flash, Flex, Flash Media Server, ActionScript,Adobe Air. Most questions receive a response in an hour.
janine
Points:0
Posts:0
Answered

2/22/2011 7:28:59 AM

Title: AS3 Scrollpane ineteraction


Ok so I have a scrollpane on stage and it has its content linked from the library. The content has a button in it that if clicked i want some text to change outside of the scrollpane (ie on the root). I tried

mySp.content.button.addEventListener(MouseEvent.CLICK, doThis);

I know in an old AS2 project i used global var, but i dont think this is in AS3 ?

any help would be great



1
Otis
Points: 0
Posts:0
Accepted Answer
2/22/2011 7:45:58 AM



Why don't you write the event listener inside the library clip and inside click function of the button . Access the textBox at root using following as3 code

var myRoot= root;
myRoot.myText.text= "something"

2
Janine
Points: 0
Posts:0
2/22/2011 9:03:13 AM



Thanking you Otis, this helped loads!


Post your Reply
Name  

Email

Type your Reply or Answer

Are you human? What is 2+2 



Members Login

Email  
Password
Forgot Password





This website focus on: Flash | Flex | FMS | RED5 | WOWZA | Flash Media Server | Adobe AIR | ActionScript,Flash Solutions | Flash Question | Flash Answers | Flash Developers | Flash Problem, Flash Help, Flash bugs, Flash workaround | Flash Blog | Flex Question Answers | Flash Forum | Flex Development | Actionscript development | Flash development | Adobe AIR development
Copyright © 2008 AskMeFlash.com. All rights reserved. Privacy Policy | Terms & Conditions