Unloading A Movieclip Loaded In As2
Hi guys...First of all I meant to say unloading an "external SWF" in the title sorry
I've just loaded an external xml driven gallery.swf in my flash site using the following script:
createEmptyMovieClip("anim", 0); anim.loadMovie("gallery.swf");
I've pasted this code straight into a frame in one of my movieclips. So when i press a button inside this movieclip (this mc is a submenu where the link to gallery is displayed) it loads the gallery and it seems to work.
My problem is that I cannot get it to unload ive tried unloadmovie function but i must not be pasting the code in the right place or am having problems defining the path (_root / _level0) ?? i dunnno.....help please????
many thanks in advance!
ActionScript.org Forums > ActionScript Forums Group > ActionScript 2.0
Posted on: 11-06-2008, 10:41 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
[MX04] Fade Out Loaded Movieclip Before Unloading It
Hi, i would like to know how to fade out a loaded movieclip (loaded into "mc_holder") before unloading it and then loading a new different clip into the "mc_holder." I would like to do this using a button. Can anyone help me out here?
Unloading What's Been Loaded
I have used the following code to load a .swf into my main movie:
loadMovie("-","-")
with a target location command
This works fine, alignment and all, but I can't figure out how to unload the movie from within the loaded movie without re-loading the http file of the main movie.
Sounds confusing....
Using remote location would work if the .swf was loaded from a remote location which it isn't and I want to avoid this.
Any help around?
Unloading Xml Loaded Swfs
Hi All,
I have my file nearly complete, but can't seem to figure out how to unload the swfs in as3 once you click a button to load a new one.
My file works great, with the exception of the videos playing over each other. slight bummer.
I have five buttons that each pull an external swf that is controlled by an xml file. If there were not sound it would not be an issue, but the sound overlaps if you click to the next link before the first video finishes playing.
I uploaded all the files here, including two test flv files. the files were too big to upload to the kirupa forum.
http://www.graphicmuse.com/web_help/unload.zip
Thanks!
Unloading Swfs Within A Loaded Swf.
Unloading swfs within a loaded swf.
My main movie has buttons to load and unload a number of swfs.
All works fine except for one particular loaded swf(let's call this "loaded. SWF", which also loads and unloads its own swfs.
Sometimes, after unloading "loaded. swf" from the main movie, I get the following:
"TypeError: Error #1009: Cannot access a property or method of a null object reference."
The object it refers to is in an swf loaded into "loaded. swf", which I assume has not unloaded along with it's parent.
From the main movie, how can I tell my loaded .swf child assets to disable themselves, prior to unloading loaded.swf itself?
PLEASE HELP: Unloading Xml Loaded Swfs
Hi All,
I have my files nearly complete, but can't seem to figure out how to unload the swfs in as3 once you click a button to load a new one.
My file works great, with the exception of the videos playing over each other. slight bummer.
I have five buttons that each pull an external swf that is controlled by an xml file. If there were not sound it would not be an issue, but the sound overlaps if you click to the next link before the first video finishes playing.
Thanks!
Help Unloading Xml Loaded Swfs With As3
Hi All,
I have my file nearly complete, but can't seem to figure out how to unload the swfs in as3 once you click a button to load a new one.
My file works great, with the exception of the videos playing over each other. slight bummer.
I have five buttons that each pull an external swf that is controlled by an xml file. If there were not sound it would not be an issue, but the sound overlaps if you click to the next link before the first video finishes playing.
I uploaded all the files here, including two test flv files. the files were too big to upload to the kirupa forum.
http://www.graphicmuse.com/web_help/unload.zip
Thanks!
Unloading A Movieclip
Hi there. I'm trying to load an .swf at the end of one of my movie clips. What coding can I put on the last frame of my MC, to unload the movieclip, so that when the new .swf loads up, the movieclip isnt in the way.
I've tried using: unloader.unloadMovie();
But that only works if you are loading another movie clip on your last frame instead of a .swf, which makes absolutely no sense at all, but OOOk flash.
In desperate need of help.... getting frusterated.
Thanks.
Partially Loaded Movie Not Unloading
I'm building a concealed preloader which loads content in the background and allows the user to navigate around the site while it is still loading. When the user chooses an option from the menu the loader stops preloading and automatically jumps to load the first page of the section the user has chosen. If the user pages ahead before the following pages have been loaded even if the first page is only half loaded it is supposed to stop loading the first page and start loading the page the user is on. This is where I run into trouble. The code works fine and everything works, but there seems to be a Flash problem. Even though the first page movie has been unloaded it still seems to still be loading while the next page is loading, causing the next page to load very slowly. If the user happens to partially load four or five pages then there is a huge problem.
Has anyone encounter a problem similar to this? Where you have partially loaded a movie and then tried to unload it and load another one.
I've tried the following without success:
* removing the movieclip to where it was loading
* unloading the movie
* loading another blank movie in it's place
* loading it to levels and doing the above two options.
All I want to happen is for it to just stop loading a partially loaded movie. Any help would be greatly appreciated!
Cheers,
Unloading A Movie That Hasn't Loaded.
So, I have a portfolio with 21 pieces in it. I've created external movies for each piece (all of which load on different levels in the movie..so piece3.swf loads on level 3, piece 4.swf loads on level 4 etc.).
When you click on a new piece, the old piece (level) is instructed to finish playing and then it unload itself. However, if someone clicks a new piece before the old piece loads, the instructions for the old piece to finish playing and unload itself are lost in space. The result is that I now have two pieces laying on top of each other.
My question is this:
Is there an easy way to stop an external movie from loading into a new level if a new event takes place?
Unloading All Movies Loaded With AttachMovie
Guys and Girls
My navigation for my website that I use loads menus using the attachMovie method, however, when mousing over adjacent navigation buttons, I would like to clear all menus loaded, and then load the one that is clicked, ie:
This is what the code kinda looks like:
on (release) {
approach_dock.attachMovie("approach_mc", "newname1", 1);
}
Before this, however, I would like to unload all the movies loaded into level 1 (in this case they would only be the navigational menus).
Any ideas?
Unloading Loaded Swfs From Memory
I've been reading about the problems associated with Flash Player 9 not unloading Loader swfs from memory, and how this has been possibly addressed by the addition of Loader.unloadAndStop in Flash player 10. (http://www.gskinner.com/blog/archive...onal_info.html)
Assuming the worst (given that this fix just attempts to mark the object for garbage collection), I was wondering does anybody know if the same swf is loaded twice does it use the copy in memory or load it again?
Specifically, I have a project which loads a sequence of swfs. When it gets to the end of the sequence it loads them again from the beginning. The project is a billboard which gets reset only once a week so I can't risk running out of memory.
Anybody know how this works?
[CS3] Having Trouble Unloading A Movie Once It Has Loaded
I am having trouble unloading a movie clip once I have loaded it. I have my main fla movie and within one page (frame) I am loading an external .swf of a calendar application. The problem is once I have loaded that frame, the movie clip shows up on all my other pages on top of the regular content of that page.
I am new to flash and have no idea how to unload it so that it only appears in that frame. I read a few articles on the net and some people are suggesting that I have an unloadMovie() statement in all my links. I have dozens of links and adding this would involve a lot of work. Is there a way I can unload this movie once someone navigates away from that frame?
Here is the code I am using to load the movie:
//on the frame action in the main timeline
this.createEmptyMovieClip("calcontainer",1);
//positioning the emptyMovieClip named calcontainer
calcontainer._x =-350;
calcontainer._y =-160;
//attach the swf file which is in the same folder
calcontainer.loadMovie("calendar.swf");
//that's it
Please help!!!
Classes From A Loaded Module SWF Not Unloading
I've having multiple issues getting a loaded module SWF to unload from a shell SWF in AS3 (loading into ApplicationDomain.currentDomain):
1) Any library items in the module marked "Export for ActionScript" are not unloaded when calling Loader.unload().
2) The class definitions of library items (and the module's document class) are still present after a Loader.unload --- ApplicationDomain.currentDomain.hasDefinition("mod uleDocClass") returns true after unloading.
There are no (weak OR strong) references to the module, and Loader.unload() does remove the child from the display list... It seems to persist in memory however, along with all of its linked library items, and is not garbage collected.
On top of this, if I load the module again after the unload, it adds to the memory being used by the Shell. For example, the shell was using 50MB of memory, while my test Module contained 5MB of linked library items. After loading and unloading the module, the memory stayed at 55MB. After loading and unloading again, the memory jumped to 60MB, 65MB the next time, 70MB the next, etc.
Any ideas would be appreciated!!
Unloading Dynamically Loaded Text?
Hi Again - I'm working on a calendar, and set it up so when you roll over a date, the events load dynamically from a TXT file into a dynamic text box off to the right. How do I go about unloading the file on rollout? Thanks in advance!
Andrew
Premature Unloading Of Loaded SWFs
I have an AS3 Flash project that loads a bunch of movies from external SWF files. When I run in it inside the Flash CS3 Debug Movie debugger, I see an odd thing. I see it load and unpack the SWFs. After loading the loader and movieclips are stored in an array in a class that lives as long as the document root class. In other words, there are active references to these loaded movieclips, so the garbage collector should not be able to free the memory. Yet after doing some quick loop over the loaded SWFs, it process the first 3 out of 22 and then in the output window the debugger shows me it begins unloading the other 19 SWFs.
One of the first lessons I learned when writing non-trivial as3 was to ensure I had references to instances I required stored somewhere that would not go out of scope and potentially trigger GC. But today I started seeing this odd behavior.
As an additional note, when this starts happening the debugger seems to get a little wiggy. For example it will not stop at breakpoints set on trace statements that ARE printing to the output window.
I must have angered the Flash memory management gods in some bad way. There is most likely a bug in my code but if this situation stirs any thoughts fire off this way!
Reversing AND Unloading A Movieclip?
Hi, I have this problem that's been stumping me for days. I have a button that loads a movie into an empty movieclip on the stage. When the movie clip fully loads another button pops up that says "close." What I want is when you click the "close" button the movie plays in reverse and then unloads itself. Is this possible? If searched but I couldn't find anything useful.
Reversing AND Unloading A Movieclip?
Sorry for reposting this question but I think I had put it in the wrong forum before.
I have this problem that's been stumping me for days. I have a button that loads a movie into an empty movieclip on the stage. When the movie clip fully loads another button pops up that says "close." What I want is when you click the "close" button the movie plays in reverse and then unloads itself. Is this possible? If searched but I couldn't find anything useful.
Having Issues Unloading MovieClip That Contains XML...
Hi,
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.
Could someone take a look and help me out. 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();
r.menuXml.ignoreWhite = true;
r.menuXml.onLoad = function() {
menuItem = this.firstChild.childNodes;
for (var i=0; i<menuItem.length; i++) {
item = _root.attachMovie("itemClip", "itemClip" + i, i);
r.clipArr.push(item);
item._x = 30;
item._y = 30*i;
item.itemLabel.text = menuItem[i].attributes.name;
item.myUrl = menuItem[i].attributes.url;
item.onRelease = function() {
getURL(this.myUrl,"_blank");
}
}
}
r.menuXml.load("pdf_menu.xml");
stop();
// new stuff--------------------------
deleteClips = function(){
for(var i = 0; i<r.clipArr.length; i++){
r.clipArr[i].removeMovieClip();
}
r.menuXml = null;
};
// new stuff--------------------------
This is what i am using to unload the movie clip:
Code:
_root.deleteClips()
Here is the file that i am working on. Just download it from my server and take a look:
http://216.194.72.230/~denis/Unload_Movie4.zip
Thank you, I appreciate it!
HELP Unloading An Image From A Movieclip
Hi, i am having trouble unloading an image from a movieclip.
Currently a button is pressed and an image loads into a movieclip. I have 10 buttons each loading a seperate image.
When you click the first button the image loads, however when i click the second button the image does not load and the previous image is still shown.
How can i unload the existing image from the movieclip when the next button is pressed??
I am using MX 2004pro
Some quick help would be great. Is there some kind of unloadMovie....etc??
THANKS
PHill
_____________________________________-
(this is the code for the button)
this.But2_btn.onRelease = function() {
trace ("image2");
_root.patchContainerMC.clothingPatchMC1.topClothin gMC.TOPLOAD("tee2.jpg");
};
______________________________________
(this is the code within the movie clip)
function TOPLOAD(topToLoad_str){
trace("function called");
this.loadMovie(topToLoad_str);
}
HELP Unloading An Image From A Movieclip
Hi, i am having trouble unloading an image from a movieclip.
Currently a button is pressed and an image loads into a movieclip. I have 10 buttons each loading a seperate image.
When you click the first button the image loads, however when i click the second button the image does not load and the previous image is still shown.
How can i unload the existing image from the movieclip when the next button is pressed??
I am using MX 2004pro
Some quick help would be great. Is there some kind of unloadMovie....etc??
THANKS
PHill
_____________________________________-
(this is the code for the button)
this.But2_btn.onRelease = function() {
_root.patchContainerMC.clothingPatchMC1.topClothin gMC.TOPLOAD("tee2.jpg");
};
______________________________________
(this is the code within the movie clip)
function TOPLOAD(topToLoad_str){
this.loadMovie(topToLoad_str);
}
[F8] Unloading And Loading Movieclip
In the attatched .fla, the top button plays the movieclip called 'homeclip' which is located on the layer 'homeclip'.
However, when I press the second button, the action tells it to unload the MC of the first button and load a new one. This works but the TOP button doesnt seem to be working, maybe a conflict in the code.
Please help!
Transition When Unloading Movieclip...
Hi,
I have a few movieclips which are gonna be loaded into a blank movieclip container (place holder) depending on which button the user presses.
Now, the good thing is that with this technique the movieclip automatically unloads...
The bad thing is, that I wanna control the transition between the two clips (alpha fade out, moving off screen etc.)
Is there any way of doing that ?
Thanx for your help in advance !
Mike
Transition When Unloading A Movieclip
Hi,
I have a few movieclips which are gonna be loaded into a blank movieclip container (place holder) depending on which button the user presses.
Now, the good thing is that with this technique the movieclip automatically unloads...
The bad thing is, that I wanna control the transition between the two clips (e.g. alpha fade out, moving off screen etc.)
Is there any way of doing that ?
Thanx for your help in advance !
Mike
Unloading A Target MovieClip. Please Please
Can someone help me unload a targeted MovieClip
here is my code. (IT DOES NOT WORK)
unloadMovie("help.swf");
unloadMovie("help.swf",1); //Tried unloading on level file was loaded
unloadMovie (""); does not work.
Help Please
Unloading A Dynamic Movieclip?
I'm having issues figuring out this once simple command. Below is my code, how can i create an unload function that works for all my buttons? I've been researching but can't find something clear enough for me to understand. I feel like there's an easy fix, but i'm fried from staring at it. Thanks!
var home:Loader = new Loader();
var contact:Loader = new Loader();
var cont:MovieClip = new MovieClip();
//1st button:::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::
home_btn.addEventListener(MouseEvent.MOUSE_OVER, homeOver);
function homeOver(evt:MouseEvent):void {
home_btn_mc.gotoAndPlay("on");
}
home_btn.addEventListener(MouseEvent.CLICK, homeLoad);
function homeLoad(Event: MouseEvent) {
home.load(new URLRequest("home.swf"));
cont.x = 0;
cont.y = 20;
stage.addChild(cont);
cont.addChild(home);
}
home_btn.addEventListener(MouseEvent.MOUSE_OUT, homeOut);
function homeOut(evt:MouseEvent):void {
home_btn_mc.gotoAndPlay("off");
}
//2nd button:::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::::::
contact_btn.addEventListener(MouseEvent.CLICK, contactLoad);
function contactLoad(Event: MouseEvent) {
contact.load(new URLRequest("contact.swf"));
cont.x = 0;
cont.y = 20;
stage.addChild(cont);
cont.addChild(contact);
}
contact_btn.addEventListener(MouseEvent.MOUSE_OVER , contactOver);
function contactOver(evt:MouseEvent):void {
contact_btn_mc.gotoAndPlay("on");
}
contact_btn.addEventListener(MouseEvent.MOUSE_OUT, contactOut);
function contactOut(evt:MouseEvent):void {
contact_btn_mc.gotoAndPlay("off");
}
Unloading A Dynamic Movieclip?
I'm having issues figuring out this once simple command. Below is my code, how can i create an unload function that works for all my buttons? I've been researching but can't find something clear enough for me to understand. I feel like there's an easy fix, but i'm fried from staring at it. Thanks!
var home:Loader = new Loader();
var contact:Loader = new Loader();
var cont:MovieClip = new MovieClip();
//1st button:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
home_btn.addEventListener(MouseEvent.MOUSE_OVER, homeOver);
function homeOver(evt:MouseEvent):void {
home_btn_mc.gotoAndPlay("on");
}
home_btn.addEventListener(MouseEvent.CLICK, homeLoad);
function homeLoad(Event: MouseEvent) {
home.load(new URLRequest("home.swf"));
cont.x = 0;
cont.y = 20;
stage.addChild(cont);
cont.addChild(home);
}
home_btn.addEventListener(MouseEvent.MOUSE_OUT, homeOut);
function homeOut(evt:MouseEvent):void {
home_btn_mc.gotoAndPlay("off");
}
//2nd button:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
contact_btn.addEventListener(MouseEvent.CLICK, contactLoad);
function contactLoad(Event: MouseEvent) {
contact.load(new URLRequest("contact.swf"));
cont.x = 0;
cont.y = 20;
stage.addChild(cont);
cont.addChild(contact);
}
contact_btn.addEventListener(MouseEvent.MOUSE_OVER, contactOver);
function contactOver(evt:MouseEvent):void {
contact_btn_mc.gotoAndPlay("on");
}
contact_btn.addEventListener(MouseEvent.MOUSE_OUT, contactOut);
function contactOut(evt:MouseEvent):void {
contact_btn_mc.gotoAndPlay("off");
}
Problem Unloading Parially Loaded Swfs
I've built a program that starts loading the first screen of a section. However if the user wants to page ahead they can. The program is supposed to stop loading the current movie that is loading and start loading the new movie for the page that the user is on. This code works fine.
The problem seems to be a Flash one . Even though the first page is supposed to have unloaded it seems to be still loading and causing the next page to load very slowly. This becomes are real problem if the user has gone to a number of pages and then advanced when they were only partailly loaded, because then you have a number of movies all trying to load at the same time.
I've tried the following without success:
* unloading the movie
* replacing the movie with a blank swf
* removing the movie clip that is was loading too
* loading it to levels and using the first two above options.
All I want it to do is just stop loading a partially loaded movie and start loading a new one. If anyone has encounter this problem before and found a work around it would be greatly appreciated.
Cheers,
Unloading A Movieclip In Holder Mc From An External Swf
I've read read posts and must be doing something stupid at this point.
I created and emty mc in my main timeline "introhold"
I have it play the intro (so is that level 1?)
I kept the intro in an emty mc so I can go back to it and target a specific frame.
Basically I am having trouble removing it from an external swf on enterframe
the other menus are sucessfully replacing each other but this one just stays there. I have gotta rest.
anybody do this one before?
MovieClip/MovieClipLoader Unloading Problem
Based on Kirupa's wonderful tutorial:
http://www.kirupa.com/developer/mx2004/thumbnails.htm
I've created a portfolio site for myself:
http://mobie.us
It is basically working very nicely and I am quite happy with my results. I have created 'categories of thumbnails' and thus I also now have buttons to swap between the categories of thumbnails. In order to get this to work I had to remove the movie clip, unload the movie clip loader, and remove the listener.
Below is my function for doing this:
Code:
function clearthumbStrip() {
thumbnail_mc.removeMovieClip();
for (z=0;z<countOfThumbnails;z++) {
image_mcl.unloadClip("thumbnail_mc.t"+z);
}
image_mcl.removeListener(tlistener);
}
(I've kept all the names from Kirupa's original sample)
Anyways, the site works well in IE6, where I've done most of my work. However, today I've noticed problems with the unloading (I assume) on Firefox and Netscape. I can't seem to figure out what is going on. If anyone has any ideas or sees anything wrong with this code, please let me know.
By "problems", I mean: thumbnails that overlap slightly or thumbnails that appear as phantoms behind the current ones (phantoms are from the wrong category).
Thanks in advance! I appreciate your time.
Chris
Unloading A Generic Movieclip Completely
So I thought all the errors in my site were gone . . . I have certain generic sounds that play in a various dynamic clips. When I unloaded them their timelines continue in the background and trigger sounds long after they are gone.
The only examples I can find of unloading all streams when unloading a clip specifically name the instances of the sounds and netStreams.
I need to just clear all aspects of these dynamic clips without specifically referencing the instance names of their sub properties.
This is the direction I'm going in:
var clipLoader:Loader;
Code:
function closeAllStreams(evt:Event) {
clipLoader.SoundMixer.stopAll;
}
clipLoader.loaderInfo.addEventListener(Event.UNLOAD, closeAllStreams);
function loadNextClip():void {
if (clipLoader != null) {
unloadClip();
}
clipLoader = new Loader();
addChild(clipLoader);
var clipName:URLRequest = new URLRequest(parent.nextClip);
clipLoader.load(clipName);
parent.transition_mc.gotoAndPlay("clear");
}
function unloadClip():void {
var count:int = this.numChildren;
for (var i:int = 0; i <count; i++) {
this.removeChildAt(0);
this.clipLoader.unload();
//this.removeChild(clipLoader);
}
}
Again, unloading a movie is a crucial part of Flash and Actionscripting. The lack of information out there on this is frightening.
PS the code above unloads the clip, but doesn't destroy the clips timeline. I could simply stop the clip before unloading it. But I'm worried about that taking up too many resources.
Jake
Unloading Movieclip Inside Emptymovieclip
Hello, i'm new to AS... so maybe this is really simple or i'm using the wrong method.
I have 3 picture slideshows usings XML, the pictures will be changing form time to time that's why i needed it like this.
Every slideshow is inside a folder, ej: gal1, gal2, gal3.
In every folder i have the images, the flash file (gallery.swf) and the xml file.
I have the main movie in wich i have a container where most data shows... and in wich i made an emptymovieclip, called "galMC" (now i know i could have used createEmptymovieclip, but maybe next time)
So, i load the gallery.swf inside galMC:
loadMovie("gal1/gallery.swf", "galMC");
¿How i the world can i unload "gallery.swf" from galMC?
I have tried various methods but i always end up unloading "galMC"...
the problme i think is that if i reload the container and click on another slideshow (gal2 or gal3), i see only the first image of the selected slideshow and then and then it starts showing the first slideshow that was loaded, so i guess i need to really UNLOAD that slideshow to load another and this is not hapenning.
Hopefully, i made myself understand enough to get some guiadance with this.
Thanks.
Unloading An External .swf Video Element Loaded With CreateEmptyMovieC
Im using the following code in my base flash movie (flash MX) and it successfully loads an external .swf video clip.... When that external video element ends I have added action script to 'stop' it when it reaches the end.
Now, What Im intrested in learning how to do but none of my flash books or tutorials make clear, is how in the heck to (upon the completion of the external .swf video) uload or remove it ... all I get is the stopped external movie clip as a black element (the last frame of the video is a black frame)- so it does 'stop' but now what ... what do I do to remove it?
I'll be loading other movies into the same 'holder' if that matters.
heres the load movie function Im using:
CODE _root.createEmptyMovieClip("container", 1);
loadMovie("video/video_test.swf", "container");
container._x = 611;
container._y = 61;
Unloading MovieClip And Playing The Main Timeline
Hi
I seem to be having issues contolling the main timeline from a child timeline. I'vr poked around on the forms to the point of confusing myself.
Here's the sequence of events I'd like to occur:
1. Child MovieClip that's loaded into the maintime on level 12 unloads itself once a button is pressed on the child's timeline.
2. On the last frame on the the child's timeline it tells the parent movie to go to frame 12.
Here's the code I placed on the last frame of the Child's timeline.
_parent.gotoAndPlay(12);
this.unloadMovie()
Right now the Child mopvie unloads successfully but it does not go back to frame 12 of the parent ( main) timeline???
Any suggestions?
Loading/Unloading Internal MovieClip Instances?
Is that even possible?
I'm creating an optional menu bar that should be loaded when a button is pressed.
currently, the menu bar is a movie clip instance on stage, my question is, can you write script to load and unload the movie clip instance?
I'm aware that you can load existing movies from an external swf file into another, but I'm finding it hard to work that way, I cant set the location of the menu without creating all this extra space on the external file to position it, plus I cant seem to manage to unload the movie once its on.
does anyone know how to make a movie clip instance dragable?
Thanks!
Determining The Name Of A Dynamically Loaded Movieclip From A Child Movieclip
I had posted earlier on this topic, but I don't think I was clear enough in my title, or description.
Here's a more detailed explaination of what I I'm trying to do:
I have a .swf file that dynamically generates container movieclips (giving them dynamically generated instance names) and then dynamically loads external .swf files into it.
In my main time line I have a series of objects.
I would like to be able to, from the loaded .swf files, make a call to the objects in the _root timeline (which I can do without a problem) letting these objects know, the name of it's dynamically generated container movieclip that contains my loaded .swf.
1. Parent SWF:
|
2. Dynamically Generated MovieClip Instance:
|
3. Dynamically loaded external SWF File:
. Script needs to know the name of the instance
of #2.
In 3. I tried using the _parent and _parent._parent to get a reference to #2. but all I was able to get was "_level0".
I've also tried using _lockroot (which somone else kindly suggested) to no avail.
Any help is greatly appreciated
How To Swap Movieclip With Other Content, In A Movieclip Loaded External
Hi! I'm getting desperated.
I started about 3 days ago trying to solve this problem, maybe i'm very noob!
I have a main movie. Inside this, i load various externals swf's. One swf for a menu, another for a image presentation, etc.
In the menu, i load various instances of another swf file... a button swf, and witch one has to have a different image as button.
So inside the button, i have a layer with a button, but no shape or nothing, and in another layer, i have a movieclip to can swap by an image.
So, the struct is like this:
Main Movie
. image_presentation
. contact
. menu
. . button1
. . . button
. . . image
. . button2
. . . button
. . . image
. . button3
. . . button
. . . image
. . button4
. . . button
. . . image
So, button is only a swf file, with various instances. "button" inside the buttons, make the button efect, with a white border apearing on mouse over button. "image" is a movieclip created only for change with an image (button 1 = image 1, button 2 = image 2, etc).
How can i do this, controlling the images url's from the main movie?? I had tried a lot of ways, but i could do it.
Please help.
Thanks.
Duplicated Movieclip Doesn't Inherit Loaded Movieclip
I'm loading an image into a blank_mc within a movieclip called 'background_mc' using the MovieClipLoader object; when the onLoadInit for the MovieClipLoader object is fired, i then attempt to clone my 'backgound_mc' object and the loaded image it contains so i can do something with it (i,e a funky masky/blur thing, not important right now)
I'm successfully loading my image into the blank clip within background_mc, the onLoadInit behaviour fires and duplicates background_mc once the image has been loaded, but in a disappointing turn of events, my clone of background_mc no longer has an image attached, and has instead reverted back to it's original form, just as ti was before it had the jpeg image loaded in.
Has anyone ever encountered something like this this before regarding the duplicateMovieClip command, and if so can anyone suggest a workaround?
*goes off to boost karma by helping others*
Thanks!
Chris
Passing Parameters To MovieClip Loaded Into Other MovieClip
Hi,
In AS2 I used to add parameters to the urls of MovieClips which where loaded into other movieclips as follows:
MovieClipLoader.loadClip("myclip.swf?param1=value1 ¶m2=value2");
However this doesn't work in AS3, I get an IOErrorEvent (URL Not Found #2035). The same yields for using URLVariables as data object for the URLRequest.
Is there a way to pass parameters to loaded flash movies this way, or else which workaround recommended?
Cheers!
Jorrit
Load A Movieclip Into A Other Movieclip From A Loaded Swf File
do somebody know how I can do if I have a flashmovie that is the skin and into that movie I load two .swf files (one with the menu and one with the start text). Have 2 empty movieclips one called "meny" and the other "main". but the problem is that when I load the meny externally the actions that i have on the buttons doesn't work as if I would have the menu in the skinmovie.
I have these action to the info button:
on (release) {
loadMovie("info.swf", main);
}
and these action work if i have the menu in the skinmovie but no when i load it from a .swf these actions don't function.
Anyone that know how I could rewrite thes action that it would work?
Thanks
Load A Movieclip Into A Other Movieclip From A Loaded Swf File
do somebody know how I can do if I have a flashmovie that is the skin and into that movie I load two .swf files (one with the menu and one with the start text). Have 2 empty movieclips one called "meny" and the other "main". but the problem is that when I load the meny externally the actions that i have on the buttons doesn't work as if I would have the menu in the skinmovie.
I have these action to the info button:
on (release) {
loadMovie("info.swf", main);
}
and these action work if i have the menu in the skinmovie but no when i load it from a .swf these actions don't function.
Anyone that know how I could rewrite thes action that it would work?
Thanks
Unloading A Loaded Movie In The Same Loaded Movie
I have a popup window (separate swf movie) that loads up with its own close button in the main movie. What I need to do is script that close button to unload the whole movie on the level it's in (ie: level5). Basically, unloading its own self from the parent swf.
Every clip is named, but I can't seem to get the unloadMovieNum to work to close its own self.
http://www.prismaartist.com
Help Keep Loaded Movieclip Over Other Loaded Movieclips
I'm loading an external swf that is a button to close other loaded movies. I want it to stay above all the other movies at all times so that the user has a way to close them and go back to the main stage. There are buttons on the stage that load external movies and the close button movie loads automatically. All of the movies load in fine but once I load in a movie from a dynamically created movieclip button on the stage, it covers up the close button movie.
The following code is where I dynamically load movies from the dynamic movieclip buttons and then after that is where I load in the external swf for the close button.
Quote:
//Dynamically assign external movies to load from
//the dynamic buttons
for (j=1; j<holderArray.length; j++) {
this["btn"+j].jValue = j;
//this["btn"+j].useHandCursor = false;
this["btn"+j].onRelease = function() {
movie = topics[holderArray[this.jValue]]+".swf";
loadMovieNum(movie, 100);
_root.movieloader.swapDepths(16000);
};//end of onRelease
}//end of j for loop
}//end of i for loop
//Start of new movieclip
var mc:MovieClip = _root.createEmptyMovieClip("movieloader", _root._level300);
mc._x = 665;
mc._y = 524;
var mcl:MovieClipLoader = new MovieClipLoader();
var listener:Object = new Object();
mcl.addListener(listener);
mcl.loadClip("Close Button.swf",mc);
listener.onLoadInit = function(theMC:MovieClip) {
theMC.onRelease = function() {
if (_root._level100 == Number(_root._level100)) {
unloadMovieNum(_root._level100);
} else {
_root._level100.unloadMovie();
}
};
};//end of new movieclip
Thank you in advance for any help!
Help Keep Loaded Movieclip Over Other Loaded Movieclips
I'm loading an external swf that is a button to close other loaded movies. I want it to stay above all the other movies at all times so that the user has a way to close them and go back to the main stage. There are buttons on the stage that load external movies and the close button movie loads automatically. All of the movies load in fine but once I load in a movie from a dynamically created movieclip button on the stage, it covers up the close button movie.
The following code is where I dynamically load movies from the dynamic movieclip buttons and then after that is where I load in the external swf for the close button.
Quote:
//Dynamically assign external movies to load from
//the dynamic buttons
for (j=1; j<holderArray.length; j++) {
this["btn"+j].jValue = j;
//this["btn"+j].useHandCursor = false;
this["btn"+j].onRelease = function() {
movie = topics[holderArray[this.jValue]]+".swf";
loadMovieNum(movie, 100);
_root.movieloader.swapDepths(16000);
};//end of onRelease
}//end of j for loop
}//end of i for loop
//Start of new movieclip
var mc:MovieClip = _root.createEmptyMovieClip("movieloader", _root._level300);
mc._x = 665;
mc._y = 524;
var mcl:MovieClipLoader = new MovieClipLoader();
var listener:Object = new Object();
mcl.addListener(listener);
mcl.loadClip("Close Button.swf",mc);
listener.onLoadInit = function(theMC:MovieClip) {
theMC.onRelease = function() {
if (_root._level100 == Number(_root._level100)) {
unloadMovieNum(_root._level100);
} else {
_root._level100.unloadMovie();
}
};
};//end of new movieclip
Thank you in advance for any help!
Loading/unloading Movies In Loaded Movies :|
Yeah, I know that sounds confusing. Lemme explain:
- interface.swf it's my main movie;
- interface.swf load section1.swf in a specific container called containerMC (duh! );
- section1.swf load other movie, section1a.swf;
- I need a button in section1.swf that load section3.swf in the same main container (containerMC in interface.swf), unloading section1.swf and section1a.swf.
Well... I need some tips about the action of my 'overloaded' button
Sorry about my english
[]'s
Edu
If Movieclip Loaded Go To?
I got a movie ... in which there are several movieclips in the library, and i want a particular movie clip to show up only if and when it is completly loaded, whne one clicks on it's respective button.
Many people said i have to use loadmovie but from what i figured out that is for movie which aren't in the same movie right? This what i have is a movieclip which i want to start when it loads only... how can i do it? I am using movieclips becaues i want the original movie to always be the background of these "sections"(movie clips)
|