Categorized | Flash Tutorials

Moving From Flash AS2 to Flash AS3: getURL

What ever happened to getURL within Actionscript 3.0?

If you wanted to create a link to another website in Actionscript 2.0, here’s what it would have looked like:

The command getURL used to a be very easy way to create an outbound link within Flash. This one line of code code easily fitted perfectly within a button onRelease event. Not so easy anymore.
Snapshot of AS3 Code

Along with many other easy Actionscript 2.0 calls, getUrl has changed. It uses a couple more lines of code and has changed to navigateToURL. You might be asking why would the amount of lines increase for such a simple task. Craig Campbell just recently posted an in depth example and explanation to creating outbound links within Actionscript 3.0.

Source: School of Flash

Share this Post:

This post was written by:

Angel - who has written 275 posts on Flash Speaks Actionscript.


Contact the author

Related Posts:

This website uses IntenseDebate comments, but they are not currently loaded because either your browser doesn't support JavaScript, or they didn't load fast enough.

4 Responses to “Moving From Flash AS2 to Flash AS3: getURL”

  1. Reyco1 says:

    Hi, I myself am writing an AS2 to AS3 series which already has 6 parts. My first part had to exactly with this very same topic!

    http://www.reynaldocolumna.com/blog/archives/category/flash/as2-to-as3-baby-steps-series/page/2

  2. Anil says:

    I want to get URl on the end of the SWF file. For that i m using geturl(”http://mypage.com/default.aspx”, “_blank”); it is working when i am using CTRL+ENTER for creating the SWF file from Flash. but when i mam going to run the swf file directly its not working & asking for Macromedia Flash Player has stopped potentailly unsafe operation.The folloeing local application on your computer or network:and also asking for the setting

    • Angel says:

      Hey Anil, that happens due to the Flash Player security. You can bypass that by adding the directory that stores the SWF file into the trusted category or simply run the SWF in the browser.

  3. Anil says:

    Pls Help
    Thanx

Trackbacks/Pingbacks


Leave a Reply