Username: Password:
Forum / Showcase / Finished Programs / [Flash] AS 2 - Open site with button /
Page [1]
supperbas
Posted: 15-10-11' (7 months ago)
Post #0001


-Stats-
Rank: Founder
Profession: Programmer
Level: 5
Posts: 476 (2% Spam)
XP: 1118

-Medals-
Crew
Founder
V1 Member
V2 Member


Okay to open a site in a new tab or window you can use the following code

On a button
Code:

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


On a frame
Code:

// urlButton being the instance name!!!
urlButton.onRelease = function(){
getURL("http://www.supperbas.com", "_blank");
}


You can change the URL (the first parameter, in our case "http://www.supperbas.com") so it will point to a different webpage.
The second parameter allows you to decide whether you want a new page to be opened or not.
If you use
_blank = A new tab or page will be opened (depending on the settings of user)
_self = Will open the webpage link a regular URL
_parent = Will do the same as _self but if you use iframes _parent will refresh the whole page where _self will only refresh the iframe it's in!

So if you want to support iframes use _self if you don't want it to be embedded in an iframe use _parent (when in doubt just use _parent or _blank)


--------------------
SupperBas[dot]Com
- site of power -
Page [1]
Forum / Showcase / Finished Programs / [Flash] AS 2 - Open site with button /
SupperBas[dot]com - site of power - SB
There are currently 5 visitors online