ActionScript 3.0 :: Open Links In Same Window ("_self" Does Not Work)

Apr 29, 2010

I was given the following code to have my button open a link.

testbtn.addEventListener(MouseEvent.MOUSE_DOWN, gotest);
function gotest(event:MouseEvent):void {
navigateToURL(new URLRequest("http://www.bing.com/"));
}

This function works fine except that it opens all my links in new windows or tabs. I added the "_self" parameter to the function and created the following:

[Code]...

View 3 Replies


Similar Posts:


ActionScript 3.0 :: Even With _self Set Links Still Open A New Window

May 1, 2011

I have navigateToURL(new URLRequest("page address"),"_self"); still opening a new window for all of the buttons in my menu. I think I have the syntax correct so are there any other factors?

Here is the code

ActionScript Code:
Button1_btn.addEventListener(MouseEvent.CLICK,mouse1DownHandler);
function mouse1DownHandler(event:MouseEvent):void {

[Code]....

View 1 Replies

ActionScript 3.0 :: Links Opening In New Window Even With Target _self?

May 5, 2009

I'm working on a SWF that is a banner on a home page and the is opening links a new window despite my attaching the "_self" argument to the navigateToURL command.Like here is a snippet of code TO ME it looks right:

PHP Code:
var link_001:URLRequest = new URLRequest("http://www.lcc.edu/schedule/");button_001_btn.addEventListener(MouseEvent.CLICK,

[code]....

View 3 Replies

ActionScript 3.0 :: Hyperlink Text Will Not Work With _self, Only As Self And Then Creates Window?

Jan 14, 2011

I understand that the code below should work but it doesn't, I have to take the underline before self out, for the hyperlink to work at all, and then it creates another window for the file. There may some sort of glitch that I am not aware of. But the code below does not work as is in my app. 
 
var t:TextField = new TextField();
t.htmlText = "hello world"+ "<a href='weeTestPage.html' target='_self'><u>click here</u></a>";
t.autoSize=TextFieldAutoSize.LEFT;
addChild(t);

View 1 Replies

Open Links In A New Window With Buttons?

May 30, 2007

I was just wondering how when you assign a link to a button, instead of it opening that link in the same window, how can i get it to open it in a new one.

View 3 Replies

ActionScript 3.0 :: Links Open In A New Window?

Apr 1, 2010

I have a rotating banner that I have created and it receives it's image and url info from an XML document. When you click on the image displayed it takes you to the correct link but it opens it in a new window. Is there a way to make the link open in the current window?

View 2 Replies

ActionScript 2.0 :: Get These Links To Open In A New/blank Window (xml)?

Oct 9, 2009

i found this code somewhere, and have used it for a site, but the links open on the same page and i cant find an option to have them open in a different target window.AS code:

Code:
// The first step is to activate the XML object
headlineXML = new XML();

[code]......

View 2 Replies

ActionScript 3.0 :: Make HTML Links Open In Same Window?

Jun 19, 2009

How on earth do I get the HTML links inside a flash movie open up in the same browser window where said movie is embedded in (As opposed to opening up as a new pop-up windows)? Here is the code I have inside each of the buttons I have inside my flash movie:
  
var link7:URLRequest=new URLRequest("videos/december.html");
videos_btn.addEventListener(MouseEvent.CLICK, buttonClicked7);
function buttonClicked7(event:MouseEvent):void
{
navigateToURL(link7);
}

View 3 Replies

ActionScript 3.0 :: Make Flash Banner's Links Not Open In A New Window?

Aug 18, 2009

I'm having a little trouble with my flash banner. When I click on my button, it opens the link I specified in a new window or new tab, like target _blank in HTML. I want it to open in the same window, so you're still navigating through the site. Here's my button's code: link_btn5.addEventListener(MouseEvent.... goToURL5); function goToURL5(e:MouseEvent):void{ navigateToURL(new URLRequest ("/forums/index.php "));}

View 4 Replies

ActionScript 3.0 :: Multiple Links - Open The Second Link As Soon As You Open The Links Page

May 17, 2009

I am trying to have multiple links off site but have hit a brick wall. If I have the code listed below, it opens the second link as soon as you open the links page, If I have the"function onLinkClick (evt)", above btn6_btn I end up with the duplicate error message. Is there a way to have multiple link buttons on a page. I have played with this for hours.

[Code]...

View 15 Replies

ActionScript 2.0 :: Make TextField Clickable Links To _blank Instead Of _self?

Feb 7, 2007

When a user clicks on a URL, I want the new page to open up in a new window (or tab),instead of always in _self, which of course replaces the movie. I've trace'd the htmlText contents, and see TARGET="" where it's building the clickable links, which I assume the browsers interpret as the same thing as _self. Is there some better way to change the target for any URLs, short of doing a search and replace of the htmlText field

View 9 Replies

ActionScript 3.0 :: Link Won't Open In _self

Aug 18, 2010

I'm working on a Flash navigation using AS3. It can be seen as is @ PhilipK .ca /portfolio .

I want to make it so when you click the button on the far right, for the second time it opens a link in the tab that the flash video is embeded.

Here is the code I am having trouble with...

{
navigateToURL(new URLRequest ("philipk.ca/photo_gallery/photography"), '_self') ;
}

http removed before address because I am not able to post URLs untill 50 posts

I am wondering if I have to change part of the code within the HTML? Or am I doing something wrong with the AS3 code?

View 1 Replies

ActionScript 3.0 :: URL Request - Blank Work Open The Link In A New Window

Jul 13, 2009

just as the title says, _blank opens the link in a new window, _self does nothing could the issue be related to testing locally?

[Code].....

View 13 Replies

Flex :: Does Window.open Not Work Inside An AIR Html Component

Jun 15, 2010

I have a component in AIR like so:[code]The 2 alerts both work. however nothing happens when you click the new window link.all 3 links works when in a real browser so I know its ok.Is there just no support for window.open in the AIR HTML component? or is this a bug?Is there a work around?

View 2 Replies

ActionScript 3.0 :: Buttons Open In The Current Window But It Doesn't Seem To Work

Aug 26, 2009

I'm trying to have my buttons open in the current window but it doesn't seem to work. Here is my code:

[Code]...

View 5 Replies

ActionScript 2.0 :: Open A New Window If Have Thumbnail Pics In The Flash Movie But Want The Full Pic To Open Up In A New Window?

Mar 6, 2004

1) how do you open a new window if you have thumbnail pics in the flash movie but want the full pic to open up in a new window? Is this Javascript inside flash?

2) How do they do the menu bar here at this site:[URL]

View 1 Replies

ActionScript 2.0 :: Get The Javascript Open Window Functon To Work With A Simple Button?

Apr 29, 2009

I can't seem to get the javascript open window functon to work with a simple button. I'm using flash 8. I'm creating a simple CD with exe which loads a swf movieclip. With in this movie clip is a button to open a popup window. Every javascript I have tried to use isn't working. The exe, swf and html page all reside in the same directory. There the latest:

on (release) {
getURL ("javascript:NewWindow=window.open('popup.htm','ne wWin','width=400,height=300,left=0,top=0,toolbar=N o,location=No,scrollbars=No,status=No,resizable=No ,fullscreen=No'); NewWindow.focus(); void(0);");
}

View 2 Replies

ActionScript 3.0 :: Button Navigation - Open The New Page In The Same Window, It Doesn't Seem To Work?

Dec 7, 2010

I have a simple website and I am going from one page(flash file) to another page(different flash file) using the following code.

var myLink:URLRequest;
function openPage(event:MouseEvent) {
switch (event.currentTarget) {[code]....

This works fine, but I want to be able to use "_self" so I open the new page in the same window yet it doesn't seem to work.

View 4 Replies

ActionScript 3.0 :: NavigateToURL Opening In New Window Even With _Self?

Feb 18, 2009

Strange Behavior in a flash I'm working on. And I must be doing something wrong because I can reproduce it in every flash I create. You can check out the behavior here at a test page on my under construction site:I have a menu bar at the top of the page, with the following code:

btnHome.addEventListener(MouseEvent.CLICK,btn1Clic kHandler);
function btn1ClickHandler(event:MouseEvent):void{
navigateToURL(new URLRequest("http://www.i2ctech.com/"),"_Self");

[code].....

View 2 Replies

ActionScript 3.0 :: NavigateToURL Opening In New Window Even With _Self

Feb 18, 2009

Strange Behavior in a flash I'm working on. And I must be doing something wrong because I can reproduce it in every flash I create. You can check out the behavior here at a test page on my under construction site: [URL]I have a menu bar at the top of the page, with the following
code:

btnHome.addEventListener(MouseEvent.CLICK,btn1ClickHandler);
function btn1ClickHandler(event:MouseEvent):void{
navigateToURL(new URLRequest("
http://www.i2ctech.com/"),"_Self");

[Code].....

If I open up a web browser and then click the menu buttons, the buttons open the link up in a new page. Once the NEW page opens, the menu buttons start acting as I would expect, then opening any further links in the same web page. Is this some internet explorer security setting? Every computer that I have utilized (total of 5) to view the web page exhibits this same behavior.

View 13 Replies

ActionScript 3.0 :: Can't Get _self To Work On URLRequest

Aug 20, 2010

I've cobbled together a website for the family business using Flash CS4, but I'm having real trouble getting two interlinked .swf's to open in the same window. By the time you go from the homepage to the gallery and back to the homepage, you've got 3 tabs in the browser. How can I fix this? Here is my code.

ActionScript Code:
button4.addEventListener (MouseEvent.CLICK, onMouseClick);
function onMouseClick(e:MouseEvent):void
{

[Code]....

The code is the same (different URL, obviously) for both links, but they open new tabs every time.

EDIT: It seems to have fixed itself. Maybe it didn't upload right when I put it on the FTP. So all is well now!

View 0 Replies

ActionScript 2.0 :: Javscript:window.open In IE - Link In A Button Inside A Flash Movie To Open A New Window And Play A Youtube Movie

Jul 13, 2009

I work with 3d animation. Im have a problem with a personal website Im doing, I have a link in a button inside a flash movie to open a new window and play a youtube movie:

on (release) {
var jscommand:String = "window.open('http://www.youtube.com/v/b0L4XLODhAA&hl=en&fs=1&','win','height=344,width=4 25,toolbar=no,scrollbars=yes');"; getURL("javascript:" + jscommand + " void(0);");
}

This works fine in Firefox but in IE it doesnt work, I then change the /v/ in the youtube link with /p.swf?video_id= and now I have the window open showing the small youtube thumbnail of my video but once a click play, nothing happens, I check it and is not loading anything.

View 8 Replies

Professional :: _self Does Not Work On Flash Button?

Mar 8, 2011

Im using this code on a nav menu i have created.

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

[code].....

View 9 Replies

ActionScript 3.0 :: URLRequest _self Property Won't Work, Because Of AllowScriptAccess?

Mar 24, 2011

Here I create a button that when pressed opens specifies web site:

Code:var adresas:URLRequest = new URLRequest("some web site adress", _self);
var item:Sprite = new Sprite();
item.graphics.beginFill(0x000000);
item.graphics.drawCircle(30, 30, 20);
item.graphics.endFill();

[Code]...

View 0 Replies

NavigateToURL - Code Not Opening Website In The Same Window Using "_self"

Jan 22, 2011

code not opening website in the same window using "_self" I'm using a button called B_btn and a navigateToURL command on MOUSE_UP.

Code:
B_btn.addEventListener(MouseEvent.MOUSE_UP, getPage);

function getPage(Event:MouseEvent):void
{
navigateToURL( new URLRequest("http://www.google.com"),"_self");
}

I'm just checking the swf in Flash CS5 using ActionScript 3, publishing with command+F12 (key command on Mac OSX), but that alone should work right without exporting? And to go a little off topic, could someone kindly tell me how to embed the swf as HTML code, as I'm trying to setup this swf as an intro to my website and need to embed it as HTML for my index.html page.

View 1 Replies

ActionScript 3.0 :: "_self" Not Opening URL In Same Window?

Jul 13, 2009

however, I have successfully changed the following script from AS1 to AS3. All is working with the exception of the "target". When I use "_self", nothing happens. However, when I remove _self and click on the button (image), it opens a new window.

All of the tut's I have followed have suggested the same thing, but it is not working for me.

Here is the URL in question: [URL]

And, the AS (below) I'm using. The first block of code is another attempt at correcting this, however, you'll see that it is commented out.

[Code]....

View 3 Replies

ActionScript 3.0 :: Link To Rather Open Up A Download Window Instead Of Just A New Browser Window?

Oct 30, 2009

i have a flash site that links to PDF's with the navigateToURL function which works etc But now i would like Link to rather open up a download window instead of just a new browser window?

View 3 Replies

IDE :: "_self" Not Opening URL In Same Window?

Jul 13, 2009

not very fluent with AS3, however, I have successfully changed the following script from AS1 to AS3. All is working with the exception of the "target". When I use "_self", nothing happens. However, when I remove _self and click on the button (image), it opens a new window.All of the tut's I have followed have suggested the same thing, but it is not working for me.And, the AS (below) I'm using. The first block of code is another attempt at correcting this, however, you'll see that it is commented out.

stop();
//actions to redirect user to new page in same window
/*var link:URLRequest = new URLRequest("http://thejournal.com/microsites/govconnection/21st-

[code].....

View 1 Replies

ActionScript 3.0 :: NavigateToURL "_self" Parameter Doesn't Work?

Apr 12, 2010

I'm trying to use navigateToURL with the "_self" parameter for a website navagation menu, but all I ever get is the url opening in a new window or new tab (depending on what browser you are using). What I would like is if it opens in the same window within the browser. For html validation purposes; I'm using a javascript ufo 3.22 (unobtrusive flash objects) method of embed. Here is my AS3 code which is in a standalone file (hope I got all necessary import packages included).

[Code]...

I know it's something real simple and I've read many a posts that scream "allowscriptaccess" issues, but even when I set that I still can't get it working properly.

View 1 Replies

ActionScript 3.0 :: NavigateToURL - Get The Link To Open In The Same Window Instead Of A New Window

Nov 18, 2009

I'm trying to get the link to open in the same window instead of a new window, it's currently set to _blank. I tried _top, _self, _parent. When it's set to anything other than _blank the link doesn't work.

[Code]....

View 7 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved