Comunidad de diseño web y desarrollo en internet online

SharedObject entre peliculas

Citar            
MensajeEscrito el 02 Ago 2005 09:04 pm
Estoy tratando de guardar info desde una pelicula (set.swf), para recuperarla desde otra (get.swf). El tema es que lo que seteo en una, no lo puedo recuperar de la otra. Lei las technotes de Macromeria y dice:

Shared Objects are used to store data on the client machine in much the same way that data is stored in a cookie created through a web browser. The data can only be read by movies originating from the same domain that created the Shared Object.


Lo que quiere decir que si las peliculas estan en el mismo dominio, tienen que poder compartir datos, asi es que lo que estoy tratando de hacer debería funcionar(no?).

El script que uso es el siguiente:

en set.fla/boton set:

Código :

on(press){
   var so:SharedObject;
   so = SharedObject.getLocal("sarlanga");
   so.data.sarlanga = "ZAPATANGA";
   _root.ta.text+= "variable SARLANGA.data.sarlanga = "+so.data.sarlanga+"\n";
   _root.ta.text+=so.data.sarlanga;
   so.flush();
}


en get.fla/boton get:

Código :

on(press){
   _root.ta.text += "recuperando variable sarlanga \n";
   so = SharedObject.getLocal("sarlanga");
   //so.data.sarlanga = "ZAPATANGA!!";
   _root.ta.text += "variable so.data.sarlanga = "+so.data.sarlanga+"\n";
}


Ven algo que se me este pasando? o entendi mal el technote?

link al technotes que consulte:
http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=tn_16194

Saludos!!!

Por WEREW0LF

769 de clabLevel

4 tutoriales
1 articulo
1 ejemplo

 

Buenos Aires - Argentina

firefox
Citar            
MensajeEscrito el 03 Ago 2005 04:20 am
Reemplaza tu línea, en los dos fla, por esta:

Código :

so = SharedObject.getLocal("sarlanga","/"); 


^^

Por Dano

BOFH

4273 de clabLevel

14 tutoriales
4 articulos
10 ejemplos

Genero:Masculino   Bastard Operators From Hell Premio_Secretos

Lugar estratégico para vigilarte

clabbrowser

 

Cristalab BabyBlue v4 + V4 © 2011 Cristalab
Powered by ClabEngines v4, HTML5, love and ponies.