If I well understood from another post, I have to use this AS3 class found in SDK:
Code: Select all
import Print2Flash.*;
var P2FDoc : Print2FlashDoc;
P2FDoc = new Print2FlashDoc( "sample.swf", 0, 0, 1180, 850, this);
Code: Select all
import Print2Flash.*;
var P2FDoc : Print2FlashDoc;
P2FDoc = new Print2FlashDoc( "sample.swf", 0, 0, 1180, 850, this);
Code: Select all
var doc="swf1.swf"
function LoadPrint2FlashDoc(
url, // Path of Print2Flash document to load
x, // x coordinate of the Print2Flash document movie
y, // y coordinate of the Print2Flash document movie
width, // Width of Print2Flash document movie
height, // Height of Print2Flash document movie
name, // Instance name to assign the Print2Flash document movie
parent, // Optional: parent object of Print2Flash document movie (default is _root)
eventSink) // Optional: event handler object
{
var intervalID = 0;
if (!parent) parent=_root
var container:MovieClip = parent.createEmptyMovieClip(name, 10);
container._x=x;container._y=y
var loadFunc = function()
{
if (!container.setSize) return;
container.init(width, height);
clearInterval(intervalID);
eventSink.onLoaded(container);
container.addListener(eventSink);
}
intervalID = setInterval(loadFunc, 100);
var mcLoader:MovieClipLoader = new MovieClipLoader();
mcLoader.addListener(this)
mcLoader.loadClip(url, container);
return container;
}
Code: Select all
on (release) {
_level0.LoadPrint2FlashDoc(_root.doc,20,20,800,800, "MyDoc",_root);
}