Ver Mensaje Individual
  #1 (permalink)  
Antiguo 08/10/2008, 13:01
cudache
 
Fecha de Ingreso: octubre-2008
Mensajes: 3
Antigüedad: 15 años, 6 meses
Puntos: 0
FLASH y XML problemas con cache

Hola a todos, mi problema es el siguiente:
Tengo una pagina web toda en Flash y su inicio es index.php en donde le digo a mi pelicula Flash que evite el cache del navegador con una variable XXX.swf?<? echo rand(0, 1000); ?> hasta ahí todo bien.
Mi pagina es una revista que carga un XXX.xml para llenar sus paginas las cuales se renuevan cada mes. Mi problema es que en algunos navegadores se actualiza y en otros no!. Necesito evitar el cache de este xml para que siempre que se ingrese a la pagina se actualice solo.
Creo que es en flash en donde hay que decirle que sea un xml dinamico o algo así como hice en el index.php con el swf , el problema es que no encuentro en mi flash donde carga el xml, aparentemente tiene alguna variable que carga cualquier xml.
Le paso el codigo de flash.
Saludos
Espero de su ayuda.

#initclip
function FFlippingBookConstants() {
this.version = "1.8.6";
this.DELIMITER = "%!!!%";
this.INVALID_XML_MSG = "FFlippingBookError: Incorrect XML source..";
this.MEDIA_INTERVAL = 300;
this.MEDIA_TIMEOUT = 3000;
this.PAGE_TIMEOUT = 3000;
this.DEF_PAGE_NAME = "fpage";
this.PAGE_SHADOW_LAYER_NAME = "shadows";
this.PAGE_BG_NAME = "bg";
this.PAGE_HOLDER_NAME = "holder";
this.PAGE_HOLDER_PARENT_NAME = "parent";
this.PAGE_PRELOADER_NAME = "loader";
this.PAGE_MEDIA_NAME = "media";
this.PAGE_MASK_NAME = "pmask";
this.SYMBOL_PRELOADER_NAME = "FBStandardPreloader";
this.PRELOADER_BAR_NAME = "bar_mc";
this.MAIN_OBJ_ID = "MAIN";
this.MODEL_OBJ_ID = "MODEL";
this.CACHE_OBJ_ID = "CACHE";
this.CONSTANTS_OBJ_ID = "CONSTANTS";
this.LOADER_OBJ_ID = "LOADER";
this.VIEW_OBJ_ID = "VIEW";
this.WIDTH_NODE_NAME = "WIDTH";
this.HEIGHT_NODE_NAME = "HEIGHT";
this.ALWAYS_OPENED_NODE_NAME = "ALWAYSOPENED";
this.SCALE_CONTENT_NODE_NAME = "SCALECONTENT";
this.AUTOFLIP_NODE_NAME = "AUTOFLIP";
this.FLIP_ON_CLICK_NODE_NAME = "FLIPONCLICK";
this.MOVE_SPEED_NODE_NAME = "MOVESPEED";
this.CLOSE_SPEED_NODE_NAME = "CLOSESPEED";
this.GOTO_SPEED_NODE_NAME = "GOTOSPEED";
this.FLIP_SOUND_NODE_NAME = "FLIPSOUND";
this.PAGE_BACK_NODE_NAME = "PAGEBACK";
this.LOAD_ON_DEMAND_NODE_NAME = "LOADONDEMAND";
this.CACHE_PAGES_NODE_NAME = "CACHEPAGES";
this.USE_PRELOADER_NODE_NAME = "USEPRELOADER";
this.USER_PRELOADER_NODE_NAME = "USERPRELOADERID";
this.CACHE_SIZE_NODE_NAME = "CACHESIZE";
this.PRELOADER_TYPE_NODE_NAME = "PRELOADERTYPE";
this.PAGES_NODE_NAME = "PAGES";
this.FIRST_PAGE_NODE_NAME = "FIRSTPAGE";
this.STATIC_SHADOWS_DEPTH_NODE_NAME = "STATICSHADOWSDEPTH";
this.DYNAMIC_SHADOWS_DEPTH_NODE_NAME = "DYNAMICSHADOWSDEPTH";
this.PAGE_STATIC_SHADOW1_NAME = "STATICSH1";
this.PAGE_STATIC_SHADOW2_NAME = "STATICSH2";
this.FLIP_SOUND_SYMBOL_NAME = "FFlippingBookSound";
this.NUM_TYPE_NAME = "number";
this.BOOL_TYPE_NAME = "boolean";
this.BOOL_TRUE_VAL = "TRUE";
this.BOOL_FALSE_VAL = "FALSE";
this.PRELOADER_WIDTH_SCALE = 2;
this.PRELOADER_HEIGHT_SCALE = 30;
this.MIN_PAGE_OFFSET = 0.99;
this.MIN_PAGE_OFFSET2 = 0.99;
this.DEF_PRELOADER_TYPE = "Progress Bar";
this.DEF_CACHE_SIZE = 80;
this.DEF_WIDTH = 100;
this.DEF_HEIGHT = 100;
this.DEF_FIRST_PAGE = 0;
this.DEF_SHADOWS_DEPTH = 1;
this.DEF_MOVE_SPEED = 2;
this.DEF_CLOSE_SPEED = 3;
this.DEF_GOTO_SPEED = 3;
this.DEF_ALWAYS_OPENED = false;
this.DEF_FLIP_ON_CLICK = true;
this.DEF_LOAD_ON_DEMAND = true;
this.DEF_CACHE_PAGES = true;
this.DEF_USE_PRELOADER = true;
this.DEF_PAGEBACK = 0xAEAEAE;
this.DEF_SCALE_CONTENT = true;
this.DEF_SOUND = "default";
this.DEF_NO_SOUND = "";
this.DEF_AUTOFLIP = 50;
this.EMPTY_PAGE = "_empty";
this.TRANSPARENT_PAGE1 = "_transp1";
this.TRANSPARENT_PAGE2 = "_transp2";
this.INIT_STATE = 0;
this.UNACTIVE_STATE = 1;
this.FLIPPING_STATE = 2;
this.FLIPOVER_STATE = 3;
this.FLIPBACK_STATE = 4;
this.AUTOFLIP_STATE = 5;
this.GOTOPAGE_STATE = 6;
this.FLIP_GOTOPAGE_STATE = 7;
this.FLIP_CORNER_STATE = 8;
this.START_FLIP_CORNER_STATE = 9;
this.CACHE_DEPTH = 100;
this.BOOK_DEPTH = 10000;
this.PAGE_01_MC_NAME = "p01";
this.PAGE_02_MC_NAME = "p02";
this.PAGE_03_MC_NAME = "p03";
this.PAGE_04_MC_NAME = "p04";
this.MASK_03_MC_NAME = "m03";
this.MASK_12_MC_NAME = "m12";
this.SHADOW_03_MC_NAME = "s03";
this.SHADOW_04_MC_NAME = "s04";
this.SH_MASK_03_MC_NAME = "shm03";
this.SH_MASK_04_MC_NAME = "shm04";
this.PAGES_SH_MC_NAME = "s12";
this.PAGES_SHM_MC_NAME = "shm12";
this.STATIC_SHADOW_MC_NAME = "shStatic";
this.PAGE01_DEPTH = 8;
this.PAGE02_DEPTH = 5;
this.PAGE03_DEPTH = 4;
this.PAGE04_DEPTH = 0;
this.SH12_SCALE = 0.4;
this.SH3_SCALE = 1.6;
this.SPEED_DIV = 10;
}
function FFlippingBookBroker() {
this.objects = new Array();
}
FFlippingBookBroker.prototype.registerObject = function(id, obj) {
this.objects[id] = obj;
};
function FFlippingBookCache(broker, usePreloader, cachePages, loadOnDemand, bgColor) {
this._broker = broker;
this._const = new FFlippingBookConstants();
this._broker.registerObject(this._const.CACHE_OBJ_ ID, this);
this._baseObject = this._broker.objects[this._const.MAIN_OBJ_ID];
this._pagesDepth = this._const.CACHE_DEPTH;
this.usePreloader = usePreloader;
this.cachePages = cachePages;
this.loadOnDemand = loadOnDemand;
this.bgColor = bgColor;
this.__pagesLinks = new Array();
this.__pagesProcess = new Array();
this.__pagesHolders = new Array();
this.__pagesLoaders = new Array();
this.__pagesTimeouts = new Array();
this.__pagesLoading = new Array();
this.__pagesExt = new Array();
this.__pagesDepths = new Array();
this.__pagesBacks = new Array();
this.__pagesMasks = new Array();
this.__checkCompleted = new Array();
this.__pagesShadows1 = new Array();
this.__pagesShadows2 = new Array();
this._sound = new Sound(this._baseObject);
this._isSound = true;
this._soundTimeout = this._const.MEDIA_TIMEOUT;
this.sd = this._baseObject.shadowsDepth;
this.ssd = this._baseObject.staticShadowsDepth;
this._mediaComplete = false;
this._soundComplete = false;
this._pagesComplete = false;
this.extXML = new XML();
this.extXML.ignoreWhite = true;
this.extXML._parentObj = this;
this.extXML.onLoad = this.onXMLComplete;
}
FFlippingBookCache.prototype._stripItem = function(str) {
var end = str.indexOf(this._const.DELIMITER)+this._const.DEL IMITER.length;
return str.substr(end);
};
FFlippingBookCache.prototype.loadExternalXML = function(src) {
if (src != "") {
this.extXML.load(src);
} else {
this._baseObject._onXMLComplete(false);
}
};
FFlippingBookCache.prototype.onXMLComplete = function(success) {
if (success && this.status == 0) {
this._parentObj._baseObject._onXMLComplete();
} else if (this.status != 0) {
trace(this._parentObj._const.INVALID_XML_MSG);
}
};

EL SCRIPT ESTA INCOMPLETO PORQUE NO ENTRABA TODO, SUPONGO QUE CON ESTA PARTE ALCANZARA