ActionScript 3.0 :: Different Ways To Unload Child?
Oct 14, 2010
I have a stage w/ 6 buttons that call movie clips. works to remove them when the "next" button is clicked. Now I need to have an additional option of clicking outside the buttons "on the backround" to remove the movie clips also.
PHP Code:
var fadeInstance:DisplayObject = null;
function openFade(fade:MovieClip, y:Number):void{
[code].....
View 4 Replies
Similar Posts:
Jun 26, 2009
Im trying to solve this, it should be quite simple but yet I can't get it to work! I have an index.swf that has a container which holds the entire flash site. I want to unload and load the various sections (different swf files) by clicking buttons thar are WITHIN THE CHILD.
[Code]...
View 2 Replies
Nov 14, 2009
I have a parent SWF into which I load a child SWF. I want to have a close button in the Child SWF (not the parent!) which closes/unloads it from the parent swf. Been looking all over but can't find any solutions that work.Here's my code for loading the child SWF from the parent's timeline:
var myrequest:URLRequest=new URLRequest("child.swf");
var myloader:Loader = new Loader();
myloader.load(myrequest);[code]...
What should I put in the child SWF to unload itself?
View 11 Replies
Nov 14, 2009
Experience: I'm a newbie to AS3 - making the transition from AS2. Problem: I have a parent SWF into which I load a child SWF. I want to have a close button in the Child SWF (not the parent!) which closes/unloads it from the parent swf. Been looking all over but can't find any solutions that work. Here's my code for loading the child SWF from the parent's timeline:
var myrequest:URLRequest=new URLRequest("child.swf");
var myloader:Loader = new Loader();
myloader.load(myrequest);
myloader.contentLoaderInfo.addEventListener(Event. COMPLETE, movieLoaded);
[Code]...
What should I put in the child SWF to unload itself? Apologies if this presumably simple task has been covered, please point me to the thread.
View 5 Replies
Jan 29, 2010
I have one page in my Flash site that has photo thumbnails that load external swfs. The code works OK, but when I use
Code:
removeChild(loader);
in my button functions for other pages, I'm getting the output error:ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.at flash.display:isplayObjectContainer/removeChild()
at the_fla::MainTimeline/homeClick() Is there a way to fix the error?
View 6 Replies
Nov 25, 2009
I have a button that loads an external movie onto the stage:
Code:
magnalock.addEventListener(MouseEvent.CLICK, magnalock_newvid);
function magnalock_newvid(event:MouseEvent) {
trace("you clicked me");
[Code]....
View 3 Replies
Jan 5, 2011
Parent swf has a button to load Child swf and Child swf has a button to unload itself through a dispatchEvent. Both in respective document classes. Parent loads Child fine... Child can't remove itself! Anyone have an idea what I am doing wrong here? Or another way to go about this? Struggling for a day now...
Parent swf:
public var myLoader:Loader;
loadButton.addEventListener(MouseEvent.CLICK, loadSWF)
public function loadSWF(e:MouseEvent):void {
[Code]....
View 2 Replies
Nov 4, 2009
I have a drop down box that is loading in different movies when selected. But when I select the second option in the drop down box, the movie gets loaded on top of the next movie. I saw that there is a removeChild(), but i'm having trouble finding where to apply it in the code below? If I put it in the function, it creates errors of course.[cod]e....
View 3 Replies
Nov 6, 2010
Using AS3. I have in my code a button to stop and remove the swf, but I would like to have in addition to unload a child swf when it plays it's last frame automatically - not using a button.
Here is my code on the main timeline:
var loader:Loader;
var closer:close;
norton_btn.addEventListener(MouseEvent.CLICK, NortonDemo);
function NortonDemo(e:MouseEvent):void {
[Code] .....
Now, what do I need to add or change to this code and add to the code on the last frame of NortonDemo to accomplish what I want to do?
View 1 Replies
May 12, 2010
I don't know AS2 well, prefering 3.0, however the project should be in 2.0. So, I have 2 movieclips, one is parent, another - loaded through LoadMovie("name.swf", _root);I need to unload child after its played and stoped. How can I do it in most proper way?
View 1 Replies
Oct 5, 2011
I'm loading a movie in externally. The external movie has a button to unload itself from the main movie. It loads into _root.calContainer. The button is called xButton. This is the script that's not working:
_this.xButton.onRelease = function() {
_global.calContainer.unloadMovie;
}
I've also tried. _root.calContainer to no avail.
View 1 Replies
Sep 7, 2007
I am attempting to build a site using load movie commands. I have a navigation movie with 4 buttons, on the press of each button I uesd this script.
[code]...
this loads an animation and plays into the news reader. on the press of a button to go back I have loaded a seperate back animation using this script
[code]...
The problem I now have is I want to remove this clip at the end of the animation and return to the root navigation.
View 1 Replies
Sep 16, 2010
I have a flash page where I am loading another .swf into. With a button in the loaded swf I need to unload the loaded swf (where the button is) and navigate to a specific frame label in the parent .swf. I've tried to do the following in the key frame where the swf get loaded into I've put the following:
var gallery_load_wonderland:Loader = new Loader();
gallery_load_wonderland.contentLoaderInfo.addEventListener(ProgressEve nt.PROGRESS, loop_wonderland);
gallery_load_wonderland.contentLoaderInfo.addEventListener(Event.COMPL ETE, done_wonderland);
gallery_load_wonderland.load(new URLRequest("gallery_wonderland.swf"));
function loop_wonderland(e:ProgressEvent):void {
[Code] .....
I basically want to first load the swf called "gallery_wonderland.swf". Then in the "gallery_wonderland.swf" there's a button called "contact03_btn" which I want to unload "gallery_wonderland.swf" even though it's inside the swf and navigate to the frame label called "Contact" in the parent swf.
What can I do I've done similar before and it works, but when I do it know and I click the contact03_btn it comes with following error message:
TypeError: Error #1034: Type Coercion failed: cannot convert flash.display::Stage@26215ba1 to flash.display.MovieClip.
at gallery_wonderland_fla::MainTimeline/back_wonderland()[gallery_wonder land_fla.MainTimeline::frame1:227]
View 13 Replies
Jun 19, 2011
If you haven't met me yet, that's because I'm pretty new around here. I picked up ActionScript just earlier this week, actually. Name's Kate. Nice to meet you. All righty. I'll start by saying that I've been referencing this thread:
actionscript.org/forums/showthread.php3?t=222486
(I'm not allowed to post URLs until I've got at least 50 posts in?! Gasp.)
View 2 Replies
Oct 16, 2011
i successfully managed to work out the loader script, and load a external swf file into my current project. Now that its working and all is well, i realised that only way to get back to 'main menu' was to close the whole thing. I tried to sort it out with a simple 'back' button but no success there. As mentioned in the title thats the options i found so far but cant seem to quite understand them tbh. I just want it to work so that I easily can manouvre back to 'main menu'.
View 2 Replies
Jul 30, 2010
I am loading external swf's into a main load.swf, using a Moviecliploader object. What I basically want to do is that, after an external movie, say home.swf, loads another external swf, say about.swf, home.swf should be unloaded.
home.swf is loading about.swf into the _root.mc_holder, which is placed inside load.swf. I want all external files to be placed within this holder. Now this is working with some files, but not with others. My standard code within all files is this:
//code within home.swf to load about.swf
var loader:MovieClipLoader = new MovieClipLoader();var ldrlistener = new Object();loader.addListener(ldrlistener);ldrlistener.onLoadStart =
[Code]......
View 3 Replies
Feb 12, 2009
I Have 3 Movies:MAIN.SWF, contains loading movie actions for Nav.swf and Home.swf.NAV.SWF, contains navagation menu loaded on Level 2 in Main HOME.SWF, contains slideshow for home page loaded on Level 1 in Main In NAV.SWF, there is a MOVIE CLIP "graphmc", which contains a BUTTON "graphicbtn", When this button is clicked, I'd like the HOME.SWF (which is loaded into Main.swf on Level 1) to fade out and unload, and load and fade in Graphics.SWF in place of it.
View 6 Replies
May 3, 2009
I'm working on a small piece that involves a movieclip that scrolls slowly from the beginning on enterframe, but when a button is clicked it goes directly to a certain point on the x axis.
The first piece of it is here:[URL]..You'll see it's kind of wack right now, bc I can't figure this one issue out...
For the buttons I have this bit of code: (Where photo_mc is the movie clip i'm moving)
[Code]...
View 1 Replies
Jun 16, 2003
I want the current swf to unload and the new one to load only after a transition occurs. Is there a more efficient way to do this than if. switch()?
View 2 Replies
Aug 9, 2008
I am working on a school project that requires me to load external .swf or .jpg files. I currently have all of the buttons working and are loading an external .swf file on to the screen. The problem I am having is that when I go from one button to the next the loaded .swf stays on the screen and the next .swf gets loaded on top of it. I know that I need to unload the file but I am not sure where to put the code for the unload or what code exactly to use. I would like when the button is pressed to unload the previous loaded .swf and load the new .swf without having a separate button to unload.
[Code]...
View 3 Replies
Aug 9, 2009
I am in a process of creating a preloader for my new website and i am stuck now since my preloader goes both ways instead from left to right.
The code i am using is:
[Code]....
View 2 Replies
May 27, 2009
I'm trying to make an animation possible to play in two different ways. The first one is to play animation from beginning to end without stopping The second one is an interactive way - something like slideshow made in powerpoint. My idea was to use gotoAndPlay() function with stop() function. It doesn't work the way as I expect. For instance - I've one animation made of 500 frames. It makes up some 10 slides. If I put after every 50 frames stop() function then it's impossible to play this animation from beginning to end without stopping because of stop(). How to handle this? It would be nice if there was a function to indicate to play between some frames. For example, start playing from 1 until 50, then stop. Then start playing from 52 until 100 and stop .... then from 450 to 500. Besides that from 1 to 500.
View 2 Replies
Sep 28, 2009
I have a 3D animation that is rendered to bmp frames.I have inserted the animations into a Flash doc.After editing, my final Flash movie/file is 20MB.what are the best ways of reducing or compressing the file size down to a resonable "web-ready" level? Around 8MB or lower
View 2 Replies
Oct 31, 2009
How to load images in as3:Load them all at once, for example like this (pseudo as3 code):
for each (var url:String in images){
loader.load(url);
}
[code].....
View 2 Replies
Jun 8, 2005
This should be very simple: I want to fade-in a Movieclip (called MC1) using Actionscript.I normally use this (and it works just fine):
[AS]
this.MC1._alpha = 0;
this.MC1.onEnterFrame = function()
{
[code]....
Well, even though I can see the alpha values decreasing step by step (throughout the "trace" instruction), the fact is that the MC does not fade-in at all, it's just starts at a 100% alpha value.How comes this illogical behaviour? The instruction "trace" shows what it should do, but Flash does not fade it in.
View 3 Replies
Jun 25, 2010
I work for the NPS, and they have an outdated CMS. I have no rights to upload an .html file, or edit one that the CMS makes. SO, I am forced to use their little deal to display my .swf files. url...I made an eHike in as3 Flash CS4. It has two scenes, the first scene is the preload, second is splash content and ehike content. The problem is I cant get the preloader to display in IE. I have all actionscript content exported to the second frame, as talked about here:[code]I have tried many different ways to load the preloader.there is a simple text field for the percentage, and a simple 100 frame animation. preloader_mc.[code]The CMS lets you decide in the popup window if it is resizeable or not. This works in IE (stopping people from resizing), but not in firefox, people can resize it. Is there any way to disable the resize in AS3? Again, I understand that your supposed to export the .html file with these settings, but I have no permissions to upload or create new .html files.
View 1 Replies
Jul 23, 2009
I'm trying to unload an external SWF on _root to load a new one instead. I've tried (almost) everything but can't figure it out... I get this error : "Error #1010: A term is undefined and has no properties."
[Code]....
View 3 Replies
Jul 30, 2010
I have a 30 second long animation (18fps). Movie symbol 135 frames long which loop 4 times using countTextField/if/else etc. and then gotoAndStop on a static frame. According to the company that are posting it on their site, the animation doesn't stop.
Are there any other ways of completely stopping an animation?
View 1 Replies
Feb 9, 2011
I'm working on a big app. I need to enable back native keyboard shortcuts(e.g. CTRL+T opens new tab). e.isDefaultPrevented() called in handler returns false, but still when I press CRTL+T new tab is not opened. Is there some other way to disable keyboard shortcuts except e.preventDefault()?
View 1 Replies
Jun 29, 2011
One thing i've learned in VBA, is there are multiple ways to skin a cat in Excel. I want this:
Only, I'm rather frustrated with trying to convert my AS1 coded template into the AS3 for the day. So I'm guessing I can't use the UiLoader like in the video unless i'm missing some checkbox somewhere.
Any one now how to do the similar thing only using AS1 and in "for dummies" language please?
So far this community rocks with the feedback and help. I'm sure some genious knows.
View 2 Replies