Blake1024
05-07-2005, 03:04 PM
When I create an Alert it appears on top of components added through the
IDE (Flash MX 2004 Pro) but it appears behind components I've added via
manual ActionScript code. I want the allert to behave like a message box
but it is no good since I generate most of my components via ActionScript.
How can I make the Alert's always show on top of all the components?
For example, create a SWF and add one TextInput control by fragging it
on the stage with the IDE. Then execute the following code:
import mx.controls.Alert;
import mx.controls.TextInput;
createClassObject(mx.controls.Label, "staticText1", getNextHighestDepth(), {});
staticText1.move(300 , 4 );
staticText1.setSize(94 , 20 );
staticText1.text = "Select Application";
createClassObject(mx.controls.TextInput, "City", getNextHighestDepth(), {});
City.move(48, 111 );
City.setSize(224 , 18 );
City.text = "Miami";
var msg = Alert.show("My message", "Message Window");[/FONT]
See how the Alert appears above the IDE added component but behind the
ActionScript generated controls. You can tell by moving the Alert around on
the screen. How can I fix this?
Thanks a lot.
IDE (Flash MX 2004 Pro) but it appears behind components I've added via
manual ActionScript code. I want the allert to behave like a message box
but it is no good since I generate most of my components via ActionScript.
How can I make the Alert's always show on top of all the components?
For example, create a SWF and add one TextInput control by fragging it
on the stage with the IDE. Then execute the following code:
import mx.controls.Alert;
import mx.controls.TextInput;
createClassObject(mx.controls.Label, "staticText1", getNextHighestDepth(), {});
staticText1.move(300 , 4 );
staticText1.setSize(94 , 20 );
staticText1.text = "Select Application";
createClassObject(mx.controls.TextInput, "City", getNextHighestDepth(), {});
City.move(48, 111 );
City.setSize(224 , 18 );
City.text = "Miami";
var msg = Alert.show("My message", "Message Window");[/FONT]
See how the Alert appears above the IDE added component but behind the
ActionScript generated controls. You can tell by moving the Alert around on
the screen. How can I fix this?
Thanks a lot.