ActionScript 2.0 :: Possible To Unload A Clip From Within Itself?

Jun 18, 2008

I have a main movie which loads sections into an empty container MC from external SWFs. Each SWF contains a close button to close the section—but I can't get it to work. I am stuck. Anyone know which method to use in this case?This does not work:

Code:

// closeBox is just an MC sitting inside a section SWF
closeBox.onRelease = function():Void
{
removeMovieClip(this._parent);
};

I should add that the SWF gets loaded into the container in the main movie using MovieClipLoader upon release of a menu button.

View 2 Replies


Similar Posts:


ActionScript 2.0 :: Unload Clip With A Button In The Loaded Clip

Jan 1, 2008

So I want to Unload a clip with a button placed in the loaded clip.

First I have this code for my preloader and movieclip loader:

var mcl:MovieClipLoader = new MovieClipLoader();
var mclL:Object = new Object();
mclL.onLoadProgress = function(target,loaded,total) {

[Code].....

View 1 Replies

ActionScript 2.0 :: Can't Unload Movie Clip

Feb 15, 2005

I have xml which is loaded in a movie clip but i can't seem to be able to unload that movie clip when i need to. I tried everything and the code seems right. I'm guessing it's because of some kinda path issue. Maybe someone else might see something i'm missing.

This is the code i am using to load the xml in the movie clip:

Code:
var r = _root;
r.clipArr = new Array();
r.menuXml = new XML();

[Code].....

Here is the file that i am working on. Just download it from my server and take a look:

[URL]

View 2 Replies

ActionScript 3.0 :: IF Certain MC Exists Then Unload Movie Clip

Oct 4, 2009

This is my script:

[Code]...

Basically it loads a mc when the web starts and when i press buttns it unloads previous mc and loads a next one BUT, it gives me an error when i press the gigs buttn, when contact clip was not loaded before How can i tell that IF certain MC exists, then unload it and load next one, and if not, just unload the other one. Or is there other way to do it? Here is the error i get:

[Code]...

View 2 Replies

ActionScript 3.0 :: Load And Unload Movie Clip?

Jan 14, 2009

trying to build a web site using cs3 flash...

I have so far managed quiet well up until I load in frame 1 my movie clip of the intro logo animantion.

I can load it and get it to play in frame 1 but then need it to stop (which it does)... my problem code area is then I need it to unload so that I can see frame 2 and see the web sites navigation...

the code to load the external movie clip is:

ActionScript Code:
var myLoader:Loader = new Loader();
addChild(myLoader);

[Code]....

View 3 Replies

ActionScript 2.0 :: Unload A Movie Clip Container

Jan 12, 2012

I cant figure out how to unload a movie clip. I thought i knew how, but its not working and i've tried everything i can think of.I'm loading an external swf like this:[code]This works fine. It loads an external swf that plays a youtube video. However, whenever i click on my navigation buttons to go to another page (basically another movieclip in teh _root level, it does not unload the youtube player and it keeps playing. Further more, if i go back to that page, the youtube player loads again and starts repeating itself.I thought by adding the following code to all my navigational buttons, the youtube player would unload, but it doesn't:[code]

View 2 Replies

ActionScript 2.0 :: Unload Some Images From A Movie Clip?

Jul 14, 2009

I have a problem trying to unload some images from a movie clip ,What i have is a movie clip called " thumbnails" on the stage which loads some images from an array . the movieclip "thumbnails" , holds at the begining the first 4 images , then i have a button called "next_btn" which loads the next 4 images .basically when the next_btn is click it is loading the next 4 images which place them on top of the first ones , and is fine , but what i need to do is to clear the movie clip before loads the next images into.i have tried the unloadMovie method and it is not working , place the code below if anyone has any ideeas what i'm doing wrong ( actionscrip2 )

Code:
function LoadImages(startNo,end)
{
//thumbLoader.removeMovieClip();
//thumbLoader.unloadMovie(thumbnails);
// thumbnails.unloadMovie();

[code]....

was trying all 3 commented options from above , and none of them does what i want the first 2 are removing only the last image from the movieclip and the last one removes the all movieclip and is not loading anything else after

View 1 Replies

ActionScript 3.0 :: Play Then UnLoad And Load New Clip?

Oct 9, 2009

Code:
aboutBtn.addEventListener(MouseEvent.CLICK, aboutLoad);
function aboutLoad(e:MouseEvent):void {
ldr.source = "about.swf";
}

I am using the Ul Loder in Flash to load the pages of my website when the buttons are clicked. When my page loads it animates for a bit and I am also wanting it to animate befor it unloads. How do I tell it that on click of say 'home' it should play frame 6 of about.swf then when it's finished playing ulLoad about.swf and load home.swf?

View 2 Replies

ActionScript 3.0 :: Unload/remove A Clip Loaded From The Library?

Mar 4, 2009

i have created a colour picker that loads movieclips from the library onto the stage.however i need to create a "start over" button that will remove all these added clips.my code is as follows:

Code:
startover.addEventListener(MouseEvent.CLICK, removeallFunction);
function removeallFunction (event:MouseEvent):void

[code].....

View 3 Replies

ActionScript 2.0 :: Unload The Movie Clip - Show In One Scene

Dec 15, 2003

I am trying to figure out what as i need to unload my movie clip. Here is the AS i used:

[Code]....

is I only want it to show in one scene and it is covering everything on the other scenes as well or "Pages".

View 5 Replies

ActionScript 3.0 :: Unload An Attached MovieClip By A Click In The Movie Clip Itself

Jan 7, 2011

I have an AS3 project (publishing to FP10) where I load a custom made window from the main movie. The custom made window is saved in the Library and has a close button (called exitinteraction_btn).
 
I manage to load the window from the main movie with the following:

var WinA = new windowa();    addChild(WinA);    var myTween:Tween = new Tween(WinA, "x", Elastic.easeIn, 175, 175, 5, true);    var myTween:Tween = new Tween(WinA, "y", Strong.easeIn, 175, 175, 5, true);
 
This is the code in my custom window (which I cannot manage to close and have it remove itself from the main movie when clicked):
  
exitinteraction_btn.addEventListener(MouseEvent.CLICK, closeI);
function closeI(e:Event):void{   this.unloadAndStop();
}
  
I get the following error:
 
TypeError: Error #1006: unloadAndStop is not a function.    at windowa/heyb()

View 5 Replies

ActionScript 2.0 :: Can't Stop Imported YouTube Video, Even If Unload The Movie Clip Containing It

Jan 6, 2010

I am importing a youtube video to a new movie clip using this script:

Code:
function containYoutube(youtubevar, depthLevel) {
this.createEmptyMovieClip("youtubecontainer",depthLevel);
this.youtubecontainer.loadMovie("http://www.youtube.com/v/"+youtubevar);

[Code].....

I need to be able to unload it if the user jumps to another part of the timeline. I have tried to just unload the movieclip, but it still seems that youtube is streaming data to the swf. If I do it locally, it crashes the application. If I put it on the server, it makes it clear that youtube is still loading even though the movie clip has been unloaded.

View 5 Replies

ActionScript 2.0 :: Unload A Movie Clip As The Play Head Jumps To Another Frame?

Jun 27, 2007

The movie clip is called "theScene" and I have it created on Frame 60 of a movie clip when a button triggers the playhead to jump and stop at Frame 60. However, upon leaving that frame, it will not disappear, so I want to unload it upon leaving that frame.I put in the following code across all frames of the movie clip in its own layer:

Code:
if (this._currentframe !=60)
{

[code]....

View 3 Replies

ActionScript 2.0 :: Load A Movie Clip SYMBOL At The Highest Level And Then Unload It?

Jan 15, 2008

how do i load a movie clip SYMBOL at the highest level and then unload it.

i dont want a SFW or JPG to be loaded- that would be one of the symbols from the same swf file.

the issue is- i have used "getNextHighestDepth()" to create movie clips.. now i need to add a box on top of that- so again, i will have to use "getNextHighestDepth()" - which im having hard time to unload (when i use duplicateMovieClip) -

View 5 Replies

ActionScript 2.0 :: Unload Movie Stuff - Current Swf To Unload And The New One To Load Only After A Transition Occurs

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

ActionScript 3.0 :: Unload The Previous Loaded .swf And Load The New .swf Without Having A Separate Button To Unload

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

ActionScript 3.0 :: Unload Not Unloading - Unload An External SWF On _root To Load A New One Instead

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

Unload Flv When Completed?

Mar 5, 2009

I have an swf, lets call it 1.swf, that has a button that calls another swf to level one. In that second swf, lets call it whatever.swf, on layer 1 it has an flv file of about 40 seconds. on layer two it has a button that has this action:

on (release) {
unloadMovie(1);
loadMovie("../swf/1.swf", 1);
}

So if that button is pushed, then it unloads whatever.swf as I need it to.

the problem is that if that button is not pressed, then when that 40 second flv finishes, it just sits there with a black stage and the button. What i need it to do is that when that 40 second flv is finished, it automatically unloads whatever.swf on level 1, again showing 1.swf on level 0.

Also, before anyone anwers, the way i did the flv is that in whatever.swf the flv was imported to the stage, i slected the "already deployed" put in the URL and then it created a flash video component which is on the stage.

View 3 Replies

AS3 :: Flash - How To Unload A Swf

Nov 16, 2009

how I can do to unload a swf before I load the next one?

var mLoader:Loader = new Loader();
function loadSWF(e:Event):void {
var imageId:Array = e.target.name.split("_");
var targetId:int = imageId[0];

[code]....

View 3 Replies

ActionScript 3.0 :: Unload My Old Swf?

Jul 9, 2009

I am trying to add a external Swf files to my home page because my other pages are swf files. when i click other page it will call to my swf file. but my current home swf file running under my new page swf... so how can i unload my old swf.

View 2 Replies

ActionScript 3.0 :: Unload Swf From Itself?

Nov 16, 2009

I'm using AS3 to load one swf (a document viewer) into the main swf. the loaded swf takes up the entire stage, so I need the unload button to be in the loaded swf.

is there an AS3 equivalent to this.unload?

View 5 Replies

ActionScript 3.0 :: Way To Unload SWF

Jul 29, 2011

I have an AIR application which load/unload external AS2 SWF files. My problem is that when SWF is unloaded its Enterframe events keeps runing.

View 1 Replies

ActionScript 2.0 :: Unload Mc Within Itself?

Dec 16, 2004

I have a random number of sprites that are created, each of them hurts the other when the collide, and when they die, I wanted the collisions to not do anything anymore.

I can fade the sprites out to make them invisible when their "health" reaches 0, but they are still there, and when they collide, they cause "ghost deaths" to other mcs. How can I get rid of a sprite from within itself? Or at least disable its onEnterFrame function?

View 1 Replies

IDE :: Unload External Swf?

Apr 12, 2009

My index page has two buttons... 'about' and 'portfolio' which loads each respective external swf into a holder.When 'portfolio' is loaded there are another 8 buttons which again load 8 external swfs into a holder in the portfolio.swf. Each of the 8 external swf files load fine, but is there anyway to have a back button instead in each of the 8 external swf to go back to the portfolio.swf without having to click the 'portfolio' button?i have tried _root.unloadMovie.... but it just clears the stuff on my index page and loads the portfolio.swf

View 1 Replies

ActionScript 3.0 :: How To Unload SWF

Jul 11, 2011

I have three swf files that I want to load then unload in a specific order. An Intro swf, the main movie swf then the Exit swf. I can get them to load with the following code;[code]the trouble is, each movie swf loads on top of the previous movie swf which then continues to display.I'm new to AS 3.0 but it seems like I need to unload the previous movie as the new movie loads. Can anyone show me the code I would need to use in order to get that to happen?

View 1 Replies

IDE :: Load And Unload SWF With FLV

Jul 13, 2009

I've got a SWF with two (for now) buttons on it that each load a SWF. Each of these will load fine if they are the first one pressed. Once one is pressed there are problems. If you try to go to the next one, the new SWF covers the one currently playing, but it will not load the FLV associated with it and the audio from the previous does not stop. You can see it all here: [URL]

And here is the code on the navigation:
var Xpos:Number = 130;
var Ypos:Number = 10;
var swf:MovieClip;
var loader:Loader = new Loader();
loader.x = Xpos;
[Code] .....

View 1 Replies

IDE :: How To Unload External Swf

Mar 18, 2010

i am trying to create a file where a mc hittest another object(using keyboard arrow) it loads an external swf and when keypress to leave the object, it will unload the external swf. my problem is the external swf did load but it wont unload. attached herewith my fla file for reference. script as below,

mcMain.stop();
var leftArrow:Boolean = false;
var rightArrow:Boolean = false;
var downArrow:Boolean = false;

[Code]......

View 1 Replies

ActionScript 3.0 :: How To Unload Xml

Jun 12, 2011

I create a flash as3 where my stage has 3 buttons home button2 and button3. when i click home button a thumbnail xml gallery will loaded. when button 2 and button3 clicked it loads some text from another xml file. All it's work well. My problem is after i clicked the home button the gallery loads then if i clicked the other buttons the gallery still displayed in the stage. The text from the other xml file will stack behind the gallery. How to solve this.This is my code:

import fl.transitions.Tween;
import fl.transitions.*;
import fl.transitions.easing.*;

[code].....

View 1 Replies

ActionScript 2.0 :: How To Unload Movieclip

Feb 10, 2009

I am making a file that loads an swf on(release) of a movieclip. I can get it to load into frame 2 and have created a button to return to frame 1. But when you go back to frame 1 the swf is still there. How can I get it to unload when it goes back to frame 1?[code]

View 3 Replies

Unload SWF Still Plays The .flv (audio)?

Jan 4, 2010

I have a captivate generated SWF file which has a .FLV inside it.In flash on click of a button I unload the movie(SWF), the video goes away but the .FLV still plays the audio.

View 2 Replies







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