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


Similar Posts:


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

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

ActionScript 2.0 :: Change Allowscriptaccess Parameter Of An Already Loaded Swf?

Jan 15, 2009

How would one go about changing the allowscriptaccess parameter of an already loaded swf?

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

Visible Property Does Not Work For True

Apr 17, 2011

I have a clip which is basically a set of button clips. When a button is clicked it fades (i used the ._alpha property) and finally when its 0 alpha, it removes itself (by using _visible=0 property). It works perfectly. Now when another button is clicked. I wanted the button which is currently not visible to restore its visibility. But using _visible=1; just isnt doing it (pastbutton._visible=1;). I tried a lot of trouble shooting, trace shows that the correct button path of the last invisible button is stored in pastbutton. But still when the next line says pastbutton._visible=1 still it doesn't restore the target button which is stored in the pastbutton variable.

View 1 Replies

ActionScript 3.0 :: Papervision Alpha Property Does Not Work

Apr 7, 2011

I have a papervision project and this problem has kept me from going for days. I have Text3D object in my project and I have to reduce and increase the alpha property of this object , and I do it by changing the alpha property of the ViewportLayer that contains this Object. everything works fine but when I change it's text property due to some circumstances I can't work with it's alpha property anymore.

I change it's text like this:
var text1:String = "second string";
mytext3D.text = text1;

I don't (and I can't) use "useOwnContainer" and I use a defined ViewportLayer for this Text3D which I've defined like this:
var textLayer1:ViewportLayer = viewport.getChildLayer(mytext3D);
And I change the alpha property of this "textLayer1" in order to change the alpha of my Text3D object. Everything works fine till I change the text property and after that when I change the alpha of my "textLayer1" nothing happens!

View 2 Replies

ActionScript 2.0 :: Position Property Don't Work In Tween Class

Jan 12, 2009

i am trying to change the position while the yoyo is working but the tween object goes to the new position and then back to the old position and continuing to yoyo.

ActionScript Code:
import mx.transitions.Tween;
import mx.transitions.easing.*;
var swing:Tween = new Tween(swingObj, "_rotation", Regular.easeInOut, 60, -60, 2, true);

[code]....

View 2 Replies

ActionScript 3.0 :: Flash - .visible Property Doesn't Work?

Apr 26, 2011

Code:
public function BrokenItem(originalImg:Bitmap,fixedImg:Bitmap)
{

[code]......

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

Flex :: ButtonMode And UseHandCursor Property In DataGrid Doesn't Work?

Oct 28, 2010

If I set the properties of "buttonMode" and "useHandCursor" to true in DataGrid, it does not work as I expect. Only if I move the cursor to the edge between two rows, the hand cursor displayes.

What I expect is that no matter where the cursor is moved, it should always show hand cursor.

The following the itemRenderer:

<?xml version="1.0" encoding="utf-8"?>
<mx:Label
xmlns:mx="http://www.adobe.com/2006/mxml"

[Code]....

View 3 Replies

Actionscript 3 :: TextLayoutFormat - When Using Embedded Fonts - FontWeight Property Does Not Work

Oct 18, 2011

I have replaced all TextField objects with TextLayout as I require the functionality it offers. When using TextLayoutFormat I try to embolden text using "this._textLayoutFormat.fontWeight = FontWeight.BOLD;" Adobe have said you can only embolden text when using device fonts: "Applies only to device fonts (fontLookup property is set to flash.text.engine.FontLookup.DEVICE)."

View 1 Replies

ActionScript 3.0 :: When Apply A StyleSheet With The Img Tag Having The Display Property Set To None - It Doesn't Appear To Work

Jan 6, 2010

I have a TextField that has been populated with html text, which includes images using the <img> tag. I don't want to display these images to the user, however when I apply a StyleSheet with the img tag having the display property set to none, it doesn't appear to work.

View 1 Replies

ActionScript 3.0 :: OOP - When Transfer To Packages It Doesn't Work Where Concerning The Property Of The Bitmap

Sep 12, 2011

Im trying out some basic OOP.. and cannot understand where I am going wrong. It works within the timeline - but when I transfer to Packages It doesnt work where concerning the property of the bitmap. I have a 'MyClip' instance in the library. here is my bask Document Class package::

[Code]...

View 4 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 :: Button With .autorepeat - The RepeatDelay Is Throwing An Error - Property Work?

May 2, 2011

I have a button in my AS3 flash file that is using the .autorepeat property successfully. the button is too sensitive so a single click is being registered as multiple clicks. I'm trying to use the repeatDelay & repeatInterval properties but I'm getting the following error. "1119: Access of possibly undefined property repeatDelay through a reference with static type fl.controls:Button." Do the repeatDelay & repeatInterval properties work in AS3??

[Code]....

View 2 Replies

ActionScript 3.0 :: Number Of Elements In Array - Length Property Doesn't Work

Feb 3, 2010

I am using an array to return data to an application and as the array is filled with data using a loader and the order is important it happens that data in slot n is inserted later than data in slot n+1. How do I know that the array is full as I know the number of elements to be loaded? The length property doesn't work for this. I could go through the array each time I put something in and look if every slot is full but that seems ineffective.

View 1 Replies

ActionScript 3.0 :: Flash Cannot Access A Property Or Method - Tweening Doesn't Work

Aug 12, 2010

I've got on main timeline (on frame 10) buttons, when I click one of them it goes to its currentLabel"". On curerntLabel at frame20 "racerButton" where I've got some tweening. At currentLabel "boardButton" at frame30 I load external swf. The problem I've got is when I press any button everything works fine. But when I first press button "boardButton" at frame30 the ext.swf shows up fine, but when next I click the button "racerButton" at frame20 the tweening doesn't work there and it gives me error

[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







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