21/06/2010, 07:28
|
| | | Fecha de Ingreso: noviembre-2007 Ubicación: In the BeaCh
Mensajes: 874
Antigüedad: 17 años Puntos: 10 | |
Respuesta: Ejecutar php desde flash He aqui parte del código actionscript, donde lo tendría que colocar? Cita: //
lstThumb.onLoadInit = function(mc:MovieClip) {
mc._parent.pre._visible = false;
var aimg:Tween = new Tween(mc, "_alpha", Regular.easeOut, 0, 100, 1, true);
mc._width = 80;
mc._height = 60;
};
mclThumb.addListener(lstThumb);
//
lstImg.onLoadStart = function(mc:MovieClip) {
mc._alpha = 0;
pre.bar._xscale = 0;
pre._visible = true;
};
lstImg.onLoadProgress = function(mc:MovieClip, loaded:Number, total:Number) {
var pct:Number = Math.round(loaded/total*100);
pre.bar._xscale = pct;
};
lstImg.onLoadInit = function(mc:MovieClip) {
pre._visible = false;
mc._x = (stageWidth-mc._width)/2;
mc._y = (stageHeight-mc._height)/2;
var amc:Tween = new Tween(mc, "_alpha", Regular.easeOut, 0, 100, 1, true);
amc.onMotionFinished = function() {
var cpt:String = new String(fn[idAtual].attributes.caption);
if (cpt == undefined || cpt == "undefined" || cpt == "") {
caption._y = (-caption._height);
} else {
caption.value = cpt;
var cy:Tween = new Tween(caption, "_y", Regular.easeOut, caption._y, 0, 1, true);
}
};
};
mclImg.addListener(lstImg);
//
xml.ignoreWhite = true;
xml.onLoad = function(sucess) {
if (sucess) {
fn = xml.firstChild.childNodes;
total = fn.length;
for (var j:Number = 0; j<total; j++) {
var btn:MovieClip = menu.thumb.attachMovie("thumb", "thumb"+j, j);
btn._x = (btn._width+space)*j;
btn.id = j;
btn.onRollOver = function() {
this.border.gotoAndStop(2);
};
btn.onRollOut = function() {
this.border.gotoAndStop(1);
};
btn.onRelease = function() {
loadImg(this.id);
};
mclThumb.loadClip(fn[j].attributes.thumb,btn.img);
}
loadImg(idAtual);
} else {
trace("Error!");
}
};
xml.load(xmlFile);
function loadImg(id:Number) {
idAtual = id;
for (var j:Number = 0; j<total; j++) {
menu.thumb["thumb"+j].enabled = true;
menu.thumb["thumb"+j].border.gotoAndStop(1);
menu.thumb["thumb"+j].thumbId._visible = false;
}
menu.thumb["thumb"+id].enabled = false;
menu.thumb["thumb"+id].border.gotoAndStop(3);
menu.thumb["thumb"+id].thumbId._visible = true;
menu.thumb["thumb"+id].thumbId.thumbId.text = menu.qtd.text=(idAtual+1)+" OF "+(total);
var cy:Tween = new Tween(caption, "_y", Regular.easeOut, caption._y, -caption._height, 1, true);
var ha:Tween = new Tween(holder, "_alpha", Regular.easeOut, holder._alpha, 0, 1, true);
ha.onMotionFinished = function() {
mclImg.loadClip(fn[id].attributes.src,holder);
};
} |