Grafische gevorderde |
|
nou dan heb ik het probleem dat hij direct false return'ed aangezien die al op false staat.
ik zou eigenlijk een soort van code moeten hebben net als in php if(isset()) oid..
ik heb het opgelost door dit te doen:
function ask(path:String, url_:String, room_num:Number){
dontmove_ = true;
_root.overlay_._alpha = 55;
var quest_:MovieClip = this.attachMovie("quest_", "quest_", this.getNextHighestDepth());
quest_._x = (Stage.width/2);
quest_._y = (Stage.height/2);
quest_.quest_text.text = path;
this.quest_.yes_.onRelease = function(){
removeMovieClip("quest_");
dontmove_ = false;
_root.overlay_._alpha = 0;
showVid(url_, room_num);
}
this.quest_.no_.onRelease = function(){
removeMovieClip("quest_");
dontmove_ = false;
_root.overlay_._alpha = 0;
}
}
function askLight(url_:String, room_num:Number){
switch(room_num){
case 4:
path="Willt U de lamp in de hal aan?";
ask(path, url_, room_num);
break;
case 3:
path="Willt U de lamp in de woonkamer aan?";
ask(path, url_, room_num);
break;
}
}
function ask(path:String, url_:String, room_num:Number){ dontmove_ = true; _root.overlay_._alpha = 55; var quest_:MovieClip = this.attachMovie("quest_", "quest_", this.getNextHighestDepth()); quest_._x = (Stage.width/2); quest_._y = (Stage.height/2); quest_.quest_text.text = path; this.quest_.yes_.onRelease = function(){ removeMovieClip("quest_"); dontmove_ = false; _root.overlay_._alpha = 0; showVid(url_, room_num); } this.quest_.no_.onRelease = function(){ removeMovieClip("quest_"); dontmove_ = false; _root.overlay_._alpha = 0; } } function askLight(url_:String, room_num:Number){ switch(room_num){ case 4: path="Willt U de lamp in de hal aan?"; ask(path, url_, room_num); break; case 3: path="Willt U de lamp in de woonkamer aan?"; ask(path, url_, room_num); break; } }
en nu doet hij het best simpel =D |