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


Similar Posts:


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

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 :: 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

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 :: 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

Professional :: URLRequest Lost - Error 1046: Type Was Not Found Or Was Not A Compile-time Constant: URLRequest

Aug 12, 2009

In my movie i have a link button with following, simple, function creating a link:

[Code]...

lately i've associated a class file (.as) to my movie and immediately after, when publishing the movie i got the following error message: 1046: Type was not found or was not a compile-time constant: URLRequest. as well as a couple of other related error messages: 1180: Call to a possibly undefined method URLRequest. 1180: Call to a possibly undefined method navigateToURL. when i remove the link to the class file, the problem goes away. also, i have checked the class file for mentioning of "URLRequest" and nothing is there.

View 9 Replies

ActionScript 3.0 :: New URLRequest("test.swf?param=1") Doesn't Work?

Sep 23, 2009

I use URLRequest where I need to load external swf file and pass it some parameters. I am now out of my ideas.

example of my code:
var mRequest:URLRequest = new URLRequest("test.swf"); --works fine
var mRequest:URLRequest = new URLRequest("m1-9.swf?param1=true"); --doesn't work, output

[code].....

View 4 Replies

IDE :: GetURL _self Not Working?

Apr 28, 2008

I have a flash banner that is a simple animation and some text, and at the top layer an invisible hit area button that has the following AS on it...

Code:
on (release) {
getURL(url, "_self");

[code]....

View 14 Replies

ActionScript 2.0 :: GetURL, Reloads Swf When Using _self?

Feb 8, 2010

Using AS2, I have a simple flash navigation built using getURL to open various pages of the web site. I'm using _self because it's necessary to open the pages in the same window.The functionality works fine, the only problem is my flash navigation is on every page and when I "getURL" on the pages linked to from the menu, the flash reloads when the page loads. This creates a blank spot on the page until the flash loads.What's the best way to do my navigation so that it doesn't reload the flash on every page? Or at least I don't get the blank spot when going to a new page.

View 2 Replies

ActionScript 3.0 :: Major Problems With _self In AS3

Jan 6, 2010

Okay, so I'm pretty much a self-taught Flash newb, so please bear with me if this question has an obvious answer.  I've searched different fixes, and none of them have worked.
 
I am making a simple button in Flash CS4 with AS3.  The button has a hover effect and that's it.  I am wanting the button to link to a different webpage when clicked on in the same window.  I am using this code:
 
Button.addEventListener(MouseEvent.CLICK, onMouseClick);
 
function onMouseClick(e:MouseEvent):void{    var request:URLRequest = new URLRequest("http://www.mysite.com);    navigateToURL(request, "_self");}
 
When I test the movie in Flash, it works fine.  It takes me to the webpage.  However, when embedded online, it does nothing.  I can click on it, and I will remain there on the same page.  Like it's just a pretty image with a hover effect and no link.  I've tested the button in both IE and Firefox, and it does not work in either.
 
Now here's the funny thing....when I use _blank instead of _self, it works just fine in both Firefox and Explorer.  Any ideas of what I am doing wrong?
 
Thank you.

View 10 Replies

ActionScript 3.0 :: URL Request Not Working With _self?

Dec 2, 2010

from within a browser this will work:

function bobhome(evt:MouseEvent):void{    var urlRequest:URLRequest= new URLRequest    ('home.html');    navigateToURL (urlRequest, "_blank");    }

this will not:
 
function bobhome(evt:MouseEvent):void{    var urlRequest:URLRequest= new URLRequest    ('home.html');    navigateToURL (urlRequest, "_self");    }

View 5 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 :: 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 :: Can't Link To A _self Page And Only _blank

Sep 4, 2009

How would I make this open in the same window instead of a blank popup window?

//Navigate to some URL
var urlRequest:URLRequest = new URLRequest("http://www.blah.com/links.php");
navigateToURL(urlRequest);
}

View 3 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 :: Navigate To _self : When I Click On The Button, It Does Nothing?

Jul 16, 2009

This is the code I am using:
 
main_btn.addEventListener(MouseEvent.CLICK, onMouseClick);

function onMouseClick(e:MouseEvent):[code]...

When I click on the button, it does nothing but sit there with a blank stare like I did in physics class. It works fine if I switch it to _blank, but that is totally not what I want. Why is this not working?

View 3 Replies

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 :: NavigateToURL - Navigates To A URL With A _self Target

Mar 1, 2010

I have this site I am updating and I have a little issue. I made a button that navigates to a URL with a _self target. Well, in the script, i have it like this:

Code: Select allclickhere2Btn.addEventListener(MouseEvent.MOUSE_DOWN, myHandler);
function myHandler(event:MouseEvent):void {
navigateToURL(new URLRequest("https://app.playmakercrm.com/register/eNortjK0UjJWsgZcMAkeAcs!"), "_self");
}

the "_self" isn't working on the page, but when i take out the target, it works just find, it opens in a new page which i don't want. You can check it out here Code: Select [URL] and watch that flash header for about 30 seconds, theres a button at the end that reads "Click Here" try clicking on that and it wont take you to the URL.

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 :: Made A Button That Navigates To A URL With A _self Target?

Mar 1, 2010

I made a button that navigates to a URL with a _self target. Well, in the script, i have it like this:

Code:
clickhere2Btn.addEventListener(MouseEvent.MOUSE_DOWN, myHandler);
function myHandler(event:MouseEvent):void {
navigateToURL(new URLRequest("https://app.playmakercrm.com/register/eNortjK0UjJWsgZcMAkeAcs!"), "_self");
}

the "_self" isn't working on the page, but when i take out the target, it works just find, it opens in a new page which i don't want.You can check it out here

Code:
dev.myhomecaresalescoach.com

and watch that flash header for about 30 seconds, theres a button at the end that reads "Click Here" try clicking on that and it wont take you to the URL.

View 1 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 :: Error "1084: Syntax Error Expecting Rightparen Before _self

Apr 19, 2009

Im having a problem getting my code to navigate to a url in the same browser window, here is what I've got:
 
private function onClick(e:MouseEvent):void{            switch(e.target){                case casestudyBtn:                    navigateToURL(headerVO.caseStudyURL, "_self");                    break;                case campaignBtn:                    navigateToURL(headerVO.campaignURL, "_self");                    break;            }        }
 
It keeps returning the error "1084: Syntax error: expecting rightparen before _self.

View 2 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 :: NavigateToURL "_self" Option Not Working?

Jan 28, 2009

I'm using the navigateToURL function in order to open a new html page. I want the new html page to replace the page that holds the swf. I'm using the "_self" option, but it's opening the window in a new tab in both FireFox and IE.

View 1 Replies

ActionScript 3.0 :: Link To Url, "_self" Is Opening A New Page?

May 13, 2010

I am trying to get my button to navigate to _self and the link is opening a new page. Is there something wrong in my code?

my_btn.addEventListener(MouseEvent.MOUSE_DOWN,[code].....

View 5 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

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 :: Url In URLRequest?

Apr 28, 2010

I have the following actions in my file :

var xmlLoaderA:URLLoader = new URLLoader();
xmlLoaderA.addEventListener(Event.COMPLETE, LoadSomething);
xmlLoaderA.load(new URLRequest("my url"));[code]....

now imagine that the loading of the file is completed and we are in the "LoadSomething" function. How can we trace "my url" in this function? In another word I want to wite this action:

trace(Command);

and I want "my url" string in output.But I dont know what is the Command.

View 1 Replies

Flex :: Use A Var In A URLRequest?

Dec 27, 2011

During development I have to test using several different hosts. It is a pain to have to change the IP address everywhere I use navigateToURL or in an mx:HTTPService. I would like to set a var with the IP... public var hostIP:String = "192.168.1.100"; Then later I instead of doing...

[Code]....

View 2 Replies







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