on (release) {
getURL ("javascript:NewWindow=window.open('ShowPopup.php','newWin','width=400,height=300,left=0,top=0,
toolbar=No,location=No,scrollbars=No,status=No,resizable=No,fullscreen=No'); NewWindow.focus();
void(0);");
}
getURL/navigateToURL
ActionScript 2.0:
getURL("www.adobe.com", "_blank");
ActionScript 3 .0:
var url:URLRequest = new URLRequest("http://www.adobe.com"); navigateToURL(url, "_blank");
getURL/navigateToURL with JavaScript
ActionScript 2 .0:
var jscommand:String = "window.open('http://www.adobe.com','win','height=200,width=300,toolbar=no,scrollbars=yes');"; getURL("javascript:" + jscommand + " void(0);");
ActionScript 3 .0:
var jscommand:String = "window.open('http://www.adobe.com','win','height=200,width=300,toolbar=no,scrollbars=yes');"; var url:URLRequest = new URLRequest("javascript:" + jscommand + " void(0);"); navigateToURL(url, "_self");
Read more
Flash&Flex Developer's Magazine - FFD
Flash&Flex Developer's Magazine – March 2010 issue
In the issue:
- Delivering video for Flash Player 10.1 on mobile devices
- Why the iPad Will Redefine Our View of RIAs
- Flex and Air
- Understanding Flex 4 components
- Flex and Jabber
- Dynamic Views and Mediators with PureMVC
- Deeplinking your Flash and Flex applications with SWFAddress
- What Kind of Website Should I Make?
- Project Organization Best Practices
- Dive into OSMF-Part One
- A Case for Streaming Media and the Cloud
- Readers BUG - Readers Q&A section
- ...and much more inside...
- Delivering video for Flash Player 10.1 on mobile devices
- Why the iPad Will Redefine Our View of RIAs
- Flex and Air
- Understanding Flex 4 components
- Flex and Jabber
- Dynamic Views and Mediators with PureMVC
- Deeplinking your Flash and Flex applications with SWFAddress
- What Kind of Website Should I Make?
- Project Organization Best Practices
- Dive into OSMF-Part One
- A Case for Streaming Media and the Cloud
- Readers BUG - Readers Q&A section
- ...and much more inside...
Delay Timer
// Requires a movieclip with the instance name "objectMC" to be on the stage
var myTimer:Timer = new Timer(6000, 1);
myTimer.addEventListener(TimerEvent.TIMER_COMPLETE, timerHandler);
myTimer.start();
function timerHandler(evt:TimerEvent):void
{
car.x = 200;
car.y = 200;
}
//myTimer.stop();
var myTimer:Timer = new Timer(6000, 1);
myTimer.addEventListener(TimerEvent.TIMER_COMPLETE, timerHandler);
myTimer.start();
function timerHandler(evt:TimerEvent):void
{
car.x = 200;
car.y = 200;
}
//myTimer.stop();
Valid Email in AS3
txt1.text="";
custdetails_btn.addEventListener(MouseEvent.CLICK, popup);
function popup(event:MouseEvent):void {
if( cust_name.text=="" || cust_email.text == "" )
{ txt1.text="Please enter Name and Email";
}
else if(cust_email.text == "" ||
cust_email.text.indexOf("@") < 0 || cust_email.text.indexOf(".") < 0 || cust_email.text.indexOf(" ") > 0 )
{
txt1.text="Please enter valid email";
}
else
{
MovieClip(root).play();
}
}
custdetails_btn.addEventListener(MouseEvent.CLICK, popup);
function popup(event:MouseEvent):void {
if( cust_name.text=="" || cust_email.text == "" )
{ txt1.text="Please enter Name and Email";
}
else if(cust_email.text == "" ||
cust_email.text.indexOf("@") < 0 || cust_email.text.indexOf(".") < 0 || cust_email.text.indexOf(" ") > 0 )
{
txt1.text="Please enter valid email";
}
else
{
MovieClip(root).play();
}
}
Play from inside movieclip
custdetails_btn.addEventListener(MouseEvent.CLICK, popup);
function popup(event:MouseEvent):void {
MovieClip(root).play();
}
function popup(event:MouseEvent):void {
MovieClip(root).play();
}