Foros del Web » Creando para Internet » Flash y Actionscript »

swf no carga en el explorador

Estas en el tema de swf no carga en el explorador en el foro de Flash y Actionscript en Foros del Web. Hola a todos: Hice una galería de imágenes que al probar en la exportación del archivo tanto en html y swf funciona correctamente, pero cuando ...
  #1 (permalink)  
Antiguo 23/06/2010, 16:49
 
Fecha de Ingreso: junio-2010
Ubicación: Santiago
Mensajes: 12
Antigüedad: 13 años, 10 meses
Puntos: 1
swf no carga en el explorador

Hola a todos:

Hice una galería de imágenes que al probar en la exportación del archivo tanto en html y swf funciona correctamente, pero cuando la inserto en el dreamweaver y al privualizarlo en un explorador no se ven las imágenes, se ve solamente el fondo, ya he probdo de todo, copié el código html, etc.

ya no sé que hacer

este es el código de acciones en el content_mc:
import mx.transitions.Tween;
import mx.transitions.easing.*;
slideShow = true
if (slideShow) {
bttnAutoPlay.gotoAndStop(2);
}
ID = 0;
info_mc._alpha = 0;
//
// CASCADING STYLE SHEET
//
var styles = new TextField.StyleSheet();
// Set hyperlink colour and decoration here
styles.setStyle("a:link", {color:'#00FFFF', textDecoration:'none'});
styles.setStyle("a:hover", {color:'#00FFFF', textDecoration:'none'});
info_mc.txt.html = true;
info_mc.txt.styleSheet = styles;
//
// BANNER BUTTON
//
//Set getURL options when banner is pressed here
bannerPress = function () {
getURL(Link[ID], "_self");
};
//
// MENU BUTTON
//
menuPress = function (obj) {
clearInterval(_global.timeInterval);
ID = obj.ID;
imageLoad();
};
//
// AUTOPLAY BUTTON
//
bttnAutoPlay.bttn.onPress = function() {
if (this._parent._currentframe == 1) {
slideShow = true;
this._parent.gotoAndStop(2);
bannerTimer();
} else {
slideShow = true;
this._parent.gotoAndStop(1);
clearInterval(_global.timeInterval);
}
};
//
// AUTOMATED BANNER FUNCTION
//
bannerTimer = function () {
trace('slideshow timer')
if (slideShow) {
clearInterval(_global.timeInterval);
ID += 1;
if (ID == total) {
ID = 0;
}
imageLoad();
}
};
//
// DISPLAY INFO TEXT
//
setText = function () {
info_mc.txt.htmlText = xmlNode.childNodes[ID].childNodes[0].firstChild.nodeValue;
info_mc.bg._width = holder_mc._width;
info_mc.txt._width = info_mc.bg._width-20;
info_mc.txt._x = info_mc.bg._x+10;
info_mc.txt._height = info_mc.txt.textHeight+10;
info_mc.bg._height = info_mc.txt._height+10;
info_mc._x = holder_mc._x;
info_mc._y = holder_mc._y+holder_mc._height-info_mc._height;
};
var tweenInfo:Tween = new Tween(info_mc, "_alpha", Strong.easeOut, 0, 0, 20, false);
//
// DETECT LARGE IMAGE ROLLOVER
//
onMouseMove = function () {
if (holder_mc.hitTest(_root._xmouse, _root._ymouse, true)) {
tweenInfo.continueTo(100);
} else {
tweenInfo.continueTo(0);
}
};
//
// BUILD BANNER DISPLAY
//
construct = function () {
for (i=0; i<total; i++) {
//Vars from XML
Image[i] = xmlNode.childNodes[i].attributes.Image;
Delay[i] = xmlNode.childNodes[i].attributes.Delay;
Link[i] = xmlNode.childNodes[i].attributes.Link;
//Build menu
menu_mc.bttn_mc.duplicateMovieClip("bttn_mc"+i, i);
menu_mc["bttn_mc"+i]._x = (menu_mc.bttn_mc._width+1)*i;
menu_mc["bttn_mc"+i].ID = i;
menu_mc["bttn_mc"+i].num_mc.num.text = i+1;
preloader_mc._x = menu_mc._x+menu_mc._width+15;
//Set menu hilight
}
imageLoad();
};
//
// CALL FUNCTION TO LOAD IMAGE
//
imageLoad = function () {
for (i=0; i<total; i++) {
if (menu_mc["bttn_mc"+i].ID == ID) {
menu_mc["bttn_mc"+i].gotoAndStop(2);
} else {
menu_mc["bttn_mc"+i].gotoAndStop(1);
}
}
holder_mc._alpha = 0;
loadMovie(Image[ID], holder_mc);
};
//
// CALL FUNCTION ONCE IMAGE HAS LOADED
//
imageLoaded = function () {
var tweenAlpha:Tween = new Tween(holder_mc, "_alpha", Regular.easeOut, 0, 100, 40, false);
clearInterval(_global.timeInterval);
_global.timeInterval = setInterval(bannerTimer, Delay[ID]);
setText();
};
tweenAlpha["onMotionFinished"] = function () {
holder_mc.play();
};
//
// LOAD XML
//
loadXML = function (loaded) {
if (loaded) {
xmlNode = this.firstChild;
Image = [];
Delay = [];
Link = [];
total = xmlNode.childNodes.length;
headerName.text = xmlNode.attributes.Name;
} else {
trace("Error loading XML");
}
};
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("slideshow/content.xml");
stop();

Y el código de acciones en la escena layer2:

Stage.scaleMode = "noScale";
import mx.transitions.Tween;
import mx.transitions.easing.*;
bg_mc._alpha = 0;
content_mc._alpha = 0;
showContent = function () {

var tweenBgAlpha:Tween = new Tween(bg_mc, "_alpha", Strong.easeOut, 0, 100, 20, false);
tweenBgAlpha["onMotionFinished"] = function () {
var tweenContentAlpha:Tween = new Tween(content_mc, "_alpha", Strong.easeOut, 0, 100, 20, false);
};
};
onEnterFrame = function () {
if (content_mc.xmlData.loaded && this._alpha == 100) {
showContent();
content_mc.construct();
_root.preloaderXML_mc._visible = false;
delete onEnterFrame;
}
};
stop();

El código del xml:

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<content Name="slideshow">
<item Image="slideshow/image1.jpg" Delay="3000" Link="http://www.forosdelweb.com.">
<copy><![CDATA[<a href="http://www.forosdelweb.com." target="_self"><font color="#FFFFFF" size="15">Leer mas...</font></a>.]]></copy>
</item>
<item Image="slideshow/image2.jpg" Delay="3000" Link="http://www.forosdelweb.com.">
<copy><![CDATA[<a href="http://www.forosdelweb.com.l" target="_self"><font color="#FFFFFF" size="15">Leer mas...</font></a>.]]></copy>
</item>
<item Image="slideshow/image3.jpg" Delay="3000" Link="http://www.forosdelweb.com.">
<copy><![CDATA[<a href="http://www.forosdelweb.com." target="_self"><font color="#FFFFFF" size="15">Leer mas...</font></a>.]]></copy>
</item>
<item Image="slideshow/image4.jpg" Delay="3000" Link="http://www.forosdelweb.com.">
<copy><![CDATA[<a href="http://www.forosdelweb.com." target="_self"><font color="#FFFFFF" size="15">Leer mas...</font></a>.]]></copy>
</item>
<item Image="slideshow/image5.jpg" Delay="3000" Link="http://www.forosdelweb.com.">
<copy><![CDATA[<a href="http://www.forosdelweb.com." target="_self"><font color="#FFFFFF" size="15">Leer mas...</font></a>.]]></copy>
</item>
<item Image="slideshow/image6.jpg" Delay="3000" Link="http://www.forosdelweb.com.">
<copy><![CDATA[<a href="http://www.forosdelweb.com" target="_self"><font color="#FFFFFF" size="15">Leer mas...</font></a>.]]></copy>
</content>


Ayuda por favor, ¡¡¡¡urgente!!!
  #2 (permalink)  
Antiguo 24/06/2010, 07:39
 
Fecha de Ingreso: mayo-2005
Mensajes: 217
Antigüedad: 18 años, 10 meses
Puntos: 5
Respuesta: swf no carga en el explorador

el arhivo que carga el swf, donde se encuetra.
como es la estructura de tu sitio?
algo asi:
./
.galeria.html
.galeria.swf
.slideshow/image1.jpg
.slideshow/image2.jpg
.slideshow/image3.jpg

seguro que tienes un problema con las rutas..
lo mejor que puedes hacer es crear en un peli un text
y utilizarlo para ver que valores te da Image[ID], cuando estas en un servidor

loadMovie(Image[ID], holder_mc);
mitext.text=Image[ID]

Etiquetas: carga, explorador, swf
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 20:25.