the problems about Print2Flash encryption

Publishing Flash documents by embedding them in Flex applications
Post Reply
xiongxing
Posts: 1
Joined: Fri Feb 20, 2009 12:38 am

the problems about Print2Flash encryption

Post by xiongxing » Fri Feb 20, 2009 1:21 am

I have several problems below about Print2Flash before i decide to buy it
In order to avoid user to download flash document , we encrypt flash document that transfered by Print2Flash,
and request encryption document Stream in Flex,and then decrypt the document Stream, and we got codes below:

urlLoader.dataFormat = URLLoaderDataFormat.BINARY;
urlLoader.addEventListener(Event.COMPLETE,onFlashLoaded);

APILC = new LocalConnection();
connstr="_"+UIDUtil.createUID();
var strVal:String;
strVal="connstr="+connstr+"&conndomain="+APILC.domain;
urlLoader.load(new URLRequest('http://localhost:8080/images/2.swf?' + strVal));

private function onFlashLoaded(evt:Object):void{
var ba:ByteArray = urlLoader.data;
var loader:flash.display.Loader = new flash.display.Loader();

var bytes:ByteArray = new ByteArray();
// decrypt
for(var i=0;i<ba.length;i++){
bytes.writeByte(ba-1);
}

super.source = bytes;

Loaded=Unloading=false
super.source = ba;
APILC.client=this.;
APILC.allowDomain("*");
APILC.addEventListener(StatusEvent.STATUS,OnAPILCStatus);
APILC.connect(connstr+"_Events");

LoadedInt=setInterval(CheckLoaded,1);
}
but 2.swf can not be show , we think maybe because connectionName in 2.swf is different from APILC.
Is there any other ways to setup connectionName in 2.swf or other ways to use init method in 2.swf?

Post Reply