Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Help with Geturl for dummies

Community Beginner ,
Dec 16, 2008 Dec 16, 2008
I have purchased a menuclip.fla and within the actionscript I see the following code:


What am I doing wrong? I'm a nubbie with flash, so I need help.

thanks in advance
~Linuxchik
TOPICS
ActionScript
444
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Beginner , Jan 06, 2009 Jan 06, 2009
WOW!

Thank you Ned, I apologize for not getting back to you asap. I went out of town for the holidays and well you know. I thought about what you had said in the 12/16/2008 at 11:19:19 post while on the trip and from my past technicial experience, used my friend google to look up as3 tutorials and even then I really did not have the time to finally get the navigateToURL that I needed. Thank you for helping me save TIME. It is greatly appreciated.

Translate
LEGEND ,
Dec 16, 2008 Dec 16, 2008
If there is only one button, then you only need the following from the code you show... click on the button on the stage and then enter the code in the Actions panel

on(release)
{
getURL(" http://www.mishgallery.com/salonbordello/testindex.html", "_blank");
}

To keep it in that function, you would only include the one getURL line by itself.

The next wondering is... what is the file you purchased designed for, AS2 or AS3? The getURL and on() event handler/function are AS2, but the rest of the code appears to be AS3.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 16, 2008 Dec 16, 2008
good grief there is different code for each. UGGGGG. I feel like charlie brown. The fla is AS3. Is there different code for that?

There is one long button with the word home in it. Under a sepearate starclip I can add more "buttons" via a mybutton array. Then under the menuclip is see the code (plus more code) that I provide above. If I click on genericmenubutton clip then I see the long button "home" when I open the action script window I see one action. stop(). Why would the code above be there if I need to put it on the genericmenubutton clip? Can I post a screen shot?

Here is the stardustclip as info

You Rock!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 16, 2008 Dec 16, 2008
Yes, AS3 requires different code. AS3 does not allow code to be attached to an object as AS2 does (that on(release){... } stuff I mentioned dealing with as I did). getURL is also AS2 code, and is not supported in AS3.

To link to another web page you would use navigateToURL(). Rather than shorthand it, which is often done, here's the 3 step code for using it (place this code where the // Add your button click actions here... comments are...

var url:String = " http://www.mishgallery.com/salonbordello/testindex.html";
var request:URLRequest = new URLRequest(url);
navigateToURL(request, "_self");

The "_self" loads into the current browser window. To load to a separate window you'd replace that with "_blank"

I type the code above from memory, so if it doesn't work due to something I messed up, refer to navigateToURL in the help files and there should be an example.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jan 06, 2009 Jan 06, 2009
WOW!

Thank you Ned, I apologize for not getting back to you asap. I went out of town for the holidays and well you know. I thought about what you had said in the 12/16/2008 at 11:19:19 post while on the trip and from my past technicial experience, used my friend google to look up as3 tutorials and even then I really did not have the time to finally get the navigateToURL that I needed. Thank you for helping me save TIME. It is greatly appreciated.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 06, 2009 Jan 06, 2009
LATEST
You're welcome.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines