well i want this actually
<s:Button x="240" id="anything" y="80" label="User 4" click="click_Handler(event.currentTarget.id)" />
protected function click_Handler(s:String)
{
s.width ="xx" ;
}
Well in this code of course s.width cant be done. any ideas about how to do this. i must change the width when i click on the button.
you need to use the
idof the object, or pass the object reference instead of just itsidto the event handler. In the example you have given theidisanything. Make sure this is unique for each object instance in the MXML.One option is to directly refer to the stage instance. The code will be like this
The other option is to pass either the event object (which is a good practice) or at least the target object to event handler, and use that. The code will be like this: