Hallo allerseits
habe folgendes versucht, schien auch zu gehen, aber jetzt plötzlich nicht
mehr...bin mir sicher, dass ich an der Funktion selber nichts rumgeschraubt
habe seit dem letzten mal, habe lediglich ein bisschen mit Components
herumgespielt! Das komische ist, dass es mir immer nur das
_root.Info_msg.Info_box entfernt, egal was ich bei dem onRelease
event eingebe

habe die möglichkeiten mal auskommentiert!!!
Diesen Code kann man direkt in ein neues Dokument
einfügen, sollte funktionieren!
ActionScript:
_root.createEmptyMovieClip("btn",1);
with(_root.btn){
beginFill(0x880000,30);
lineStyle(3,0xcccccc,100);
moveTo(100,100);
lineTo(100,200);
lineTo(200,200);
lineTo(200,100);
lineTo(100,100);
endFill();
}
_root.btn.onRelease = function(){
ShowInfo("Testtest","this is a tryout because it doesnt work and that sucks a lot :(",_root.txtf)
}
_root.createTextField("txtf",2,10,10,50,20);
with(_root.txtf){
border=true;
type = "input";
}
function ShowInfo(Infomsg_title, Infomsg, targetObj){
var IM = _root.createEmptyMovieClip("Info_msg",_root.getNextHighestDepth());
var DOBg = IM.createEmptyMovieClip("Info_Background",IM.getNextHighestDepth())
with(DOBg){
beginFill(0xcccccc,50);
lineStyle(1,0xcccccc,100);
moveTo(20,25);
lineTo(20,375);
lineTo(525,375);
lineTo(525,25);
lineTo(20,25);
endFill();
}
DOBg.onRollover = function(){};
DOBg.useHandCursor = false;
var DOB = IM.createEmptyMovieClip("Info_Box",IM.getNextHighestDepth());
with(DOB){
beginFill(0xffffff,100)
lineStyle(1,0xcccccc,100)
box_x = 500;
box_y = 200;
moveTo(-(box_x / 2),-(box_y / 2));
lineTo((box_x / 2),-(box_y / 2));
lineTo((box_x / 2),(box_y / 2));
lineTo(-(box_x / 2),(box_y / 2));
lineTo(-(box_x / 2),-(box_y / 2));
endFill();
moveTo(-(box_x / 2) + 10,-(box_y / 2) + 30);
lineTo((box_x / 2) - 10,-(box_y / 2) + 30);
moveTo(-(box_x / 2) + 10,(box_y / 2) - 30);
lineTo((box_x / 2) - 10, (box_y / 2) - 30);
_x = 275;
_y = 200;
createTextField("t_Info_Title",getNextHighestDepth(),-(box_x / 2) + 10, -(box_y / 2) + 5, box_x - 20, 20)
with(t_Info_Title){
type = "static";
selectable = false;
//embedFonts = true;
text = Infomsg_title;
setTextFormat(txt_format);
}
createTextField("t_Info_msg",getNextHighestDepth(),-(box_x / 2) + 10, -(box_y / 2) + 40, box_x - 20, 140)
with(t_Info_msg){
wordWrap = true;
multiline = true;
type = "static";
selectable = false;
//embedFonts = true;
html = true;
htmlText = Infomsg;
setTextFormat(txt_format);
}
createEmptyMovieClip("MC_Exit",getNextHighestDepth())
with(MC_Exit){
moveTo(-(box_x / 2), (box_y / 2) - 30);
lineTo((box_x / 2), (box_y / 2) - 30);
lineTo((box_x / 2), (box_y / 2));
lineTo(-(box_x / 2), (box_y / 2));
lineTo(-(box_x / 2), (box_y / 2) - 30);
createTextField("t_Exit",getNextHighestDepth(), -(box_x / 2) + 10,(box_y / 2) -25, box_x - 20, 20)
with(t_Exit){
type = "static";
selectable = false;
//embedFonts = true;
text = "exit";
setTextFormat(txt_format);
}
}
MC_Exit.onRelease = function(){
Selection.setFocus(targetObj);
removeMovieClip(_root.Info_msg);
//removeMovieClip(_root.Info_msg.Info_Background);
//removeMovieClip(this._parent._parent);
}
}
};//Done
txt_format = new TextFormat()
with(txt_format){
font = "Verdana";
size = 18;
align = "center";
}
Bin froh um jeden Input, steh ziemlich auf dem Schlauch!
Freundliche Grüsse
H.2.O