?
Solved

link button in Flash

Posted on 2006-11-18
5
Medium Priority
?
155 Views
Last Modified: 2010-04-03
Hi,
I am trying to put that elusive first button into a flash header.
Here is the sample code.
We just want this to open the url.
Currently it is producing no error and no link to the next web page:
What should this Action Script look like?
Thanks.



function linkBridge(){
      getURL("CroKey.php", "_self");
}

BridgeButton2.addEventListener("click", linkBridge);
0
Comment
Question by:mcm-mgm
[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
  • 3
  • 2
5 Comments
 
LVL 11

Accepted Solution

by:
ch2 earned 1000 total points
ID: 17973619
Try this.

linkBridge = new Object();
linkBridge.click = function(evt) {
      getURL("CroKey.php", "_self");
};
BridgeButton2.addEventListener("click", linkBridge);

or other way

BridgeButton2.onPress = function () {
    getURL("CroKey.php", "_self");
};
0
 

Author Comment

by:mcm-mgm
ID: 17973640
It looks good but it isn't generating a link action.

In php I would tag the code to make sure things were as I believe they are.  For instance I would put an echo in at the button click to determine if the mouse event was actually registering at all.

Any suggestions for this in flash?


0
 
LVL 11

Expert Comment

by:ch2
ID: 17973680
both example works here.

one error could be not using GET action

getURL("CroKey.php", "_self", "GET");
0
 
LVL 11

Expert Comment

by:ch2
ID: 17973687
print $_GET globals in php.

or use

getURL("CroKey.php", "_self", "POST");

print $_POST globals in php.
0
 

Author Comment

by:mcm-mgm
ID: 17973690
Thanks,
I'll try that and let you know.

m.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

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…
This is intended to introduce all collision detection principles in flash, their strengths, weaknesses and workarounds. The main method for Collision Detection in flash is using hitTestObject. But unless you'll be pushing rectangular shapes without …
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.
Suggested Courses
Course of the Month15 days, 4 hours left to enroll

771 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