Web Design Forum  
 
Go Back   Web Design Forum > Web Software > Scripts

Reply
 
LinkBack Thread Tools Display Modes
Old 10-18-2005, 02:38 PM   #1 (permalink)
New Member
 
Join Date: Oct 2005
Posts: 7
Default Flash Button Link

I just started flash actionscripting, and i can't even make a simple hyperlinked button. the code I used on the button is as follows.

getURL("here's the URL");

What's wrong with it. It's on the same layer and frame and the picture has been converted to a button symbol. Could somebody possibly outline step by step how tom kae a button work. w3schools has tutorials but only for an old flash, i'm using MX 7.2, not Studio 8 by the way.
citrus_cyanide is offline   Reply With Quote
Old 02-16-2006, 10:54 PM   #2 (permalink)
Bronze Member
 
Join Date: Feb 2006
Location: Sunny England!
Posts: 41
Default

hey, I'm not sure if you've missed some bits out to reduce the amount in your post, or there are some vital 'bits' missing from the actionscript. But…

The getURL command you've typed will work fine, so long as it is place within an instruction, like on(release) or on(rollover). Also as long as this entire actionscript has been assigned to the actual button, and not just placed in the timeline (although there is a way to do this too).

Basically, you'll need to get rid of the code from the timeline and make sure that only the button is selected, then open the properties panel and click inside the instance name box. type something obvious like 'link1_btn' so it'll be obvious when you see it again. Then open the actionscript panel and look for that instance name somewhere. (this tells you that only that button will be affected). Then enter to the code to create the hyperlink. This needs to be contained within a basic instruction, so for example:

on(release){
getURL("www.thiswebsite.com","_blank");
}

This says that, when the button is clicked, it will load 'www.thiswebsite.com' in a new browser window, hopefully! Just make sure the object is selected before you enter any code, and most commands will always be placed within curly brackets, so you need to type something to create them.

I hope this helps, and that it makes some sort of sense!
stuluk28 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 03:01 PM.


Computer Forum - Internet Business - Webpage Design

 
Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0 ©2008, Crawlability, Inc.