flash link opens in new window

I’ve imported a small flash player file that functions as a button to a link. That link comes up in a new window, but I don’t want it to. I’m assuming this is a Flash issue as there are no actions assigned to the html box that it’s imported into.
Any advice? Anyone? Anyone?

DH.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

As with most questions if you can post a link to the page online somewhere it is a lot easier for us to see your code and work out what is going wrong.

David


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Actually, I did find a solution to my query on another board. Thank you for the response and I’ll be sure to include code with other issues.
Thanks to one Dave from another!


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Share your solution in case anybody else has the same problem.

David


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Sometime around 1/12/08 (at 18:49 -0500) davidh said:

Actually, I did find a solution to my query on another board. Thank
you for the response and I’ll be sure to include code with other
issues.

Glad to hear you found a solution.
Normally, here, it is better to post a URL to an example of the
problem rather than raw code.

Sometimes sharing a bit of code really is the best way to track
things down, but often it is better for people to get the ‘bigger
picture’ of seeing something in situ. And also don’t forget the forum
readers who use Freeway because code brings them out in a rash. :slight_smile:

k


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

It’s more of a Flash issue, but it goes a little like this…

The code for creating a link button in Flash CS3, taken from the Adobe tutorial, looks like this:

inv_link.addEventListener(MouseEvent.CLICK, buttonClickHandler);
function buttonClickHandler (event:MouseEvent) :void {
navigateToURL (new URLRequest (“http://www.webaddress.html”));
trace(“I’m clicked”);
}

This code causes the link to open in a new browser window. To link to a page in the same browser window the element ,"_self" is inserted after the web address. (note: “_self” takes on the green color making it relevant to the address) It looks like this:

inv_link.addEventListener(MouseEvent.CLICK, buttonClickHandler);
function buttonClickHandler (event:MouseEvent) :void {
navigateToURL (new URLRequest (“http://www.webaddress.html”),"_self");
trace(“I’m clicked”);
}

Hope that clears things up. Did for me!


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Now you could have used the Flash Extras action that allows you to edit links in a Flash file amongst other things.

David


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options