BatteauProductions
%Europe/Berlin %489 %2009, 11:45
Ik bezig met mijn portfolio en daarop wil ik mijn content via xml inladen zodat ik niet steeds mijn flash hoef te openen.
Alleen nu kwam ik er laatst achter dan de xml online niet inlaad om een of andere wazige reden...
hierop staat mijn site Portfolio (http://www.mediavormgever.net/~Kamps10049/)
dit is de code waarmee ik de XML inlaad
// XML object instellen voor de Web & Games
var web_xml:XML = new XML()
web_xml.ignoreWhite =true;
web_xml.load("../xml/web.xml");
//array voor de nodes
var childItemsWeb:Array = new Array();
web_xml.onLoad = function(succes:Boolean):Void {
if(succes) {
childItemsWeb = web_xml.firstChild.childNodes;
trace ("Succes! Web");
}else{
trace("Failure! Web");
}
}
en hiermee vul ik de content
//FUNCTIONS//
//init content
function initcontent () {
this.createEmptyMovieClip("buttons_mc", this.getNextHighestDepth());
buttons_mc.setMask(mask_mc);
buttons_mc._x = 155.8;
buttons_mc._y = 451.9;
for (var i:Number = 0; i < randomArray.length; i++) {
newName = "product"+i;
var productKnop:MovieClip = this.buttons_mc.attachMovie("clip_mc", newName, this.buttons_mc.getNextHighestDepth());
productKnop.placeholder_mc.loadMovie(randomArray[i].attributes.imgk, "placeholder_mc");
productKnop._x = (productKnop._width+10)*i;//sets different x position
productKnop._alpha = 40;//setting alpha
productKnop.key = i;//giving unique key
productKnop.onRelease = function () {
trace (this.key);
}
productKnop.onRollOut = function () {
this._alpha = 40;
}
productKnop.onRollOver = function () {
this._alpha = 100;
}
}
}
die randomArray is een var die aan het begin van het script word aangemaakt en later in een knop word gedefineerd zodat ik deze functie aan meerdere knoppen kan hangen.
Maar goed...
online faalt hij ziet de xml niet ofzo...
offline no problem..
en ik verander niets aan de mappenstructuur...
Alleen nu kwam ik er laatst achter dan de xml online niet inlaad om een of andere wazige reden...
hierop staat mijn site Portfolio (http://www.mediavormgever.net/~Kamps10049/)
dit is de code waarmee ik de XML inlaad
// XML object instellen voor de Web & Games
var web_xml:XML = new XML()
web_xml.ignoreWhite =true;
web_xml.load("../xml/web.xml");
//array voor de nodes
var childItemsWeb:Array = new Array();
web_xml.onLoad = function(succes:Boolean):Void {
if(succes) {
childItemsWeb = web_xml.firstChild.childNodes;
trace ("Succes! Web");
}else{
trace("Failure! Web");
}
}
en hiermee vul ik de content
//FUNCTIONS//
//init content
function initcontent () {
this.createEmptyMovieClip("buttons_mc", this.getNextHighestDepth());
buttons_mc.setMask(mask_mc);
buttons_mc._x = 155.8;
buttons_mc._y = 451.9;
for (var i:Number = 0; i < randomArray.length; i++) {
newName = "product"+i;
var productKnop:MovieClip = this.buttons_mc.attachMovie("clip_mc", newName, this.buttons_mc.getNextHighestDepth());
productKnop.placeholder_mc.loadMovie(randomArray[i].attributes.imgk, "placeholder_mc");
productKnop._x = (productKnop._width+10)*i;//sets different x position
productKnop._alpha = 40;//setting alpha
productKnop.key = i;//giving unique key
productKnop.onRelease = function () {
trace (this.key);
}
productKnop.onRollOut = function () {
this._alpha = 40;
}
productKnop.onRollOver = function () {
this._alpha = 100;
}
}
}
die randomArray is een var die aan het begin van het script word aangemaakt en later in een knop word gedefineerd zodat ik deze functie aan meerdere knoppen kan hangen.
Maar goed...
online faalt hij ziet de xml niet ofzo...
offline no problem..
en ik verander niets aan de mappenstructuur...