Navigation.prototype.createNavigation = function () {
var xpos=0;
var ypos = 0;
ersterClip = this.createEmptyMovieClip("NavigationContainer",1);
for (i=0;i<this.theInfo.length;i++)
{
hitClip = ersterClip.attachMovie("transpi","transpi"+i,i+555)
buttonClip = ersterClip.createEmptyMovieClip('button_'+i,i+222);
buttonClip.createTextField('bLabel_'+i,1,0,0,0,0);
buttonText = buttonClip['bLabel_'+i];
buttonClip.text_tf = buttonText;
buttonText.autoSize=true;
buttonText.background=false;
buttonText.selectable=false;
buttonText.embedFonts = true;
buttonText.text =this.theInfo[i].label;
if (this.__textFormatObj != undefined) {
buttonText.format = this.__textFormatObj;
buttonText.__defaultColor = this.__textFormatObj.color;
}else{
this.format=new TextFormat();
this.format.align = "center";
this.format.bold = false;
this.format.font ="tahoma";
buttonText.__defaultColor = _"0x000000";
buttonText.format = this.format;
}
buttonText.setTextFormat(buttonText.format);
buttonClip.label = this.theInfo[i].label;
buttonClip.info = this.theInfo[i].info;
hitClip.onRelease = function(){
// Hier moechte ich das jeweilige buttonClip ansprechen und die y Position verschieben
//buttonText._y = buttonText._y-8;
// das Problem ist dass ich das Objekt innerhalb dieser Funktion nicht ansprechen kann.
}
hitClip.onRollOver = function(){
// Hier moechte ich das jeweilige buttonClip ansprechen und die y Position verschieben
//buttonText._y = buttonText._y+8;
// das Problem ist dass ich das Objekt innerhalb dieser Funktion nicht ansprechen kann.
}
hitClip.onReleaseOutside = hitClip.onRollOut = function(){
// Hier moechte ich das jeweilige buttonClip ansprechen und die y Position verschieben
//buttonText._y = buttonText._y-8;
// das Problem ist dass ich das Objekt innerhalb dieser Funktion nicht ansprechen kann.
}
if (this.__width > this.__height) {
buttonClip._x = xpos;
hitClip._x = xpos;
}else{
buttonClip._y = ypos;
hitClip._y = ypos;
}
xpos+=(buttonClip._width+this.__padding);
ypos+=(buttonClip._height+this.__padding);
hitClip._width = buttonClip._width;
}
ersterClip._xscale = ersterClip._yscale = 100;
ersterClip.__width = ersterClip._width;
ersterClip.__height = ersterClip._height;
};