On Wed, May 27, 2009 at 9:17 AM, Tracy Spratt <[email protected]> wrote:
[...]
>
> When a setter function sets the Label’s text property, the label has not
> been resized to fit the new text yet, so I can’t test:
>
> if (myLabel.width > this.width)
>
> in the setter
>
> I have not yet found the right invalidation, or event or override to trigger
> my measure logic. Any suggestions?
You should try calling validateNow() on the Label object.
Either that, or call your own invalidateDisplayList() and let
updateDisplayList() take care of triggering the effect.
public function set marqueeText(value:String):void
{
if (label.text != value) {
label.text = value;
invalidateDisplayList();
}
}
override protected function updateDisplayList(...):void
{
// do the effect here if necessary
}
Manish
--
www.manishjethani.com
------------------------------------
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Alternative FAQ location:
https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo!
Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:[email protected]
mailto:[email protected]
<*> To unsubscribe from this group, send an email to:
[email protected]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/