[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Swftools-common] Classname 'MainTimeline' in AS3 is not unique causing
From: |
lallebob |
Subject: |
[Swftools-common] Classname 'MainTimeline' in AS3 is not unique causing TypeError: Error #1009 for PDFs with Links |
Date: |
Sat, 30 Jan 2010 21:59:20 +0100 |
Hi there!
I use: pdf2swf Version 0.9.0 Windows Installer
I export my PDFs with this command:
pdf2swf -T 9 "Test.pdf" -o "Test%.swf" -i -j 50 -s linkfunction=event -t
I get one SWF for each page in the PDF. Each page has Links on it.
My problem is when I load the SWFs in my Container with a Loader I get an error
and only the links of the first loaded SWF work:
TypeError: Error #1009: Cannot access a property or method of a null object
reference at
at rfx::MainTimeline/frame0()[framescript.as:1]
After a lot of searching and testing I found out that in all SWFs the class
"MainTimeline" is declared. I used FlashDecompiler to check this. The function
frame0() is called correctly but the button member vars are NOT present for the
second SWF I load. Thus I get a null-Reference as the Error says. I think they
are shadowed.
Thus I checked the code of pdf2swf and in \lib\as3\scripts.c I found that an
MD5 Hash should be attached to the classname. MainTimeline_[HASH]:
Code:
...
49 finish_md5(md5, h);
50 sprintf(file_signature,
"%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x",
51
h[0],h[1],h[2],h[3],h[4],h[5],h[6],h[7],h[8],h[9],h[10],h[11],h[12],h[13],h[14],h[15]);
52
53 char scenename1[80], scenename2[80];
54 sprintf(scenename1, "rfx.MainTimeline_%s", file_signature);
55 sprintf(scenename2, "rfx::MainTimeline_%s", file_signature);
56
57 abc_file_t*file = abc_file_new();
58 abc_method_body_t*c = 0;
59
60 abc_class_t*cls = abc_class_new2(file, scenename2,
"flash.display::MovieClip");
61
62 TAG*abctag = swf_InsertTagBefore(swf, swf->firstTag, ST_DOABC);
63
64 tag = swf_InsertTag(abctag, ST_SYMBOLCLASS);
...
Is that right or do I misunderstand something here?
Why isn't that Hash set in the resulting SWF?!? Do I need to set a commandline
arg?
I really need that to get working. Could someone please help?
Thanx alot
Bob
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Swftools-common] Classname 'MainTimeline' in AS3 is not unique causing TypeError: Error #1009 for PDFs with Links,
lallebob <=