AScript: GetURL

From virtualMV2015wiki
Jump to: navigation, search
 Home  Flash11 (CS5) | Flash10 (CS4) <

GetURL is used to open an html page from Flash

Restrictions: You cannot open an html file on the local hard drive

Eg. The following works

popUp_btn.onRelease = function(){
	getURL("http://www.virtualmv.com");
}

whereas the following code doesnt

popUp_btn.onRelease = function(){
	getURL("test.html");
}

If you want to set the properties of the popup window

 popUp_btn.onRelease = function(){
	getURL("javascript:fnPopup('Flash10_PopupTest.html')");
}

and add the following code into the html file created that includes the call to the swf file

function fnPopup(strPage){
   var fnPopup = window.open(strPage,"WinPopup","toolbar=no,menubar=no,\
                 scrollbars=no,location=no,witdth=550,\
                 height=250,top=250,left=250");
}

Notes

1. Every time you "publish" you delete the JavaScript in html file !! 2. Check the errors in Flash (the windowopen command)


Resources: CBT Cafe (2009)[1], TechnicalLead (2009)[2]

Icon References.png References

  1. CBT Cafe (2009) Flash perfection: Pop-up Windows. Retrieved April 11, 2009 from http://www.flashperfection.com/tutorials/Pop-up-Windows-58696.html
  2. TechnicalLead (2009) LearnFlash: Javascript Popup Windows. Retrieved April 11, 2009 from http://learnflash.com/st/st7temp.html?utm_source=auto&utm_medium=email&utm_campaign=em8

AScript: GetURL. (2017). In virtualMV's ( Michael Verhaart ) wiki. Retrieved December 12, 2017, from http://www.virtualmv.com/wiki/index.php?title=AScript%3A_GetURL    (zotero)