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.
rani
Points:0
Posts:0
Answered

2/16/2010 10:20:33 PM

Title: add icon to button during runtime


i m adding a button during runtime using addchild.i need to add icon to that button.how can i get that?
HELP PLEASE.



rani
Points: 0
Posts:0
Accepted Answer
2/17/2010 12:58:04 AM



I Got it

[Embed("assets/open3.png")]
            public var openicon1:Class;
public var btnshowwin:Button=new Button;
public function fncreationcomplete():void
		{
btnshowwin.width=35;
			btnshowwin.height=20;
			btnshowwin.setStyle("icon",openicon1);
                  addChild(btnshowwin);

}



Natalie
Points: 0
Posts:0
2/18/2010 12:36:17 AM



cool, thanks


Post your Reply
Name  

Email

Type your Reply or Answer

Are you human? What is 7+7 



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