[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Swftools-common] Handling "link" event

From: Matthias Kramm
Subject: Re: [Swftools-common] Handling "link" event
Date: Sun, 15 Mar 2009 16:16:57 +0100
User-agent: Mutt/1.5.6i

On Sun, Mar 15, 2009 at 01:13:21PM +0200, Max <address@hidden> wrote:
> Is it posible to handle "link" event in latest snapshot ? I see that it 
> generates such code:
> button39.addEventListener(MouseEvent.CLICK, clickbutton39);
> ....
> public function clickbutton39(param1:MouseEvent){
>            this.dispatchEvent(new TextEvent("link", true, true, "url"));
> }


(That is, if you convert using
    pdf2swf -T9 -s linkfunction=event file.pdf -o file.swf

> but i had no luck to handle it with such handler :
> viewport.addEventListener("link", handler);
> function handler(e:TextEvent):void {
>    throw new Event(e.text);
> }

Yes, that should work- did you register a handler for the new Event you
throw, too? (What happens if you call trace() instead?)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]