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
Solved

link button in Flash

Posted on 2006-11-18
5
152 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
  • 3
  • 2
5 Comments
 
LVL 11

Accepted Solution

by:
ch2 earned 250 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
I come across a lot of question about how to access things in the document class from a movieclip, or accessing something from a movieclip in the document class. It took me a while to figure this out but once I did it makes life so much easier. …
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.

809 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