ActionScript 2.0 :: Close Loaded Swf By Clicking On It?
Oct 6, 2003
I have a gallery where I'm loading jpgs that are in swfs...into my current scene. These are made into buttons. So I want to know how to close the loaded swf by clicking on it?
Any suitable script that will close the browser on clicking a swf quit button as the fscommand below does not work. close_btn.onRelease = function(){ fscommand("quit"); } This is for a Moodle application where the swf is opened in a new browser window and it would be cool to close it with the swf quit button.
I am trying to capture the event; which is invoked when we close the AIR window by clicking its Close button (on the top-right corner). I have tried the following; but none of them seems invoked:
I'm using the sample external preloader file supplied with CS5 as the basis for my customised pre-loader. It's working fine except that once the main site has loaded and is open, the preloader remains loaded in the background.[code]...
Can a loaded movie unload itself, I've tried but nothing positive. This is the thing, I have a section that I loaded, and I want a close button in that loaded movie, not in the actual main movie.
My problems comes in when you have to open a different image album and have to eliminate all the previously loaded children in the movieclip. When i load a new album i used a code you posted here: AS3 How to remove previous loadersbut the problem is that sometimes the user leaves the album page before ALL the pics laod so when they click on a new album to open it a new image is placed somewhere else cause the loader has already been launched. I've tryd to close() the loader but it doesn't seem to work.Here you can see the working site to see what im talking abouy you have to click on an album, leave before all the pictures load and open up another one.
getImage(dataList[0].file) function getImage(href:String):void { var loader:Loader = new Loader();
This is the code i used in a gallery that loads images sequentally. My problems comes in when you have to open a different image album and have to eliminate all the previously loaded children in the movieclip. The problem is that sometimes the user leaves the album page before ALL the pics laod so when they click on a new album to open it a new image is placed somewhere else cause the loader has already been launched. I've tryd to close() the loader but it doesn't seem to work. Here you can see the working site www.barbarabritvin.com (to see what im talking about you have to click on an album, leave before all the pictures load and open up another one.
getImage(dataList[0].file) function getImage(href:String):void { var loader:Loader = new Loader(); loader.contentLoaderInfo.addEventListener(Event.CO MPLETE, imageReady);
I managed to load in an external swf file okay however, I need to be able to remove it when the user clicks a link to go back to the homepage. Below is my code: Code: Select allstop(); var imageRequest:URLRequest = new URLRequest("gallery.swf"); var imageLoader:Loader = new Loader(); imageLoader.load(imageRequest); addChild(imageLoader); home_link_btn.addEventListener(MouseEvent.CLICK, homeLink); [Code] ..... I assumed it was as simple as removing the child but it still remains. I get no compile errors or anything.
The page is loaded fine.But when I click the links I found sometimes there was no any response while I need a new explore window opened with the linking url.And also I tried:
I have drawn intersecting lines. The user can click on a region inside the angle formed by the two lines.When the user clicks inside the area, the small region formed by the arc between the two lines showing the angle should change. How can I do that.the region between the intersecting lines is sprite object to dispatch event listener, but the arc is shape object.
[URL]I have: main.swf (a menu) and I have module.swf (content)If you navigate to Subsea Wellhead Systems/SS-15 BigBore II and click on that I have it load an external swf which covers most of the parent. So far so good. My problem is unloading the loaded 'Child' swf with the button provided on the loaded 'Child' swf.below is the code I used to load the file but I cant, for the life of me, find a way to unload it.
var bigboreLoader:Loader = new Loader();btnbb2.addEventListener(MouseEvent.MOUSE_UP, bigborecontent); function bigborecontent(event:MouseEvent):void{var bigboreRequest:URLRequest = new URLRequest("moduletemplate.swf"); bigboreLoader.load(bigboreRequest); stage.addChild(bigboreLoader);
I am certain it requires the Child to communicate with the parent somehow but I am at a loss. If I could get a bit of advice or a link to something deal with this, it would be a big help. I just need to have my links load my modules and the remove them when the close buttong is hit on the loaded swf. I promise I have done searches and I admit I have found asnwers but still they are not working. I found the code below:
Main FLA: function removeF() { removeChild(bigboreLoader); }
What i am trying to do is..i am loading one swf into my current swf. The loaded swf has a close button like we have in windows. i have applied fscommand(quit) to the loaded swf. BUT when i am clicking the close button the whole application is getting closed. i want the swf to quit ONLY and not the whole application.
*let say i have a mc called A. it can call a MC with an instance name called window_btn.window can be drag and double click.i want to put a close button in the window MC to close the window.
I opened from my main swf a new one with addChild. Now in the 2nd swf i need a button to close this swf and open another one ... I done this way because the button i puted in the main swf does n´t work (maybe because i´m using in both swf liquid layout with a resize function). How can i do to close the 2nd swf and open another one.
Does anyone know the syntax for closing a swf window using a button, similar to closing a popup window? I am creating a small game, and am giving the user the option to "play again" or "quit" at the end of the game, so i want the quit button(standard library on(press)) to close the swf file.
I have a picture with an invisible button, once clicked on the button runs a movieclip with an instance - box1, once its opened a close button appeared, called closeBtn1 and the idea is when thats clicked, for box1 to gotoAndPlay frame 80, but no matter where I put the code it doesnt seem to let the closeBtn work! Even trace actions aren't getting recognised![code]as u can see I'm trying to trace even if the closeBtn gets rolled over but to no avail.I have also tried it from scene level and still no joy.
I have a bug in my Flash cs3. After I close the program, it is still running.What I mean is, if I check task manager (Ctrl, Alt, del) Flash.exe is still running. Also, I can no longer re-open Flash unless I end the process in task manager first.
I am trying to follow the exercises in the "Classroom In A Book" for Flash CS4 and I am having problems already on exercise 2. the problem is that I can not close the shape, whilst using the pen tool and anchor points. I have tried to make the anchor points extend further than the stage and then clicking on the first anchor point as the book suggests, however, a new line is drawn through the stage, to the first and last anchor point. The problem is I can not add the fill colour.
I'm currently working with a flash movie that opens up an IE browser to an external link.Since I'm working with a presentation that plays automatically after a few seconds and keeps loading new IE browsers with different links, I was wondering if there was a way with AS2, i can have flash close the IE window it opened?
I'm trying to close my swf after pressing a button. i've tried a few thing nothing seemed to work.The last thing i read was i had to use a javascript file for it.
Is this even possible? What I want to happen is I want people to click "watch video" and it makes a pop-up with the Flash video player in it. Within that video player I have a "close" button.Is it possible to click that close button and close the whole pop-up?
I'm banging my head on this one...basically I have a menu and when I click a 'view video' button, the Flash goes to frame 2 where the video component is displayed. I want to have a CLOSE button on top of the video.The Flash goes to fullscreen nicely with this code:stage.displayState = StageDisplayState.FULL_SCREEN;But...I want to have a close button on top of the video! So, I tried this:video.fullScreenTakeOver = false;This works (I see the close button) but then the video reverts back to its original size.After making fullScreenTakeOver=false, I have also tried making the video width equal to the stage width but I can't seem to get the fullscreen stage width.I have also tried adding the CLOSE button as a child AND THEN making video.fullScreenTakeOver = false but that didn't work either
I have a notepad, if I click open, this notepad will show on the stage. But the thing is it uses flash animation to show on the stage. It does not use stage.addChild(). Now I want to put a close button on this notepad, if I click "close" button, it will close. I try stage.removeChild(), does not work,because it is not "really" on the stage.