Solved

Configure a Flash file to proceed to a URL when clicked anywhere.

Posted on 2007-03-26
5
156 Views
Last Modified: 2010-04-03
Haven't touched Flash in almost a year.  And I forget how to do this easy task...   I created a flash file, but want to configure it so when clicked anywhere, it proceeds to a URL.  I.e., I want the flash to be a simple link to a website.  No buttons, etc.

I know this is a simple thing, but can't remember how/where to do it.  Someone please remind me.
0
Comment
Question by:stockblocks
5 Comments
 
LVL 13

Expert Comment

by:FLAASHER
ID: 18795632
draw any thing or write some word then sellect it with ur mouse
press F8 to convert it to button or a movie clip
then sellect the new movieclip with ur mouse and press F9 to open action panel
paste this code on it :

on (press) {
      getURL("http://yahoo.com");

}

replace yaho with whatever u want


FLAASHER
0
 
LVL 37

Accepted Solution

by:
CyanBlue earned 125 total points
ID: 18795742
Don't know if it is going to be more annoying or not, but you don't need a button/movieClip with the onMouseDown handler...

this.onMouseDown = function ()
{
      getURL("http://www.domain.com");
}

CyanBlue
0
 
LVL 23

Expert Comment

by:Zeffer
ID: 18795775
I think you mean an invisible button or 'hotspot.
make a new button symbol..put a blank keyframe in the 'hit' frame
draw a small square shape in the hit frame
back on the stage drag an instance of the button to the topmost layer..size it to the stage size..
put code on it
you see the button in authoring..but it is invisible at runtime

Z
0
 

Author Comment

by:stockblocks
ID: 18809041
Thanks to the other people's responses as well!  But the one given by CyanBlue is exactly what I needed. I simply dropped that code to an "actions" layer, and it works great.
0
 
LVL 37

Expert Comment

by:CyanBlue
ID: 18809149
Don't get used to using that script on other projects because that will trap ANY click on anywhere on the stage...  ;)

CyanBlue
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Sometimes you know that one object has a specific child in it, but you can't find the child. This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons.  My partner had created the toolbar usi…
Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
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.

746 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

11 Experts available now in Live!

Get 1:1 Help Now