views:

78

answers:

1

Does anybody have a solution for a popup (for a help panel)? thanks. this is in pure as3.

+1  A: 

To use ActionScript 3 to open an HTML popup do something like this:

var url:String = "javascript:openNewWindow('test.html','thewin', 'height=200,width=250,toolbar=no,scrollbars=no')";
var request:URLRequest = new URLRequest(url);
try {
  navigateToURL(request, '_blank'); // second argument is target
} catch (e:Error) {
  trace("Error occurred!");
}

I am not sure what you mean by pure ActionScript. Do you want the pop-up to be in the SWF? If so then you can create a sprite and show or hide it based on an event.

Todd Moses
Thanks, I don't mean a popup like ads popup, but more like an alert box, thanks
Timmy