ActionScript 3.0 :: Closing Parent Web Browser (or Tab)?

Feb 18, 2009

I wanted to know if there is a way for the SWF to programmatically close the parent browser window or tab using AS. Also, is there a way for the SWF to tell the parent browser to bring itself to the top of the other windows (i.e. "bring itself into focus")?

View 5 Replies


Similar Posts:


ActionScript 2.0 ::closing A Browser Window In All Types Of Browser?

Nov 9, 2009

I have looked around for this and haven't found a way that clearly explains how to do this. More often than not the button will close the browser window in one but not another browser.

Is the a simple way of closing a browser window in all types of browser ( Or mainly Firefox, IE and safari on both Mac and PC ) with actionscript?

View 0 Replies

ActionScript 2.0 :: Closing A Browser Window In All Types Of Browser?

Nov 9, 2009

often than not the button will close the browser window in one but not another browser.Is the a simple way of closing a browser window in all types of browser( Or mainly Firefox, IE and safari on both Mac and PC ) with actionscript?

View 5 Replies

ActionScript 3.0 :: One Button For Open New Swf And Closing Parent?

Jun 14, 2010

I want make one flash profile, I made one logo.swf file finalize with exe file and the last end of movie coming one button if i will press this button i want to load main.swf and at a time need close my logo.swf. How can write in action script 3

View 1 Replies

ActionScript 3.0 :: Closing The Parent Swf When Calling The External Swf

Feb 11, 2011

I have created a flash movie for displaying several videos. Also it has a first 'menu' flash movie which will call this video displaying swf after checking some Identifiers in 'menu'.

I am using code like this to call video displaying swf. Inside Menu.fla I wrote the below code to call CFStarVideoAS.swf.

var mLoader:Loader = new Loader();
var mRequest:URLRequest = new URLRequest("CFStarVideoAS.swf");
mLoader.contentLoaderInfo.addEventListener(Event.C OMPLETE, onCompleteHandler);
mLoader.load(mRequest);
stage.addChild(mLoader);

It loads the other movie but both movies are displaying together.

I have to unload Menu.swf, which is the first swf running.

My colleagues were using unloadMovieNum(0) with as1.

I tried mLoader.unload for a trial in as3 but not works. I read from some article that unload will work but don't know how and where to insert it.

View 0 Replies

ActionScript 3.0 :: Closing A Browser Window?

Feb 9, 2009

i am using the following code to close the my browser.

getURL("javascript:window.opener=self;window.close()");

The above code is not working in Flash player 10.

View 1 Replies

CS3 / AS.20 - Closing Browser Window From Flash?

Jun 15, 2009

I am currently trying to work out how to get Flash to close the browser window it is running in. I've done a simple Javascript test version which works fine.. But if I try and use:
ExternalInterface.call("closeMyWindow");
Functionality it does not. My simple Javascript version is cut and paste below and attached to this message.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[URL]"><html>
<head><title>Untitled</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="language" content="en" />
<meta name="description" content="" />
[Code] ....
Attachments: jsclose.html (630 bytes)

View 8 Replies

ActionScript 2.0 :: Closing The Browser Window With JS?

Jun 17, 2009

I think my original post on this was lost following from the hacking of the site, so I'll try again.

Hopefully someone out there will have an idea where I am going wrong with this: I am currently trying to close browser window that a flash movie is running. Due to the fact that the browser window is not a popup "child", using the normal "self.close()" or "window.close()" brings up the IE7+ prompt of "This page is trying to close this the window" when it is executed.

[Code]...

View 0 Replies

ActionScript 3.0 :: Closing Browser Window In Which SWF Loaded

May 6, 2010

Using AS3, and without modifying the published HTML file, I want close the browser window (IE/Firefox) in which my SWF is playing on click of a button. This is not a pop-up window that the SWF is running in. It is the main browser window.

Here's my code:
btn_closeBrowser.addEventListener (MouseEvent.CLICK, close_Browser);
function close_Browser(event:MouseEvent):void{
var jscommand:String = "window.close();";
var req:URLRequest = new URLRequest("javascript:" + jscommand + " void(0);");
navigateToURL(req, "_self");}

Nothing happens when I click on btn_closeBrowser in IE or Firefox.

View 4 Replies

ActionScript 2.0 :: Closing A Browser Window In Firefox?

Jun 4, 2010

An old discussion - but still relevant: Does anyone know a script for a button making it able to close a Firefox browser window (on a mac)?

I have tried 1) variants of "javascript:window.close()" and 2) to make the button open a new window in itself, which immediately afterwards closes itself...

View 1 Replies

ActionScript 3.0 :: Closing IE 8 Browser With Flash Not Working?

Apr 7, 2011

There are many posts about how to close browsers, but so far I can't get any of them to work from a custom class. I am new to AS3 so I could be doing something wrong. My class *is* being called and the method *is* executing, but the browser (IE) does not close. I'm wondering if this might be a scope issue of some kind?

View 0 Replies

ActionScript 2.0 :: Closing Flash Player Browser

Jul 23, 2002

anyone knows about closing flash player using action script ? i really want to get the information immediatelly. [URL]

View 6 Replies

ActionScript 2.0 :: Closing A Browser Window Using FScommand?

Oct 23, 2004

how does one close a browser window using the FSCommand. The normal 'quit' option works only closes a projector file. But i need to close a browser window.

I hear there is some technical javascript wizadry which allows one to do this.

View 3 Replies

ActionScript 2.0 :: Closing A Browser Window Using FScommand

Oct 23, 2004

how does one close a browser window using the FSCommand. The normal 'quit' option works only closes a projector file. But i need to close a browser window.

View 3 Replies

ActionScript 3.0 :: Closing Browser Window From Flash Movie On CD?

May 8, 2009

I have to put a flash lesson I created on a cd for a client and while testing it I noticed that my exit button in the movie no longer seems to function.This is my close window function

function closeWindow(evt:Event)  var url:String = "javascript:window.opener=self; window.close()";  var request:URLRequest = new URLRequest(url);  try  

[code].....

View 1 Replies

ActionScript 2.0 :: Handle Browser Window Closing In Flash?

Feb 19, 2007

Working on a flash poker game and I wonder if there is any way you can create a popup launcher that detects if the user tries to close the browser window. Right now the user can close the window and therefor lose the current round, isnt very user friendly

View 3 Replies

ActionScript 3.0 :: Positioning Parent MC In Order To Center Child MC On Parent's Parent MC

Feb 5, 2010

[code]All clips are squared.Ok, on the PlayerPlane, there are little soldiers, which have hotkeys. The effect I'm trying to create is I want to position the GameStage so that the currently selected soldier appears in the center of the GameClicker clip.The GameStage is movable by the player (to scan other areas of the map)by holding the CTRL key, so it's easy to kinda lose track of where your players are.I have tried using localTo Global and globalToLocal techniques, but I think I'm lost on the actual math of getting the GameStage to move the correct distance so that the selected soldier is centered to the GameClicker.[code]

View 2 Replies

ActionScript 3.0 :: Remove Parent.parent.parent Child?

Jan 3, 2010

I got a "preloader" that creates an movieclip and loads an SWF. Now in the loaded SWF i want a close button to go back to the "preloader". The preloader isn't an actuall preloader but some sort of mainclip.Now i tried this:removeChild(MovieClip(e.currentTarget).parent.pare nt.parent)But i get error:ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.at flash.display::DisplayObjectContainer/removeChild()at MethodInfo-6()

View 1 Replies

ActionScript 3.0 :: Referencing Stage - Add Bullets To The Stage Rather Than Using Parent.parent.parent.addChild?

Jul 10, 2009

I'm currently making a platform game and when the player shoots i want to add the bullets to the stage. The players gun class is in charge of adding bullets. The "players gun" is a child of "players gun holder" which is a child of "player" which is a child of the stage. is there a better or more dynamic way for the "players gun" to add bullets to the stage rather than using parent.parent.parent.addChild (bullet);

View 2 Replies

ActionScript 3.0 :: Add A Clip To The Stage As A Child And Remove The Parent And Set The Parent Equal To Null?

Sep 11, 2010

if I add a clip to the stage as a child and remove the parent and set the parent equal to null, does the child get collected and removed from memory? What if the child has an image loaded into it as its child? 

In my application I'm loading a series of png images as overlays that can be tinted for customizing in this app. When I trace my memory, the basic app idles at 64,000 k. The exact second I load those overlay images it goes up to 205,000k. If I remove those clips and "clear" the stage I should go back down to 64,000 k if everything is removed and collected correctly, right? It's not, it's hanging at 215,000 k. Are my images being cached and that is the reason for the memory staying up? If so, how do I prevent that. Or upon removing the parent of the image how can I un-cache the image.

If a user switches between models and loads several different items then the application actually crashes the Flash environment because of too much memory usage. It also does the same to browsers.

View 29 Replies

ActionScript 3.0 :: Error 1120: Access Of Undefined Property Parent + Movieclip(parent)?

Mar 15, 2011

I am trying to access a function that is on my document class for my AS3 project, from a nested class. That is, the Document Class calls Class A which then calls Class B. So I am trying to access a function from Class B, I am trying to use MovieClip(parent).function(); but I am getting error 1120. The MovieClip(parent) (fixed to reflect my document class, etc) works when I try it from other classes but not from this nested class.

View 9 Replies

Flash :: Drag And Drop Application Where Mc Is Dragged Out Of One Parent Mc And Dropped Into Another Parent Mc?

Nov 13, 2010

Simple drag and drop application where mc is dragged out of one parent mc and dropped into another parent mc.All works OK until I added 2 text boxes to the mc's -- one is a non-selectable dynamic text box (a label) which is set by the code, the other is selectable input text that the user can amend.

Finger cursor disappears when user hovers over the section of the mc that contains the text fields (even non-selectable text??) When the user trys to drag the mc by inadvertantly click-dragging anywhere within both text areas it causes this error: TypeError: Error #1034: Type Coercion failed: cannot convert flash.text::TextField@2374a381 to flash.display. MovieClip (same error appears for both text boxes)

The input text box may confuse the user - how do they sometimes click to drag and sometimes click to amend? I need to create an overlay area within the mc that is click-detected for the drag? Here's the relevant bits of code:

var itemArray:Array = [
{iname:"police",ititle:"POLICE OFFICER"},
{iname:"insurance_assessor",ititle:"INSURANCE ASSESSOR"},[code].............

View 1 Replies

ActionScript 3.0 :: Tab Indexing Loop Through Parent, External Child Swf, Back To Parent?

Nov 11, 2009

I have a parent swf which loads many child swfs (though only one is displayed at a time). My intention was to use the loaded SWFs document class to retrieve an array of objects to be assigned a tab index, combine this with the parent's own array of objects and apply sequential tab indices to them all. But what happens is actually that the parent's objects are assigned an index, but the external swf is unaffected. In fact, the external swf retains its automatic tab indexing, when I would expect that having set a value for InteractiveObject.tabIndex, automatic tab indexing would be disabled.

I've seen similar tales elsewhere. Most posts I've read are wanting to load an external swf, give it focus and loop through those objects, then close the swf and return to looping through the parent. However I would like loop through all objects as one. including manipulating the focus manager(s), and basically fiddling with every tab-related property I know.

View 2 Replies

Actionscript 3.0 :: Parent.parent.movieClip.visible = False; - How The Heck Do Climb The Ladder Then Go Back Down Again Into Another Clip

Dec 10, 2009

I've struggled with this for a long time and have thrown in the towel. How the heck do you climb the ladder, then go back down again into another clip?

View 2 Replies

ActionScript 3.0 :: No Longer Can Reference Preloader In The Parent Swf (extract From The Parent Swf)

Jun 2, 2011

I have been using:

yourbutton.addEventListener(MouseEvent.CLICK,f);
function f(e:Event):void{
Loader(this.parent).load(new URLRequest("newswf.swf"));
}

which was suggested to me in a different post to target the parent loader class, however i now no longer can reference my preloader in the parent swf (extract from the parent swf):

[Code]...

View 5 Replies

ActionScript 3.0 :: SetChildIndex And SwapChildren - On Mouse Over Set The Parent Of The Moused Over Text Field To The Highest Depth Child Of Its Parent

Sep 29, 2011

trying to on mouse over set the parent of the moused over text field to the highest depth child of its parent i tried both of these: [code] private function

[Code]...

View 3 Replies

Actionscript 3 :: Assign A Parent's Variable From The Parent's Child?

Nov 7, 2011

i want to pass the variable from parent to child .How Can i pass the Variable.Here i paste my code.

My Parent Class

public class PlayerStrobe_domaincheck extends Sprite
{
private var myService:NetConnection = new NetConnection();
private var _loader:Loader;

[Code]....

View 3 Replies

ActionScript 1/2 :: Reference Parent Without Using Parent Or Root?

Mar 16, 2010

I cannot use the following in my ActionScript due to conflicts with the host application:

_level0
_root
_parent references

On a pop-up box I have a close button with an absolute reference: closeBtn.onRelease = function{ unloadMovie("_level0.Page_1.holderBox");} Is there another way to make this work without using _level0 or _parent? I've read that it is possible to use a global variable on the main timeline and ref that, but cannot get that to work.

View 7 Replies

Actionscript 3 :: Flash - Child Within Parent Within Parent?

Aug 24, 2010

I am trying to make a calculator where a user can select from a list of items. If a user clicks say "ITEM1", it should add the item to a "CONTAINER_MC". The problem i have is all my data is set inside an array containing names and prices like the code below.

[Code]...

View 1 Replies

Flash - Drag Child Mc Out Of Parent Mc And Add To New Parent Mc?

Oct 6, 2010

Here is a working script to drag drop a ball from the stage into another target mc:

ball.addEventListener(MouseEvent.MOUSE_DOWN, pickUp);
stage.addEventListener(MouseEvent.MOUSE_UP, dropIt);
function pickUp(event:MouseEvent):void{ [code]...

It works well but I'm new to AS3 and I am having difficulty amending this script to drag the ball out of a parent mc (instead of the stage) and onto another mc (the target mc). To explain: imagine a ball, a box, a tri, + more shapes all within a scrolling mc (initial parent), the user scrolls to select a shape, then drag-drops onto a target mc on the stage.The scrolling is no problem, but how would you amend the script above so that the ball can start inside a parent mc rather than on the stage itself?

View 2 Replies







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