On Thu, Mar 11, 2010 at 9:25 AM, Paul Andrews <[email protected]> wrote:

> A simple class solution would be to extend MovieClip (or Sprite)  and add a
> url string. This would allow you to stop messing about with children.
>
>
> package {
>            import flash.display.Sprite;
>            public class URLClip extends Sprite{
>                public var url:String;
>                public function URLClip (){
>                    // add your text fields here
>                }
>            }
> }
>
> Now you can set the url directly and access it later.
>
> var newBtn:URLClip = new URLClip();
> newBtn.url="http://goggle.com/";;
>
>
> newBtn.addEventListener(MouseEvent.CLICK, onClick);
>
> function onClick(e:Event):void{
>        trace("navigate to "+e.currentTarget.url);
> }
>
> or something like that.
>

Gotcha. Yep, that's the way to do it.
Thanks,
Susan
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to