|
From: | Max |
Subject: | Re: [Swftools-common] Handling "link" event |
Date: | Mon, 16 Mar 2009 23:26:21 +0200 |
User-agent: | Thunderbird 2.0.0.19 (Windows/20081209) |
John Francis Lee пишет:
Matthias Kramm wrote:On Sun, Mar 15, 2009 at 08:56:19PM +0200, Max <address@hidden> wrote:pdf2swf -f -T9 -s linkfunction=event -B test.swf file.pdf -o result.swfBut it doesn't work (without viewer links works fine). I can't understand what's wrong ?The problem is with swfcombining the two Flash 9 SWFs- only the ActionScript in your viewer is executed, however for the links togenerate Events the ActionScript portion of the converted file needs to be executed, too. This is a bug in swfcombine.Try loading the converted file dynamically from your viewer for now, then it should work.Can you give an example of "loading the converted file dynamically from your viewer"? I think that would solve my problems too.Greetings Matthias
var viewport:MovieClip; var loader:Loader = new Loader();loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loader_completeHandler);
loader.load(new URLRequest("file.swf")); function loader_completeHandler(event:Event):void { viewport = loader.content as MovieClip; //viewport.stop(); viewport.gotoAndStop(5); viewport.addEventListener("link", viewport_linkHandler); addChild(viewport); } function viewport_linkHandler(event:TextEvent):void { throw new Event(event.text); } Convert PDF using pdf2swf -f -T9 -s linkfunction=event file.pdf -o file.swf Works fine, but i need one swf file =(
[Prev in Thread] | Current Thread | [Next in Thread] |