Solved

flash cs3 on release get url

Posted on 2008-10-17
5
8,426 Views
Last Modified: 2013-11-11
I have a menu created in Flash CS3.  It is a movie clip and I am trying to add the links to the buttons.

Here is what I have so far:

onClipEvent (load) {
      num = 2;
}
on (rollOver) {
      this.gotoAndPlay("s1");
}
on (releaseOutside, rollOut) {
      this.gotoAndPlay("s2");
}
on (release) {
      getURL(www.google.com);
}

However, it does not work.  When I click the button, nothing happens.

1.  Is this the correct method to add a link to this 'button'
2. How do I make it work?
0
Comment
Question by:joedunn
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 15

Expert Comment

by:MMDeveloper
ID: 22743884
try placing the URL within quotes


on (release) {
      getURL("http://www.google.com");
}
0
 
LVL 8

Accepted Solution

by:
Dreammonkey earned 500 total points
ID: 22746681
I don't know what's so great about it , but code below works (in AS3)
function NavigateToURLExample() {
    var url:String = "http://www.adobe.com";
    var request:URLRequest = new URLRequest(url);
    try {            
        navigateToURL(request);
    }
    catch (e:Error) {
        // handle error here
    }
}
NavigateToURLExample()

Open in new window

0
 

Author Comment

by:joedunn
ID: 22753034
Maybe I did not state my question correctly.  

The tempalte I am editing has a Layer called 'menu2', when I double click that layer to open it up it shows all the different buttons in the menu, there are 12 of them.

(See Snap1)

When I click on the first menu option and then press F9 I see a window with a tab called 'Action - Movie Clip.

(See Snap2)

Note: Is it strange to anyone that there are 36 (12 x 3) butn items listed in menu2?

Anyway, where do I add, change, edit the action script code (see below)

onClipEvent (load) {
      num = 1;
}
on (rollOver) {
      this.gotoAndPlay("s1");
}
on (releaseOutside, rollOut) {
      this.gotoAndPlay("s2");
}

So that each button, when clicked, will redirect the user to the correct internal page or external web site?

Thanks!



 
onClipEvent (load) {
	num = 1;
}
on (rollOver) {
	this.gotoAndPlay("s1");
}
on (releaseOutside, rollOut) {
	this.gotoAndPlay("s2");
}

Open in new window

Snap1.gif
Snap2.gif
0
 

Author Closing Comment

by:joedunn
ID: 31507237
Thank You
0
 
LVL 1

Expert Comment

by:flashmex
ID: 24183642

onClipEvent (load) {
      num = 2;
}
on (rollOver) {
      this.gotoAndPlay("s1");
}
on (releaseOutside, rollOut) {
      this.gotoAndPlay("s2");
}
on (release) {
//// if you want to open it in new window you can use  getURL("www.google.com","_blank");

      getURL("www.google.com");
}
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Action Script commands 4 324
Failed download 57 580
Flash player updates using SCCM 2012 and SCUP 2011 3 464
Flash builder 4.13 list scroller does not work 1 53
This is a very simple example to help those of you who are still migrating from AS2 to AS3 understand the redesigned event model in AS3. In AS2.0, event functions (that is, the function to be performed when an event is fired) were stored as a pro…
There are times in your Flash CS4 application when you want more than a simple pointer or a hand, and it's hard to find an ideal walk-through to tell you what to do.  I spent a few days recently learning my way around making custom cursors in Flash,…
The goal of the tutorial is to teach the user how to how to record live broadcast.
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question