Solved

link button in Flash

Posted on 2006-11-18
5
149 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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…
While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
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 what frame rate is, how to control it and what effect it has on the video.

743 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now