How to gain control over link targets (not getURL action) in my script?

[size=2]I’m just a starter in Flash, that’s why I downloaded some menu-movies from flashkit to adapt and learn from.

My problem is (and I’m really a know-nothing about action script) how to gain control over the targets of the links in this menu. Now all links open in a new browser window, but I want most of them to open in the same window.I only know how to set the _self and _blank targets with getURL, but I don’t know how to do this in this script.

Also how do I make one of the links a direct email-link?

I entered mailto:[email protected] (but a valid address in my real movie) and it does open an email window, but it also opens a browser window saying they can’t find mailto:xxx etc. How do I stop that browser window from opening too?

If you could help me, that would be great. I love the movie, it’s exactly what I wanted!!

Thanx in advance,

Angie

Relevant part of script:

links = new Array();
links[0] = “http://www.xxx.com/index.html”;
links[1] = “http://www.xxx.com/agenda.html”;
links[2] = “mailto:[email protected]”;

etc
[/size]

:puzzle: WELL!

I had…that is HAD…the same issue (see my post earlier today!). And was given the same problem solution as you have written down.

The “getURL” I find does the same thing…opens 2 pages…one with the Email user window and the other giving an error…
TRY and use my original coding (this is what I used instead…

[font=Comic Sans MS][color=#003366]on (release) {
loadVariablesNum("[/color][/font][font=Comic Sans MS]mailto:info@!!!.com[/font][font=Comic Sans MS][color=#003366]", 0);
}[/color][/font]
[font=Comic Sans MS][color=#003366][/color][/font]
[font=Comic Sans MS][color=#003366]And this works BEAUTIFULLY! I was able to also use the advice of “2nd Day” and manipulate the Subject field too! (just see my post!).[/color][/font]
[font=Comic Sans MS][color=#003366][/color][/font]
[font=Comic Sans MS][color=#003366]Hope this helps![/color][/font]
[font=Comic Sans MS][color=#003366][/color][/font]
[font=Comic Sans MS][color=#003366]allaKAZAAM[/color][/font]

Well, AllaKazaam, I did read your threads before I posted my question (hell, I’ve read every forum so to speak), but I can’t use that, because mine is not a button instance nor movie clip, I think, I don’t have separate buttons for all the links. I have sort of templates that are used in the scene and the AS changes the link-text inside the button each time. That’s why I said “not GetURL” in my topic :). Or maybe I should do it that way but I don’t know how to add that in the script.

Thanx anyway!

Anyone else?

mytextbox.html = true;
mytextbox.htmlText = “<a target=”_blank" href=“www.kirupa.com”>Kirupa!</a>";

Frustrating, but I can’t figure out how to do that, again :sigh: …
The name for the link is defined in another array (‘titel’ is the main link, ‘n’ is amount of sublinks, ‘fields’ is the name of the sublinks, ‘links’ is the url which opens in a new window each time, which I want to change). I tried adding _self to the links in all kind of ways, but it doesn’t help. I either get an error or it tries adding it to the url (like: http://www.lalala.com/index.html%20_self etc.). I don’t know enough about variables and expressions and all that, but I really want to learn how it works.
I also couldn’t prevent a browser window from opening in the email link, I tried adding 0… God, I’m hopeless, still so much to learn :blush: .

Here’s the code (in total):

<code>
titel = new Array();
titel[0] = “home”;
titel[1] = “on_tour”;
titel[2] = “profile”;
titel[3] = “ear and eye”;
titel[4] = “extras”;
titel[5] = “promotion”;
titel[6] = “bookings”;
titel[7] = “guestbook”;
titel[8] = “email”;
titel[9] = “latest_shows”;
n = new Array();
n[0] = 1;
n[1] = 2;
n[2] = 5;
n[3] = 3;
n[4] = 5;
n[5] = 3;
n[6] = 1;
n[7] = 1;
n[8] = 1;
n[9] = 4;
fields = new Array();
fields[0] = “back_to_start”;
fields[1] = “upcoming_shows”;
fields[2] = “shows_history”;
fields[3] = “Hayo > bass”;
fields[4] = “Erik > guitars”;
fields[5] = “Duijf > vocals”;
fields[6] = “Remco > drums”;
fields[7] = “Thijs > guitars”;
fields[8] = “audio”;
fields[9] = “video”;
fields[10] = “pictures”;
fields[11] = “printed_media”;
fields[12] = “setlists”;
fields[13] = “studio_sessions”;
fields[14] = “London_trip”;
fields[15] = “Flip_fans”;
fields[16] = “promo_cd”;
fields[17] = “t_shirts”;
fields[18] = “promo_material”;
fields[19] = “bookings_form”;
fields[20] = “view_or_sign”;
fields[21] = “email_FtS”;
fields[22] = “10-07 Amsterdam”;
fields[23] = “12-06 Vlaardingen”;
fields[24] = “11-06 Heemskerk”;
fields[25] = “more_shows”;
links = new Array();
links[0] = “index.html”;
links[1] = “agenda.html”;
links[2] = “mailto:[email protected]”;
links[3] = “x”;
links[4] = “x”;
links[5] = “x”;
links[6] = “x”;
links[7] = “x”;
links[8] = “x”;
links[9] = “x”;
links[10] = “x”;
links[11] = “x”;
links[12] = “x”;
links[13] = “x”;
links[14] = “x”;
links[15] = “x”;
links[16] = “x”;
links[17] = “x”;
links[18] = “x”;
links[19] = “x”;
links[20] = “x”;
links[21] = “x”;
links[22] = “x”;
links[23] = “x”;
links[24] = “x”;
links[25] = “x”;
</code>

Thanx everyone for trying to help me out here, I’m really stuck!

I changed:
links[0] = “index.html”;

to:
links[0] = getURL(“index.html”, “_self”);

And it works (opens the index.html in same browser window), but it goes there as soon as the page with the swf loads, instead of when I click the appropiate sublink, so I need to insert something like onRelease, but where and how??

Can anybody help? Pleeeeezzz? Pretty pleeeezz?? :ne:

Open your mc “fields” and click the “copia” button. Change the code there to

on(release){
	_root.spegni1();
	gotoAndStop(5);
    getURL(link,"_self");
}

scotty(-:

O jeez, I totally forgot about that!! OOps! Mental note to self: Never post if you’re lacking sleep… Thanx again Scotty :).

welcome;)