How to Add url to flash banner

Anything about Flash - ask your general questions about using this great software here.

How to Add url to flash banner

Postby jammminjay » Sun Dec 24, 2006 8:31 pm

Hi there i'm new to Flash mx 8, i can get to actions/get url but it displays error when i insert my url,

getURL(http://www.urbanflavours.com.au);

**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 1: ')' or ',' expected
getURL(http://www.urbanflavours.com.au);

Total ActionScript Errors: 1 Reported Errors: 1
jammminjay
 
Posts: 3
Joined: Mon Jun 30, 2003 5:56 pm


Re: How to Add url to flash banner

Postby alexngb » Mon Dec 25, 2006 7:52 am

Hiya ...

it's one of those "Duh" kind of "Why didn't I think of that" errors.

Impossible until you post it up here and someone like me posts the answer ...

WRONG: getURL(http://www.urbanflavours.com.au);

RIGHT :getURL("http://www.urbanflavours.com.au");

p.s. As it's a banner, you might want to change it to this ...

getURL("http://www.urbanflavours.com.au", "_blank");

... which will make the link open in a new window.

Hope that helps. Good luck
alexngb
 
Posts: 17
Joined: Mon Jun 30, 2003 5:56 pm

Re: How to Add url to flash banner

Postby jammminjay » Mon Dec 25, 2006 7:13 pm

alexngb wrote:Hiya ...

it's one of those "Duh" kind of "Why didn't I think of that" errors.

Impossible until you post it up here and someone like me posts the answer ...

WRONG: getURL(http://www.urbanflavours.com.au);

RIGHT :getURL("http://www.urbanflavours.com.au");

p.s. As it's a banner, you might want to change it to this ...

getURL("http://www.urbanflavours.com.au", "_blank");

... which will make the link open in a new window.

Hope that helps. Good luck




thanks for that, i actually want it to open with someone clicking on it, is this possible?
jammminjay
 
Posts: 3
Joined: Mon Jun 30, 2003 5:56 pm

Re: How to Add url to flash banner

Postby alexngb » Tue Dec 26, 2006 6:34 am

Hiya ...

Make a new layer on your fla. Draw a rectangle (any colour, doesn't matter) that fills the stage and convert it to a button.

Double click on the button to get into it's timeline and note that the rectangle is in the "UP" key frame. Select this frame and drag it to the "HIT" frame. This will make the button invisible.

Now, back on your main timeline, select the buitton and put the following code on it ...

on (release)
{
getURL("http://www.urbanflavours.com.au", "_blank");
}

Ta-daah!

(hope that both makes sense and helps)
alexngb
 
Posts: 17
Joined: Mon Jun 30, 2003 5:56 pm

Re: How to Add url to flash banner

Postby jammminjay » Tue Dec 26, 2006 5:55 pm

alexngb wrote:Hiya ...

Make a new layer on your fla. Draw a rectangle (any colour, doesn't matter) that fills the stage and convert it to a button.

Double click on the button to get into it's timeline and note that the rectangle is in the "UP" key frame. Select this frame and drag it to the "HIT" frame. This will make the button invisible.

Now, back on your main timeline, select the buitton and put the following code on it ...

on (release)
{
getURL("http://www.urbanflavours.com.au", "_blank");
}

Ta-daah!

(hope that both makes sense and helps)





Thanks heaps it's finally working
jammminjay
 
Posts: 3
Joined: Mon Jun 30, 2003 5:56 pm




Return to Flash 8: General

Who is online

Users browsing this forum: No registered users and 1 guest

cron