cs_alexgr
Messages postés36Date d'inscriptionmercredi 21 juillet 2004StatutMembreDernière intervention 8 octobre 2006
-
29 sept. 2006 à 22:08
fguitton
Messages postés396Date d'inscriptionsamedi 16 avril 2005StatutMembreDernière intervention13 novembre 2009
-
1 oct. 2006 à 11:53
J'ai acheté un site mais il a qque petit problemes: voici le code complet et tout en dessous se trouve les messages d'erreurs, comme l'aide est en anglais sur les autres sites, est ce que qqu'un de calé en AS2 peut m'aider????
class com.Interface extends com.oop.utils.Utils
{
var inited, r, config, configFile, headdersH, mainW, mainH, infoSpace, soundBtn, soundBtn2, soundEffect, soundSM, playSnd, videoBufferTime, css, owner, bgListener, mouseListener, mainLoader, mainBox, nHD, load, center, temp_data, temp_xml, gHeadder, gNode, bgTypeDefault, gColor, bgImageDefault, bg, hex, mainMask, musicBox, addShape, title_mc, content_mc, content_mask, menu_mc, headders_mc, gradHeadders_mc, contentW, contentH, contentFormat, _alpha, setColor, fx, node, _parent, txt, msg, unsetColor, lastHeadder, bitData, snd, colorIn, nextNodes, sNode, prevNodes, actualNodes, totalNodes, thumbViewW, thumbViewH, number, stopDrag, startDrag, swapDepths, moveX, moveY, icon_mc, addTagColorToTxt, scroll, sHeadder, gTitle, sId, sTitle, sIcon, interface;
function Interface(xmlFile, w, h, sound1, sound2, soundFX, soundSubMenu, vFT)
{
super();
inited = false;
r = _root;
config = new com.oop.data.XmlDatum();
configFile = xmlFile;
headdersH = h;
mainW = w;
mainH = Stage.height;
infoSpace = false;
soundBtn = sound1;
soundBtn2 = sound2;
soundEffect = soundFX;
soundSM = soundSubMenu;
this.playSnd(soundBtn);
this.playSnd(soundBtn2);
this.playSnd(soundEffect);
videoBufferTime = vFT || 1;
Stage.align = "TL";
Stage.scaleMode = "noScale";
css = new TextField.StyleSheet();
css.owner = this;
css.onLoad = function ()
{
owner.importConfigData();
};
css.load("styles/main.css");
this.onResizeSite();
this.createMainBox();
} // End of the function
function onResizeSite()
{
bgListener = new Object();
bgListener.owner = this;
bgListener.onResize = function ()
{
owner.resizeSite();
};
Stage.addListener(bgListener);
} // End of the function
function mouseControl()
{
mouseListener = new Object();
mouseListener.owner = this;
mouseListener.onMouseMove = function ()
{
var _loc3 = owner.mainBox;
var _loc2 = owner.menu_mc;
var _loc4 = owner.headders_mc;
var _loc5 = _loc4._holder;
if (_loc5[owner.sHeadder] != owner.lastHeadder)
{
if (_loc2._xmouse < 0 || _loc2._ymouse < 0 || _loc2._xmouse > _loc2._width || _loc2._ymouse > _loc2._height)
{
owner.changeHeadder(owner.sHeadder);
} // end if
} // end if
var _loc9 = mainW;
var _loc6 = _loc2._y + _loc2._height + _loc4._height;
var _loc7 = _loc2._y;
var _loc8 = 0;
if (_loc3._xmouse < _loc8 || _loc3._xmouse > _loc9 || _loc3._ymouse < _loc7 || _loc3._ymouse > _loc6)
{
if (_loc2.over.fx._on)
{
_loc2.over.fx.close();
} // end if
} // end if
};
Mouse.addListener(mouseListener);
} // End of the function
function importConfigData()
{
this.decode("<loader>Loading XML Data</loader>", mainLoader.txt, "-", 1);
config.loadDatum(configFile, mainLoader.bar);
this.mainWatch("addLogo");
} // End of the function
function addLogo()
{
var _loc2 = mainBox.attachMovie("container", "logo", this.nHD(mainBox));
var _loc3 = _loc2.createEmptyMovieClip("pic", 0);
_loc2._alpha = 0;
this.load(config.datum.firstChild.attributes.logoLeft, _loc3, mainLoader.bar);
this.mainWatch("showLogo");
} // End of the function
function showLogo()
{
mainBox.logo.fade(300, 300);
if (mainBox.bg._width < mainBox.logo._width + 40)
{
mainBox.bg.resizeW(0, 300, mainBox.logo._width + 40);
mainBox.shadow.resizeW(0, 300, mainBox.logo._width + 40);
mainBox.logo._x = (mainBox.logo._width + 40 - mainBox.logo._width) / 2;
}
else
{
this.center(mainBox.logo, "_x", mainBox.bg);
} // end else if
mainBox.bg.resizeH(0, 300, mainBox.bg._height + mainBox.logo._height + 20);
mainBox.shadow.resizeH(0, 300, mainBox.bg._height + mainBox.logo._height + 20);
mainBox.logo._y = 20;
mainLoader.moveY(0, 300, mainLoader._y + mainBox.logo._height);
mainBox.moveY(0, 300, (Stage.height - mainBox._height) / 2);
mainBox.moveX(0, 300, (Stage.width - mainBox._width) / 2);
this.importData();
} // End of the function
function importData()
{
temp_data = config.datum.toString();
this.importAttachedData(0);
} // End of the function
function importAttachedData(val)
{
var _loc3 = config.items;
var _loc4 = _loc3[val].childNodes[0].nodeValue;
if (val > 0)
{
var _loc5 = _loc3[val - 1].childNodes[0].nodeValue;
if (_loc5)
{
var _loc6 = String(_loc5);
temp_data = temp_data.split(_loc6).join(String(temp_xml.datum));
} // end if
} // end if
if (val < _loc3.length)
{
if (_loc4)
{
temp_xml = new com.oop.data.XmlDatum();
temp_xml.loadDatum(_loc4, mainLoader.bar);
this.mainWatch("importAttachedData", ++val);
}
else
{
this.importAttachedData(++val);
} // end else if
}
else
{
temp_xml = new com.oop.data.XmlDatum();
config.datum.parseXML(temp_data);
config.items = config.datum.firstChild.childNodes;
this.setSite();
} // end else if
} // End of the function
function setSite()
{
gHeadder = config.items[0].parentNode.nodeName + 0;
this.setContent(config.items[0], 0);
this.setGColor();
this.loadBgDefault();
_global.setTimeout(this, "addMusicBox", 1000);
} // End of the function
function bgDefaultLoaded()
{
this.decode("<loader>Loaded Background</loader>", mainLoader.txt, "-", 1);
} // End of the function
function loadBgDefault()
{
bgTypeDefault = gNode.attributes.bgType || "color";
bgImageDefault = gNode.attributes.bgImg || gColor;
bg = new com.Background();
if (bgTypeDefault == "image")
{
bg.addImage(bgImageDefault, mainLoader.bar);
this.decode("<loader>Loading Background</loader>", mainLoader.txt, "-", 1);
this.mainWatch("bgDefaultLoaded");
}
else if (bgTypeDefault == "pattern")
{
bg.addPattern(bgImageDefault, mainLoader.bar);
this.decode("<loader>Loading Background</loader>", mainLoader.txt, "-", 1);
this.mainWatch("bgDefaultLoaded");
}
else
{
bg.addColor(this.hex(gColor));
this.decode("<loader>Adding Bg Color</loader>", mainLoader.txt, "-", 1);
} // end else if
bg.bar_temp._visible = false;
new com.oop.core.Watcher(bg, "bg_completed", true, this, "init");
} // End of the function
function addBg(img, _type)
{
if (img != bgImageDefault && gColor != bgImageDefault)
{
bgImageDefault = img || gColor;
bgTypeDefault = _type || "color";
if (bgTypeDefault == "image")
{
bg.addImage(bgImageDefault);
}
else if (bgTypeDefault == "pattern")
{
bg.addPattern(bgImageDefault);
}
else
{
bg.addColor(this.hex(gColor));
} // end else if
} // end else if
} // End of the function
function resizeSite()
{
bg.resize();
this.center(mainBox, "_x");
mainBox._x = Math.ceil(mainBox._x);
mainMask._width = Stage.width;
if (!inited)
{
this.center(mainLoader, "_x");
}
else
{
mainLoader._x = mainBox._x;
} // end else if
musicBox.player.resizeBg(undefined, Stage.height);
} // End of the function
function init()
{
this.prepare();
inited = true;
} // End of the function
function prepare()
{
mainLoader.txt._visible = false;
mainBox.shadow._visible = false;
mainBox.hClosed = mainBox.logo._height + marginLogo * 2;
var _loc3 = (Stage.width - mainW) / 2;
mainBox.moveY(0, 300, 0);
mainBox.bg.resizeH(0, 300, mainBox.hClosed);
mainBox.moveX(0, 300, _loc3 + mainW - mainBox._width);
mainBox.moveX(300, 300, _loc3);
mainBox.bg.resizeW(300, 300, mainW);
mainBox.logo.moveX(0, 300, marginLogo);
mainBox.logo.moveY(0, 300, marginLogo);
mainLoader.bar.resizeW(300, 300, mainW);
mainLoader.bar.moveX(0, 300, 0);
mainLoader.moveX(0, 300, _loc3);
mainLoader.moveY(0, 300, mainBox.hClosed - mainLoader.bar._y);
_global.setTimeout(this, "build", 840);
} // End of the function
function build()
{
mainMask = this.addShape(r, "mainMask", undefined, Stage.width, mainBox.bg._height, 0, mainBox._y);
mainBox.setMask(mainMask);
mainBox.bg._height = mainH;
mainLoader.txt._x = (mainW - mainLoader.txt._width) / 2;
this.addGradHeadders();
title_mc = mainBox.attachMovie("container", "title_mc", this.nHD(mainBox));
var _loc2 = title_mc.createEmptyMovieClip("pic", 0);
this.load(config.datum.firstChild.attributes.logoRight, _loc2);
_loc2.mcl_Listener.owner = this;
_loc2.mcl_Listener.onLoadInit = function ()
{
owner.title_mc._alpha = 0;
owner.title_mc._y = owner.marginLogo;
owner.title_mc._x = owner.mainW - (owner.title_mc._width + owner.marginLogo);
owner.title_mc.fade(0, 300);
};
mainBox.logo.swapDepths(this.nHD(mainBox));
content_mc = mainBox.attachMovie("container", "content_mc", this.nHD(mainBox));
content_mask = this.addShape(mainBox, "content_mask", undefined);
content_mc.setMask(content_mask);
mainLoader.setDefault();
mainMask.setDefault();
this.addHeadders();
this.addMenu();
menu_mc._x = 1;
menu_mc._y = mainBox.hClosed;
menu_mc.setDefault();
menu_mc.swapDepths(headders_mc);
headders_mc._y = menu_mc._y + menu_mc._height;
headders_mc.setDefault();
menu_mc._y = headders_mc._y;
this.addCopyright();
this.mouseControl();
this.setRelativePositions();
} // End of the function
function setRelativePositions()
{
mainH = Stage.height;
mainBox.bg._height = mainH;
mainBox.copyright._y = mainH - mainBox.copyright._height - mainLoader.bar._height;
gradHeadders_mc._y = mainBox.copyright._y - headdersH;
content_mc._y = headders_mc._y + headders_mc._height;
contentW = mainW;
contentH = mainBox.copyright._y - content_mc._y;
var _loc5 = 190;
contentFormat = new Object();
contentFormat.left = {x: contentM, y: contentM, w: _loc5, h: contentH - contentM * 2};
contentFormat.right = {x: _loc5 + contentM * 2, y: contentM, w: contentW - (_loc5 + contentM * 3), h: contentH - contentM * 2};
contentFormat.icon = {x: contentIM, y: contentIM};
content_mask._y = content_mc._y;
content_mask._width = contentW;
content_mask._height = contentH;
} // End of the function
function addCopyright()
{
var _loc3 = mainBox.attachMovie("container", "copyright", this.nHD(mainBox));
_loc3.attachMovie("background_copyright", "bg", 0);
_loc3.bg._width = mainW;
_loc3.txt = this.addText("<copyright>" + config.copyright + "</copyright>", "p_txt", _loc3, 3);
_loc3.bg._height = _loc3.txt._height;
var _loc2 = _loc3.attachMovie("container", "sound_btn", this.nHD(_loc3));
_loc2.txt = this.addText("<copyright>SOUND</copyright>", "p_txt", _loc2, 0);
_loc2.attachMovie("speaker_icon", "icon", this.nHD(_loc2));
_loc2.icon._y = (_loc3.bg._height - _loc2.icon._height) / 2 + 1;
_loc2.icon._x = _loc2.txt._width - 2;
_loc2._x = mainW - _loc2._width - 3;
_loc2.owner = this;
_loc2.onPress = function ()
{
if (owner.musicBox.open)
{
owner.closeMusicBox();
}
else
{
owner.openMusicBox();
} // end else if
owner.playSnd(owner.soundBtn2);
owner.unsetColor(this);
};
_loc2.onRollOver = function ()
{
owner.playSnd(owner.soundBtn);
owner.setColor(this, owner.hex(owner.gColor));
};
_loc2.onRollOut = function ()
{
_alpha = 100;
owner.unsetColor(this);
};
} // End of the function
function addMenu()
{
menu_mc = mainBox.attachMovie("container", "menu_mc", this.nHD(mainBox));
var _loc4 = 0;
for (var _loc2 = 0; _loc2 < config.items.length - 1; ++_loc2)
{
var _loc3 = this.addBtnMenu(menu_mc, _loc4, _loc2);
_loc4 = menu_mc._width - 7;
if (_loc2 == 0)
{
menu_mc.selected = _loc3;
this.setColor(_loc3.bg, this.hex(gColor));
_loc3.enabled = false;
} // end if
} // end of for
} // End of the function
function addBtnMenu(place, x, n)
{
var _loc3 = 1000 - n;
var _loc2 = place.attachMovie("main_btn", "btn" + _loc3, _loc3);
_loc2._x = x;
_loc2.dDefault = _loc3;
_loc2.ref = n;
_loc2.msg = "<menuBtn>" + config.items[n].attributes.title + "</menuBtn>";
_loc2.msgSelected = "<menuBtnSelected>" + config.items[n].attributes.title + "</menuBtnSelected>";
_loc2.node = config.items[n];
_loc2.gHeadder = _loc2.node.parentNode.nodeName + _loc2.ref;
this.setMainBtn(_loc2);
_loc2.fx = this.addMainSubMenu(_loc2.node, _loc2);
_loc2.owner = this;
_loc2.onPress = function ()
{
fx.closed();
owner.gHeadder = gHeadder;
owner.setContent(node, 0);
owner.closeSite();
owner.playSnd(owner.soundBtn2);
};
_loc2.onRollOver = function ()
{
if (this != _parent.over)
{
_parent.over.fx.close();
} // end if
if (node.childNodes.length > 1)
{
fx.open();
} // end if
owner.playSnd(owner.soundBtn);
owner.setColor(txt, owner.hex(owner.gColor));
owner.decode(msg, txt, undefined, 3);
owner.changeHeadder(gHeadder);
_parent.over = this;
};
_loc2.onRollOut = function ()
{
owner.unsetColor(txt);
};
return (_loc2);
} // End of the function
function addMainSubMenu(node, ref)
{
var _loc3 = mainBox.createEmptyMovieClip("submenu" + this.nHD(mainBox), this.nHD(mainBox));
var _loc4 = 10 * node.childNodes.length;
if (_loc4 > headders_mc._height - 30)
{
_loc4 = headders_mc._height - 30;
} // end if
var _loc2 = new com.oop.menus.Shuffle(_loc3, "shuffle_btn", node, this, "setSubMenuBtns", _loc4);
_loc2.setCSS(css, "subMenuBtn");
_loc2.setSound(soundSM);
_loc2.init();
_loc2.setOrigin(_loc2.maxW / 2, headders_mc._height / 2, 0, 0);
_loc2.closed();
_loc3._x = ref._x + (ref._width - _loc2.maxW) / 2;
_loc3._y = mainBox.hClosed + menu_mc._height + 15;
return (_loc2);
} // End of the function
function addIconSubMenu(node, ref)
{
var _loc4 = ref._parent.createEmptyMovieClip("submenu" + this.nHD(ref._parent), this.nHD(ref._parent));
var _loc5 = 10 * node.childNodes.length;
if (_loc5 > ref.bg._height + contentIM)
{
_loc5 = ref.bg._height + contentIM;
} // end if
var _loc2 = new com.oop.menus.Shuffle(_loc4, "shuffle_btn", node, this, "setSubMenuBtns", _loc5);
_loc2.setCSS(css, "subMenuBtn");
_loc2.setSound(soundSM);
_loc2.init();
_loc2.setOrigin(-50, 0, 0);
_loc2.closed();
_loc4._x = ref.bg._width + contentIM;
_loc4._y = ref._y + _loc2.maxH;
return (_loc2);
} // End of the function
function setSubMenuBtns(btn, node)
{
btn.bg.owner = this;
btn.bg.onPress = function ()
{
owner.playSnd(owner.soundBtn2);
owner.setContent(node.parentNode, _parent.id);
owner.closeSite();
_parent.fx.closed();
};
btn.bg.onRollOver = function ()
{
owner.playSnd(owner.soundBtn);
owner.setColor(this, owner.hex(owner.gColor));
owner.setColor(_parent.title, 16777215);
};
btn.bg.onRollOut = function ()
{
owner.unsetColor(this);
owner.unsetColor(_parent.title);
};
} // End of the function
function setMainBtnSelected(btn)
{
menu_mc.selected = btn;
btn.enabled = false;
this.setColor(btn.bg, this.hex(gColor));
btn.txt.decode._stop();
btn.txt.removeMovieClip();
btn.txt = this.addText(btn.msgSelected, "title_txt", btn, 0, 0); btn.bg._width btn.shadow._width btn.txt._width + 25;
btn.bg._height = btn.txt._height + 2;
btn.shadow._height = btn.txt._height - 2;
btn.txt._x = (btn.bg._width - btn.txt._width) / 2;
btn._y = -2;
btn.txt._y = 2;
btn.swapDepths(this.nHD(menu_mc));
} // End of the function
function setMainBtn(btn)
{
btn.enabled = true;
this.unsetColor(btn.bg);
btn.txt.removeMovieClip();
btn.txt = this.addText(btn.msg, "p_txt", btn, 0, 0); btn.bg._width btn.shadow._width btn.txt._width + 25;
btn.bg._height = btn.txt._height;
btn.shadow._height = btn.txt._height - 2;
btn.txt._x = (btn.bg._width - btn.txt._width) / 2;
btn.swapDepths(btn.dDefault);
btn._y = 0;
} // End of the function
function addHeadders()
{
headders_mc = mainBox.attachMovie("container", "headders_mc", this.nHD(mainBox));
this.addShape(headders_mc, "bg", undefined, mainW - 1, headdersH + 7, 1, 0);
headders_mc.bg.setColor(gColor);
var _loc3 = headders_mc.attachMovie("container", "_holder", this.nHD(headders_mc));
var _loc2 = headders_mc.attachMovie("border", "border", this.nHD(headders_mc)); _loc2._y _loc3._y 3;
_loc2._width = mainW;
_loc2._height = headdersH;
this.addShape(headders_mc, "mask", undefined, _loc2._width, _loc2._height, 0, _loc2._y);
_loc3.setMask(headders_mc.mask);
this.loadHeadders(config.items, 0);
} // End of the function
function loadHeadders(node, n)
{
if (!node)
{
node = gNode.childNodes;
n = 0;
} // end if
var _loc4 = node[n].attributes.img;
var _loc6 = node[n].parentNode.nodeName + String(n);
if (_loc4 && !headders_mc._holder[_loc6])
{
mainLoader.txt._visible = true;
var _loc5 = headders_mc._holder.attachMovie("container", _loc6, this.nHD(headders_mc._holder));
_loc5._visible = false;
var _loc8 = _loc5.createEmptyMovieClip("pic", 0);
this.decode("<loader>Loading .../" + _loc4 + "</loader>", mainLoader.txt, "-");
this.load(_loc4, _loc8, mainLoader.bar);
if (n < node.length && node[n + 1].nodeName != "music")
{
this.mainWatch("loadHeadders", node, ++n);
}
else
{
var _loc7 = headders_mc._holder[node[n].parentNode.nodeName + String(0)];
_loc7._visible = true;
lastHeadder = _loc7;
this.mainWatch("openSite");
} // end else if
}
else if (n < node.length && node[n + 1].nodeName != "music")
{
this.loadHeadders(node, ++n);
}
else
{
_loc7 = headders_mc._holder[node[n].parentNode.nodeName + String(0)];
_loc7._visible = true;
this.openSite();
} // end else if
} // End of the function
function addGradHeadders()
{
gradHeadders_mc = mainBox.attachMovie("container", "gradHeadders_mc", this.nHD(mainBox));
var _loc4 = gradHeadders_mc.createEmptyMovieClip("_holder", this.nHD(gradHeadders_mc));
var _loc2 = gradHeadders_mc.attachMovie("gradientBottom", "gradient", this.nHD(gradHeadders_mc));
_loc2._width = mainW;
_loc2._height = headdersH;
var _loc5 = this.addShape(gradHeadders_mc, "mask", undefined, mainW - 3, headdersH, 2, 0);
var _loc3 = this.addShape(gradHeadders_mc, "mask2", undefined, mainW - 3, headdersH, 2, 0);
_loc2.setMask(_loc5);
_loc4.setMask(_loc3);
} // End of the function
function setGradHeadder()
{
var _loc2 = headders_mc._holder[gHeadder].pic;
bitData.dispose();
bitData = new Object();
if (gNode.attributes.imgOnBottom == "true")
{
bitData = new flash.display.BitmapData(_loc2._width, _loc2._height, true);
bitData.draw(_loc2);
gradHeadders_mc._holder.attachBitmap(bitData, 0, "never", false);
} // end if
} // End of the function
function closeImagePanel(place)
{
place.bg.resizeW(0, 200, place.bg._width - place._holder._width + 45);
place.shadow.resizeW(0, 200, place.shadow._width - place._holder._width + 50);
place._holder.mask.resizeW(0, 200, 50);
place.moveX(0, 200, (Stage.width - (place.bg._width - place._holder._width + 45)) / 2);
place.moveX(200, 200, Stage.width);
place.fade(200, 200, 0);
snd.play(soundEffect);
_global.setTimeout(place, "removeMovieClip", 560);
} // End of the function
function addImagePanel(node)
{
var _loc3 = r.attachMovie("container", "img" + this.nHD(r), this.nHD(r));
var _loc12 = _loc3.attachMovie("shapeRD5", "shadow", this.nHD(_loc3));
var _loc8 = _loc3.attachMovie("background_2", "bg", this.nHD(_loc3));
var _loc4 = _loc3.attachMovie("container", "_holder", this.nHD(_loc3));
var _loc19 = _loc4.attachMovie("shapeRD", "border", this.nHD(_loc4));
var _loc24 = _loc4.createEmptyMovieClip("pic", this.nHD(_loc4));
_loc4.attachMovie("mask_rounded", "mask", this.nHD(_loc4));
_loc4.mask._visible = false;
_loc12._alpha = 10; _loc19._width _loc19._height 100;
_loc4.info = this.addText(" ", "p_txt", _loc4);
_loc4.info._y = _loc19._height - _loc4.info._height - 2;
_loc4.info._x = 2;
_loc4.info._alpha = 0;
_loc4.info.fade(0, 300);
var _loc10 = 7;
var _loc5 = 180;
var _loc6 = 3.500000E+000;
var _loc2 = _loc3.attachMovie("container", "info", this.nHD(_loc3));
if (gNode.nodeName == "features")
{
var _loc16 = this.addText("<title_field>DATE</title_field>", "p_txt", _loc2, 0, 0, _loc5);
var _loc13 = this.addText("<title_field>" + node.nodeName.toUpperCase() + "</title_field>", "p_txt", _loc2, 0, 0, _loc5);
var _loc14 = this.addText("<title_field>COMMENTS</title_field>", "p_txt", _loc2, 0, 0, _loc5);
var _loc18 = this.addText("<description_field>" + node.attributes.date + "</description_field>", "p_txt", _loc2, 0, 0, _loc5);
var _loc17 = this.addText("<description_field>" + node.attributes.title + "</description_field>", "p_txt", _loc2, 0, 0, _loc5);
var _loc21 = this.addText("<description_field>" + node.attributes.description + "</description_field>", "p_txt", _loc2, 0, 0, _loc5);
this.setColor(_loc16, this.hex(gColor));
this.setColor(_loc13, this.hex(gColor));
this.setColor(_loc14, this.hex(gColor));
_loc18._y = _loc16._y + _loc16._height - _loc6;
_loc13._y = _loc18._y + _loc18._height;
_loc17._y = _loc13._y + _loc13._height - _loc6;
_loc14._y = _loc17._y + _loc17._height;
_loc21._y = _loc14._y + _loc14._height - _loc6;
var _loc7 = _loc2.attachMovie("container", "order_btn", this.nHD(_loc2));
_loc7.attachMovie("shapeRD5", "bg", this.nHD(_loc2));
var _loc20 = this.addText("<order_btn>ORDER " + node.nodeName.toUpperCase() + "</order_btn>", "title_txt", _loc7);
_loc7.bg._width = _loc20._width + _loc6;
_loc7.bg._height = _loc20._height;
_loc20._y = 1;
this.setColor(_loc7.bg, this.hex(gColor));
_loc7._y = _loc2._height + 20;
_loc7.owner = this;
_loc7.onRollOver = function ()
{
this.colorIn(0, 300);
owner.playSnd(owner.soundBtn);
};
_loc7.onPress = function ()
{
getURL(node.attributes.link, "_blank");
owner.playSnd(owner.soundBtn2);
};
}
else
{
_loc16 = this.addText("<title_field>DATE</title_field>", "p_txt", _loc2, 0, 0, _loc5);
_loc13 = this.addText("<title_field>TITLE</title_field>", "p_txt", _loc2, 0, 0, _loc5);
var _loc15 = this.addText("<title_field>LAUNCH</title_field>", "p_txt", _loc2, 0, 0, _loc5);
_loc14 = this.addText("<title_field>COMMENTS</title_field>", "p_txt", _loc2, 0, 0, _loc5);
_loc18 = this.addText("<description_field>" + node.attributes.date + "</description_field>", "p_txt", _loc2, 0, 0, _loc5);
_loc17 = this.addText("<description_field>" + node.attributes.title + "</description_field>", "p_txt", _loc2, 0, 0, _loc5);
var _loc11 = this.addText("<description_field>" + node.attributes.link + "</description_field>", "p_txt", _loc2, 0, 0, _loc5);
_loc21 = this.addText("<description_field>" + node.attributes.description + "</description_field>", "p_txt", _loc2, 0, 0, _loc5);
this.setColor(_loc16, this.hex(gColor));
this.setColor(_loc13, this.hex(gColor));
this.setColor(_loc15, this.hex(gColor));
this.setColor(_loc14, this.hex(gColor));
_loc18._y = _loc16._y + _loc16._height - _loc6;
_loc13._y = _loc18._y + _loc18._height;
_loc17._y = _loc13._y + _loc13._height - _loc6;
_loc15._y = _loc17._y + _loc17._height;
_loc11._y = _loc15._y + _loc15._height - _loc6;
_loc11.owner = this;
_loc11.onRollOver = function ()
{
owner.playSnd(owner.soundBtn);
};
_loc11.onPress = function ()
{
getURL(node.attributes.link, "_blank");
};
_loc14._y = _loc11._y + _loc11._height;
_loc21._y = _loc14._y + _loc14._height - _loc6;
} // end else if
var _loc9 = this.addText("<title_field>CLOSE PANEL X</title_field>", "p_txt", _loc2, 0, 0, _loc5);
this.setColor(_loc9, this.hex(gColor));
_loc2.close_btn = _loc9;
_loc9._y = _loc2._height + 20;
_loc9.owner = this;
_loc9.onPress = function ()
{
owner.snd.play(owner.soundBtn2);
owner.closeImagePanel(_parent._parent);
};
_loc9.onRollOver = function ()
{
owner.snd.play(owner.soundBtn);
owner.decode("<title_field>CLOSE PANEL X</title_field>", this);
};
_loc2._x = _loc10 + _loc6;
_loc2._y = _loc10;
_loc4._y = _loc10;
_loc4._x = _loc10 * 2 + _loc5 + _loc6;
_loc8._width = _loc10 * 4 + _loc5 + _loc4._width + _loc6;
_loc8._height = _loc10 + _loc3._height;
_loc8.owner = this;
_loc8.onPress = function ()
{
_parent.startDrag(false);
}; _loc8.onReleaseOutside _loc8.onRelease function ()
{
_parent.stopDrag();
};
_loc12._x = -5;
_loc12._y = 10;
_loc12._width = _loc8._width;
_loc12._height = _loc8._height;
var _loc23 = (Stage.width - _loc3._width) / 2;
var _loc22 = (Stage.height - _loc3._height) / 2;
_loc3._width = 0;
_loc3._height = 0;
_loc3._x = Stage.width / 2;
_loc3._y = Stage.height / 2;
_loc3.scale(0, 200, 100);
_loc3.moveX(0, 200, _loc23);
_loc3.moveY(0, 200, _loc22);
return (_loc3);
} // End of the function
function addGallery(node)
{
var _loc2 = content_mc.attachMovie("container", "right", this.nHD(content_mc)); _loc2.xDefault _loc2._x contentFormat.right.x; _loc2.yDefault _loc2._y contentFormat.right.y;
_loc2.wDefault = contentFormat.right.w;
_loc2.hDefault = contentFormat.right.h;
this.addThumbs(node, 0);
} // End of the function
function navThumbs(next)
{
var _loc3 = content_mc.right.thumbs;
if (_loc3)
{
for (var _loc5 in _loc3)
{
if (_loc3[_loc5] instanceof MovieClip && _loc3[_loc5] != _loc3)
{ var _loc4 Math.floor(Math.random() * 2) 1 ? (mainBox.copyright._y + 100) : (-350);
_loc3[_loc5].moveY(Math.random() * 1000, 800, _loc4);
_loc3[_loc5]._visible = true;
} // end if
} // end of for...in
_global.setTimeout(_loc3, "removeMovieClip", 1800);
} // end if
if (next)
{
this.addThumbs(sNode, Number(nextNodes));
}
else
{
this.addThumbs(sNode, Number(prevNodes));
} // end else if
} // End of the function
function addThumbs(node, n)
{
node = node.childNodes;
var _loc6 = 2;
var _loc7 = content_mc.right;
var _loc17 = 0;
var _loc11 = _loc7.hDefault;
var _loc8 = _loc7.wDefault;
if (infoSpace)
{
_loc8 = _loc8 - (infoSpaceW + contentM);
} // end if
var _loc3 = _loc7.attachMovie("container", "thumbs" + this.nHD(_loc7), this.nHD(_loc7));
_loc3._y = _loc17;
_loc7.thumbs = _loc3;
var _loc10 = node.length;
var _loc4 = 0;
var _loc5 = 0;
var _loc2;
for (var _loc14 = n; _loc14 < _loc10; ++_loc14)
{
_loc4 = _loc2._x + _loc2._width + _loc6 || 0;
if (_loc8 < _loc4 + _loc2._width)
{
_loc4 = 0;
_loc5 = _loc5 + (_loc2._height + _loc6);
if (_loc11 < _loc5 + _loc2._height)
{
break;
} // end if
} // end if
_loc2 = this.addThumb(node[_loc14], _loc3, _loc14);
_loc2._visible = false;
_loc2._x = _loc4;
_loc2._y = _loc5;
_loc2.setDefault();
} // end of for if (gNode.nodeName "videos" || gNode.nodeName "clients")
{
var _loc16 = _loc3.getInstanceAtDepth(0);
_loc16.onPress();
_loc16.stopDrag();
} // end if
var _loc18 = _loc2._height + _loc6;
var _loc19 = _loc2._width + _loc6;
actualNodes = n;
prevNodes = n - Math.floor(_loc11 / _loc18) * Math.floor(_loc8 / _loc19);
nextNodes = _loc14;
totalNodes = node.length;
content_mc.left.subtitle.write.htmlText = "" + gNode.attributes.title.toUpperCase() + " " + Number(actualNodes + 1) + "-" + nextNodes + " of " + totalNodes + "
";
var _loc15 = content_mc.left.prev;
var _loc13 = content_mc.left.next;
_loc15.enabled = prevNodes < 0 ? (false) : (true);
_loc13.enabled = _loc14 < _loc10 ? (true) : (false);
if (_loc13.enabled)
{
this.setColor(_loc13, this.hex(gColor));
}
else
{
this.unsetColor(_loc13);
} // end else if
if (_loc15.enabled)
{
this.setColor(_loc15, this.hex(gColor));
}
else
{
this.unsetColor(_loc15);
} // end else if
for (var _loc14 in _loc3)
{
if (_loc3[_loc14] instanceof MovieClip && _loc3[_loc14] != _loc3)
{
_loc3[_loc14]._y = Math.floor(Math.random() * 2) == 1 ? (_loc7.hDefault + 150) : (-350);
_loc3[_loc14].moveY(Math.random() * 1000, 800);
_loc3[_loc14]._visible = true;
} // end if
} // end of for...in
return (_loc3);
} // End of the function
function addThumb(node, place, n)
{
var _loc5 = 8;
var _loc6 = _loc5 * 2 + thumbViewW;
var _loc3 = place.attachMovie("container", "thumb" + this.nHD(place), this.nHD(place));
var _loc4 = _loc3.attachMovie("shapeRD5", "shadow", this.nHD(_loc3));
var bg = _loc3.attachMovie("background_2", "bg", this.nHD(_loc3));
var _loc2 = _loc3.attachMovie("container", "_holder", this.nHD(_loc3));
var _loc10 = _loc2.attachMovie("shapeRD", "border", this.nHD(_loc2), {_width: thumbViewW, _height: thumbViewH});
var _loc11 = _loc2.createEmptyMovieClip("pic", this.nHD(_loc2));
_loc2.attachMovie("mask_rounded", "mask", this.nHD(_loc2));
_loc2.mask.setW(thumbViewW);
_loc2.mask.setH(thumbViewH);
_loc3.number = n < 10 ? ("00" + n) : ("0" + n);
_loc3.txt = this.addText("<thumbNumber>" + _loc3.number + "</thumbNumber>", "p_txt", _loc3, 0, 0, _loc6);
_loc2.info = this.addText(" ", "p_txt", _loc2);
_loc2.info._y = _loc10._height - _loc2.info._height - 2;
_loc2.info._x = 2;
_loc2.info._alpha = 0;
_loc2.info.fade(0, 300); _loc2._y _loc2._x _loc5; _loc4._width bg._width _loc6; _loc4._height bg._height thumbViewH + _loc5 + _loc3.txt._height + 5;
_loc3.txt._y = thumbViewH + _loc5 - 1;
_loc4._x = -2;
_loc4._y = 2;
_loc4._alpha = 20;
this.load("thumbs/" + node.attributes.img, _loc11, undefined, _loc2.info, "loader_thumb");
new com.oop.core.Watcher(_loc2, "_loaded", true, this, "seeThumb", _loc2);
_loc3.owner = this;
_loc3.onRollOver = function ()
{
_alpha = 90;
owner.playSnd(owner.soundBtn);
var _loc3 = "<thumbTitle_left>THUMB " + number + "</thumbTitle_left>";
var _loc2 = "" + node.attributes.title + "
";
owner.decode(_loc3, owner.content_mc.left.thumbInfo, "*");
owner.decode(_loc2, owner.content_mc.left.thumbInfoDesc, "*");
};
_loc3.onRollOut = function ()
{
_alpha = 100;
this.stopDrag();
};
_loc3.onPress = function ()
{
owner.seeInfo(node, n);
this.startDrag();
this.swapDepths(owner.nHD(_parent));
owner.setColor(bg, owner.hex(owner.gColor));
owner.setColor(txt, 16777215);
this.colorIn(0, 200);
}; _loc3.onReleaseOutside _loc3.onRelease function ()
{
this.stopDrag();
this.moveX(0, 300);
this.moveY(0, 300);
};
return (_loc3);
} // End of the function
function seeThumb(holder)
{
holder.colorIn(0, 300);
this.center(holder.pic, undefined, holder.mask);
holder.pic.setMask(holder.mask);
holder.info._visible = false;
} // End of the function
function seeImage(holder)
{
holder.mask._visible = true;
holder.mask.setW(100);
holder.mask.setH(100);
holder.colorIn(0, 300);
holder.pic.setMask(holder.mask);
holder.info._visible = false;
var _loc4 = holder._parent.info._width + holder.pic._width + holder._parent.info._y * (holder.pic._width <= 100 ? (3) : (4)) + holder._parent.info._x;
var _loc3 = holder._parent._height;
holder._parent.bg.resizeW(100, 200, _loc4);
holder._parent.shadow.resizeW(100, 200, _loc4);
holder._parent.shadow.moveX(100, 200, -5);
holder._parent.shadow.moveY(0, 200, 10);
if (holder._height > holder._parent.info._height)
{
_loc3 = holder._height + holder._parent.info._y * 3;
holder._parent.bg.resizeH(0, 200, _loc3);
holder._parent.info.close_btn.moveY(0, 200, _loc3 - holder._parent.info.close_btn._height - holder._parent.info._y * 3);
holder._parent.shadow.resizeH(0, 300, _loc3 - 2);
} // end if
holder.mask.resizeH(0, 200, holder.pic._height);
holder.mask.resizeW(100, 200, holder.pic._width);
holder._parent.moveX(100, 200, (Stage.width - _loc4) / 2);
holder._parent.moveY(0, 200, (Stage.height - _loc3) / 2);
holder.border.removeMovieClip();
snd.play(soundEffect);
} // End of the function
function seeInfo(node, n)
{
var _loc12 = "<frameNumber>" + (n < 10 ? ("00" + n) : ("0" + n)) + "</frameNumber>";
var _loc4 = "<description_field>" + node.attributes.title + "</description_field>";
var _loc8 = "<description_field>" + node.attributes.date + "</description_field>";
var _loc6 = "<link_field>" + node.attributes.link + "</link_field>";
var _loc5 = "<description_field>" + node.attributes.description + "</description_field>";
this.playSnd(soundBtn2);
switch (gNode.nodeName)
{
case "clients":
{
var _loc3 = content_mc.right.info || this.addClientInfoPanel();
this.decode(_loc4, _loc3.company, "*");
this.decode(_loc8, _loc3.date, "*");
this.decode(_loc6, _loc3.url, "*");
this.decode(_loc5, _loc3.comment, "*");
_loc3._holder.info._alpha = 0;
_loc3._holder.info._visible = true;
_loc3._holder.info.fade(0, 300);
this.load("images/" + node.attributes.img, _loc3._holder.pic, undefined, _loc3._holder.info, "loader_thumb");
new com.oop.core.Watcher(_loc3._holder, "_loaded", true, this, "seeThumb", _loc3._holder);
break;
}
case "videos":
{
var _loc7 = node.attributes.title;
var _loc11 = node.attributes.link;
var _loc9 = node.attributes.seconds;
_loc3 = content_mc.right.info || this.addVideoInfoPanel();
this.decode(_loc4, _loc3.title, "*");
this.decode(_loc5, _loc3.description, "*");
_loc3.player.load(_loc11, _loc7, _loc9);
break;
}
case "portfolio":
case "features":
{
_loc3 = this.addImagePanel(node);
this.load("images/" + node.attributes.img, _loc3._holder.pic, undefined, _loc3._holder.info, "loader_thumb");
new com.oop.core.Watcher(_loc3._holder, "_loaded", true, this, "seeImage", _loc3._holder);
break;
}
} // End of switch
_loc3.linkage = node.attributes.link;
} // End of the function
function addLeftPanel()
{
content_mc.left.removeMovieClip();
var _loc3 = contentFormat.left.w;
var _loc2 = content_mc.attachMovie("container", "left", this.nHD(content_mc));
_loc2._y = icon_mc._y + icon_mc.bg._height + contentIM * 2 + 10;
_loc2._x = contentFormat.left.x;
var _loc4 = 3.500000E+000;
var _loc6 = sNode.attributes.title;
var _loc5 = gNode.attributes.title;
_loc2.title = this.addText("<title_left>" + _loc6.toUpperCase() + "</title_left>", "title_txt", _loc2, 0, 0, _loc3);
_loc2.subtitle = this.addText("" + _loc5.toUpperCase() + " SECTION
cs_adv
Messages postés149Date d'inscriptionvendredi 30 mai 2003StatutMembreDernière intervention28 janvier 20112 30 sept. 2006 à 10:25
Hello,
pas facile comme ça... c'est pas beau comme code.
Voici mes impressions (à prendre avec du recule)
<hr size="2" width="100%" />
1er erreur:
Dans la déclaration des variables, il y a des mots clés. D'une manière générale, ça ne se fait pas
(load, _alpha, _parent, stopDrag, startDrag, scroll, interface). C'est ce qui génére l'erreur.
2eme erreur:
la variable interface de "_loc5.interface = this;" fait référence à la variable déclarée "interface". Mais cette variable ne peut pas porter ce nom car c'est mot clé (réservé).
3eme erreur:
idem 2eme
4eme erreur:
le fichier *.as "Interface.as" doit être possitionné dans le répertoire "com".
<hr size="2" width="100%" />
Ces remarques sont sûrement complétement à l'ouest, mais une bonne partie du code présenté probablement aussi. Je ne suis pas un expert en ActionScript, mais certaines règles de base de la programmation ne me parraissent pas respectée...
cs_alexgr
Messages postés36Date d'inscriptionmercredi 21 juillet 2004StatutMembreDernière intervention 8 octobre 2006 30 sept. 2006 à 10:38
Je crois que je vais en avoir besoin de la chance.
Sur que ce code est mauvais ca se voit. D'habitude j'arrive a le corriger avec mes petites notions mes là j'avoue que seule une personne de calée pourra dire ce qui ne va pas! J'ai chercher la variable interface dans le flash mais je ne trouve pas l'élément pour lui donner un autre nom et faire en sorte qu'ils n'interfèrent plus avec le nom réservé mais rien...
Ca va etre un travail de dur labeur je crois pour résoudre les problèmes....
fguitton
Messages postés396Date d'inscriptionsamedi 16 avril 2005StatutMembreDernière intervention13 novembre 20091 1 oct. 2006 à 11:53
Bonjour !
Un code comme ca est forcément passer par un décompiler quelqu'il soit d'une manière ou d'une autre. Y a pas a chercher, c'est mathématique comme on pourrais dire. "Pourquoi ?"
Parce que l'argument "interface" est très mal interprèter par ce type de programme. Effectivement, tu remarquera que si tu retire le ", interface" en bout de ligne 3, les erreurs vont disparaitre. D'autre aparaitrons de ce fait dans la gestion, mais la sythaxe sera du coup, correcte.
Je précise donc au passge pour "
adv " que les arguments ( _alpha,_parent,stopDrag, ... ) présent peuvent être égal à autre chose, puisqu'il servent à appliquer ce qui leur sera assigner. Enfin je suis tous de même d'accord avec lui que de les placer là, n'est pas spécialement judicieux ( Un logiciel n'est pas un homme ). Bref !
Je vous explique l'erreur :
interface ne peux pas etre mis en variable sans quoi il gérèrera l'erreur "Identifiant attendu". Tous simplement parce qu'il ne pourra être égale qu'a lui même.
Essayez donc de taper var 3 = 4;
Magie ! "Identifiant attendu". Et on comprend tout à fais que mathématiquement parlant, 3 ne peux pas etre égale à 4. Il ne peut être égale qu'a lui même.
Bon courage pour nettoyer les horreurs de ce code ^^
Aller @+
Flo