Mel`s+Hints

Loop Logic
for (var c=9; c>0; c--) { trace("c in down loop is "+c); } - 2nd part is a condition of execution not a condition of exit

Setfocus
Selection.setFocus(this._parent.lessText_txt); - sets focus on a text field

Listen for enter or tab
var KeyListener:Object = new Object; Key.addListener(KeyListener); KeyListenersArray.push(KeyListener);

KeyListener.onKeyDown = function { if ((Key.isDown(Key.ENTER)) || (Key.isDown(Key.TAB))){ check_btn.onPress; } }; - adds a listener to get enter key or tab key - must remove the listener

//removing listener - too many listeners spoil the flash// //Key.removeListener(KeyListener);//

//Fireworks//
//bang = defineNewSoundEffect("firework_2");//

//function displayFireworks(xFw,yFw) {// attach the firework movie; it will automatically play if (xFw == undefined ) { x = 350; } if ( yFw == undefined) { y = 200; } xFw = integer2_mc._x+xFw; yFw = integer2_mc._y+yFw; attachMovie("firework"+(random(3)+1),"fireworks_mc",this.getNextHighestDepth,{_x:xFw, _y:yFw}); //start the firework sound// //bang.startSoundEffect(0,1,false);// //};//end function

call is displayFireworks(xPlace,yPlace);

defining a global variable Scene 1 actions frame 1

Functions
check_btn.onRelease =check_btn.onReleaseOutside =function {

};

So if a user hits the button and then releases somewhere else on the screen.