create a custom button dynamic class and use that button then you will
be able to add new property to it.
find below the ref .
CustomButton class :
package components
{
import mx.controls.Button;
public dynamic class CustomButton extends Button
{
public function CustomButton()
{
super();
}
}
}
main application:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute" xmlns:components="components.*">
<mx:Script>
<![CDATA[
import mx.controls.Alert;
private function submit_fun(e:MouseEvent):void{
e.target.newpro = "ggogle";
//e.target.newpro="google";
}
private function getProperty():void
{
if(submit_btn.newpro)
{
Alert.show(submit_btn.newpro);
}
}
]]>
</mx:Script>
<components:CustomButton id="submit_btn" click="submit_fun(event)"
x="50" y="50"/>
<mx:Button click="getProperty()" x="250" y="50"/>
</mx:Application>
On Apr 16, 3:53 pm, kamal <[email protected]> wrote:
> private function submit_fun(e:MouseEvent):void{
> e.target.newpro="google";
>
> }
>
> <s:Button id="submit_btn" click="submit_fun(event)" />
>
> here i want to assign newpro property to e.target but this is not
> working. can you please help me.
> i'm new to flex.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Flex India Community" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group
> athttp://groups.google.com/group/flex_india?hl=en.
--
You received this message because you are subscribed to the Google Groups "Flex
India Community" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/flex_india?hl=en.