Si la web estuvise hecha en php no tendría problema (ya lo he probado): me bajaría el js, el css y llamaría al módulo así:
Código HTML :
<a class="pbox" href="http://www.picnik.com/service/?_apikey=MiApiKey&_expand_button=true&_close_target=http://www.picnik.com/picnikbox/picnikbox_close_2_0.html">Open Picnik In A Box (With An Expand Button)</a>
El problema es que la web la estoy haciendo en flash. He creado una función javascript a la que llamo con un ExternalInterface.call
Le doy la ruta del js y el css que te da picnik:
Código HTML :
<link rel="stylesheet" href="css/prettyPhoto.css" type="text/css" media="screen" charset="utf-8" /> <script src="js/prettyPhoto/jquery.prettyPhoto.js" type="text/javascript" charset="utf-8"></script>
Creo las funciones javascript:
Código HTML :
<script type="text/javascript"> $(document).ready(function() { // not from here $("a[rel^='picnikBox']").picnikBox({}); }); function picnikLaunch(linkurl) { //alert(linkurl); document.getElementById("picnikLink").href = linkurl; $("#picnikLink").trigger('click'); } </script>
La etiqueta en el html:
Código HTML :
<a id="picnikLink" class="pbox" href="" rel="picnikBox"></a>
Y la llamada desde el swf:
Código ActionScript :
boton.addEventListener(MouseEvent.CLICK,clickButton); function clickButton(e:MouseEvent):void { var url:String = "http://www.picnik.com/service/?_apikey=MiApiKey&_expand_button=true&_close_target=http://www.picnik.com/picnikbox/picnikbox_close_2_0.html"; ExternalInterface.call("picnikLaunch", url); }


El caso es que si cambio la funcion javascript "picnikLaunch" por esta:
Código HTML :
function picnikLaunch(linkurl) { document.location.href=linkurl; }
me carga el módulo de picnik en la misma ventana ("_self") en vez vez de cargarla en una caja superpuesta (tipo prettyPhoto).
He hecho pruebas y el problema con esta última opción es que no soy capaz de pasarle el nombre de clase "pbox" y por más que he probado opciones no lo consigo.
Lo ideal sería poder hacerlo con la primera opción (usando $("#picnikLink").trigger('click')
