On Sun, Mar 15, 2009 at 01:13:21PM +0200, Max <[email protected]> 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"));
> }

Precisely.

(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?)

Greetings

Matthias



Reply via email to