Embed p2f files in flex at compile time

Publishing Print2Flash Documents embedding them in Flex applications
shahgun
Posts:1
Joined:Mon Mar 16, 2009 1:52 pm
Embed p2f files in flex at compile time

Post by shahgun » Mon Mar 16, 2009 1:55 pm

I am trying to embedded the SWF generated by Print2Flash in another Wrapper SWF file. We want to put some custom code (like entitlements check) before showing P2F SWF file. Hence we thought of using a wrapper SWF file which will load the P2F internally. We want to remove the original p2f swf file after doing this.


I am trying to do it in following ways:

Sample.swf is created by Print2Flash.



1. This displays the P2F file inside the wrapper. But this approach loads the P2F SWF from the given location dynamically. In our application, the P2F file is secured and can be shown only to entitled users. Hence, we want to follow the 2nd approach detailed below which is not working for us.


<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns:ns1="Print2Flash.*">

<ns1:Print2FlashDoc x="10" y="10" width="100%" height="100%" id="doc" source=”sample.swf">

</ns1:Print2FlashDoc>

</mx:Application>


2. Doesn’t Work – This does not display the P2F file at all.


<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns:ns1="Print2Flash.*">

<ns1:Print2FlashDoc x="10" y="10" width="100%" height="100%" id="doc" source="@Embed(source='sample.swf')">

</ns1:Print2FlashDoc>

</mx:Application>

Post Reply