IDE :: RemoveChild - Make The Close Button Work On Project?
Feb 3, 2010
trying to make the close button work on this homework project. This app scatters photos on the stage, randomly and at random angles. They are drag and droppable and the clicked photo comes to the fore. Each photo has a close button intended to remove the photo from the stage, this last is what won't work. I know its a common topic, but nothing I've tried has worked so far. onClickCloseBtn is the problem.
I'm using CS4/AS3 and am swapping out swf files in a single holder from different buttons. The problem is that the child isn't getting removed when switching from button to button.Here's my code:
var Xpos:Number=0; var Ypos:Number=150; var swf:MovieClip; var loader:Loader=new Loader();
Have been having difficulty with this issue of getting a close button to work within a mc popup box (it is doing my head in !) Basically I have a Button on the stage that launches a popup mc. To close this popup, I have a 'x' for the user to click on to close this box. I don't want the box to become 'invisible' or for the whole box to close when clicked on (I have tried both but not what i am after). It is important for user to be able to relaunch this box by clicking on the button after closing previously.
It would be great if anyone would be able to view the fla atatched and explain what needs to be included, and perhaps upload a working verison.
_root.attachMovie("biography", "biography", _root.mylogo.getDepth()-1, {_x:Stage.width/2, _y:Stage.height/2}); and within each i have a close button with:
if (!_root.biography) { _root.attachMovie("biography", "biography", _root.mylogo.getDepth()-1, {_x:Stage.width/2, _y:Stage.height/2}); }
to call the move again if there isnt already an instance of it but it only works the first time the movie was called, it wont work after i use the close button to unload the movie..
I have a project that was written using ACtionScript 3 in the Flash Builder Burrito preview IDE, with Adobe AIR 2.5 SDK. The way I was closing down the application was with....
stage.nativeWindow.close();
Now I've taken this same project and I'm using Adobe Flash Builder 4.5 for PHP with the Adobe AIR 2.6 SDK and I've turned it into an ActionScript Mobile Project and this line no longer works when running on an Android device because the nativeWindow never gets set, it's null. I've tried researching online how to replace this line of code and all I have been able to find is code for closing it down if I deploy it on iOS, which I'm not as of right now, or how to close it down if it's a projector project, or the stage.nativeWindow.close().
I am trying to make a sprite button with graphics and can't make it work. I have successfully added text fields so I know the path is correct. I suspected my code was correct and confirmed it should be, after reading several tutorials showing the process for creating sprite buttons with graphics. Anyway, I imported nearly every class on Earth, but certainly everything which needs to be. Stage is gray and 800x600.The graphics code by itself with appear, but not when linked to the sprite. Also, the sprite won't appear no matter what. Another interesting piece of the puzzle: nothing will trace, not even objects such as textfields which actually appear and function on the stage when I text the code.
public class ContactClass extends Sprite { public function ContactClass() { var home_btn:Sprite = new Sprite();[code]....
I write code like this ActionScript Code: function onTehranClick(e:MouseEvent):void { var mc1:History=new History(); var mc2:EnvironmentGeographycontent=new EnvironmentGeographycontent(); var mainSub:MovieClip=new MovieClip(); switch (e.currentTarget.name) { [Code] ..... Now my removeChild don't work what can i do?
i am trying to to do the following. I have 2 buttons on a page.when i click the first button it should just display the image i want it to.when i click the second button it should display the other image i want to display.
I have two buttons that add a movieclip to the stage, I tried to remove the movieclips everytime a button gets clicked with removeChild but it doesn't seem to work, looked all over for a solution, but I can't find it. Can somebody help me with this?Here's my code;
ActionScript Code: nav.zwembaden.addEventListener(MouseEvent.MOUSE_DOWN, zwembaden_MOUSEDOWN); function zwembaden_MOUSEDOWN(e:MouseEvent):void
I got some problem with a task. I Can't get removeChild work correctly.When u push i_golf three buttons appear (i_golf1, i_golf2, i_golf3) and each button is connected to a picture.
i_golf.addEventListener(MouseEvent.CLICK, visaGolf); function visaGolf(e:MouseEvent){ var v_golf_bild:MovieClip = new golftumbs();[code]....
I have 3 movieclips, and I want them to work like buttons. It's for a website, so they need to redirect the user to a URL.
The entire flash file has 7 layers, and one of these layers is called "AS3", and is ment for all my actionscript. So, i figured if I gave the MC's an instance name, then I could write the AS3 in the "AS3"-layer. But I can't seem to get any code to work.
I am trying to make the button to work. My button is located on the main timeline, but my action is placed inside the movie clip. So when the button on the main timeline is pressed I want flash to play frame labeled "enq" inside the movieclip. Makes any sense? The code i am using is:
I am trying to make a button work in a Flash cs4 file using as2. It is a template I am modifying from DreamTemplate. I don't know what I am supposed to change and exactly what I should change that unknown code to Here is the code I have:
[Code]...
As you can see I have tried to replace the url that was in the quotes and it does not work.
How do I make a button created in CS4 flash open another page in my website?
I created the button in flash cs4 with a static state and a pulsing state on "Over" and "down" that works fine. I tried adding the following action to the button>
on (press) {getURL("aboutus.html?include=contact","_self");}
but nothing happens when I view it in live view. and all the pages exsist in the file. (Using Dreamweaver CS4 to build webpages.)
Is it possible to make the browsers back button work inside a SWF but using just AS3 and not any other external files or anything else changed in the HTML page?
i am trying to to do the following. I have 2 buttons on a page.when i click the first button it should just display the image i want it to.when i click the second button it should display the other image i want to display.
I'm creating an Entry Page slideshow here with Flash Cs3 and AS2: [URL] I'd like to be able to click on the whole slideshow (or the "Enter Site" text) to go to another page on the site, which I'm calling "[URL]." I've read various tutorials all day and tried many things, but couldn't seem to apply any "on release" action to the "Enter Site" text that would work. I even created an invisible button (putting a keyframe on just the HIT state and deleting it from the UP state), named the instance "invbutton3", and then typed in this action on the first frame and inserted a keyframe at the end of the show:
This Message Used To Be Entitled:"Can't make music on/off button work for my movie built in CS5..."But after literally WEEKS of being on this forum (& desperately seeking the answer in numerous ways) do you mean to tell me there is ABSOLUTELY NO ONE ON THIS FORUM that knows how to make a music/sound button work correctly? [code]Perhaps it's a simple adjustment,.
I have a photographer's portfolio site in the works. I'm using loadMovie connected to thumbail buttons of each photo to show a larger version of the photo. Here is the script[code]...
Now the photographer would also like to have a next/previous arrow buttons so the user can click through like a slide show. Is there a way to have Flash know what movie is currently loaded and based on that information go to the next or previous?