This content has been marked as final. Show 3 replies
I'm no genius, but I can share your pain.
I did something similar recently.
For as2 I could not avoid a publishing requirement of the swf to be loaded. I could only think of two ways to do this:
1)Designer type requirement: Frame 1 of the swf to be loaded contains nothing other than a sizing clip. The content is on frame 2 and beyond.
2)Code: the first frame contains two properties _originalwidth and _originalheight which are set in code. They have to be manually set before publishing ( a jsfl command would be good here to automate things).
Both the approaches should be accessible in an onLoadInit handler for a MovieClipLoader.
The problem is that there is no property of a swf that offers dimensions for the size of the stage when it was published. At least not for as2.
The good news is that I think for as3 there is data in the loaderInfo that lets you get this in the loaderInfo... although I haven't actually checked it/tried it.
I have gone through exactly the same thought process re: passing params across from the external movie and also setting the size on frame 1. Unfortunately I'm using Flash and Zinc to develop a software App so;
a) I can't use AS3 as Zinc is AS2 based and
b) The users can choose any swf they have on their system to display inside the app meaning I have no control over it!
Thanks for the ideas though - I'm not sure there is a solution to this one!
That is a tough one. My only _good_ thought on this one is - can Zinc read
the stage size from the swf when the user selects the file? Kind of a
pre-open. I'm not sure of Zinc's file capabilities but you could do it with
Director and one of the Binary fileIO xtras. IIRC, the stage size info
begins at byte 8 of the SWF. There are a number of swf header readers out
there that you could use to figure it out, but it may be a moot point if
Zinc doesn't allow you to read in a binary file.
Adobe Community Expert