setSize issue with newer version of print2flash

Publishing Print2Flash Documents embedding them in Flash movies
Post Reply
pesenti
Posts:7
Joined:Sat Jul 04, 2009 2:20 pm
setSize issue with newer version of print2flash

Post by pesenti » Sun Jul 05, 2009 10:41 pm

I embed an existing document using your code + some resizing:

Code: Select all

var stageListener:Object = new Object();
stageListener.onResize = function () {
      _root.MyDoc.setSize(Stage.width, Stage.height);
}
Stage.addListener(stageListener);
LoadPrint2FlashDoc("sample.swf",0,0,Stage.width,Stage.height,"MyDoc",_root,P2FListener);
This works perfectly when "sample.swf" is a document created by an older version (I downloaded a sample that you provided in a previous post http://print2flash.com/forum/download/file.php?id=3 and it works perfectly) BUT for newer documents that I generate (or even the sample.swf provided in your SDK) I get very weird behavior.

See the following examples:

Load the new sample: http://dev.vivisimo.com/~pesenti/docapi ... sample.swf, resizing messes up everything.
Load old sample (it's exactly the same code): http://dev.vivisimo.com/~pesenti/docapi ... sample.swf, works fine.
The new sample: http://dev.vivisimo.com/~pesenti/newsample.swf
The old sample: http://dev.vivisimo.com/~pesenti/sample.swf

I suspect some bug in the newer version of flash2doc...

pesenti
Posts:7
Joined:Sat Jul 04, 2009 2:20 pm

Re: setSize issue with newer version of print2flash

Post by pesenti » Thu Jul 09, 2009 7:14 am

I solved the problem. You need to add

Stage.align="TL"

and not just

Stage.scaleMode="noScale"

BEWARE, this software DOES NOT seem to be supported... I bought a full server license and still haven't heard from them after trying every possible way (forum, web form, email, ...)

staff
Posts:267
Joined:Sat Dec 15, 2007 4:48 pm

Re: setSize issue with newer version of print2flash

Post by staff » Thu Jul 16, 2009 11:49 am

Older versions of Print2Flash documents indeed change values of Stage.scaleMode and Stage.align properties when loaded in another Flash movies. As this may disrupt loading movie functionality (because it may set its own values for these properties and Print2Flash documents changed them back unconditionally) and we've got complaints regarding this, we modified this behavior, and now loading movies must control these properties themselves.

As for weird behavior, this is how the default settings for these properties are processed by the Flash Player, and this behavior seems to be in compliance with Adobe documentation.

This product IS SUPPORTED. It just took some time to evaluate this problem while providing support to other users.

Post Reply