When Does A Clip Load/unload Across Scenes?
I'm confused... I have a project with multiple scenes... In each scene I have a recurring Movieclip, with clips inside it, and those clips load up variables from _ROOT to modify themselves. It works when i go from one scene to the next, except in one scene in particular suddenly it's not loading up the root variables. The odd thing is, it's the exact same Movieclip with the exact same AS, therefore it SHOULD be acting the same in that scene.
You can see what I mean here: http://www.sporeproductions.com/clie..._ready_18.html
1. Customize the girl so she is NOT in her default state. 2. Don't bother giving her a new name 3. Now we are in her Room which is a new scene. As you see, the colors and hair were "kept". (don't bother with anything here, just go on to the next scene) 4. You're present with 3 thumbnails to click. This is a new scene too, and the girl has "kept" her colors again. 5. Now here we are in yet another scene, but this time the colors aren't kept! But the MC used is the same! arrrrgh!
RB A veteran newbie
FlashKit > Flash Help > Flash ActionScript
Posted on: 09-12-2003, 01:05 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Load Unload Movie Clip?
im not even 100% sure that this is what its called that im trying to do.
but here is my situtation...
I have a flash site, within that site i have the background image, and 5 different movie clips that load when clicked on. Now each movie clip has "next" buttons to scroll through the pages. What i want to happen is, when i get to the last frame of a movie clip, i want the "next" button to go to the next movie clip instead of having to click on the menu button.
Im fairly new to flash, so this could be an easy fix, i just cant figure it out.
Thanks for anything!
Load And Unload Movie Clip
Hi there, i am a vey inexperienced flash cs3 user and am 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);
var url:URLRequest = new URLRequest("mosfermclip.swf"); myLoader.load(url);
function goForward(event:MouseEvent):void
{
nextFrame();
}
can anyone help unload my external clip - i know this has been discussed beofre but am now LOST.
many thanks in advance.
Ben
Need Some Quick Help On Load Unload Movie Clip.
Hello. I'm undertaking a rather large flash site project for a friend of mine who sells SOAP grind shoes. as part of the site, i have a form that i'm designing so the person can fill out the forms and click submit to have all the information sent in an email (via PHP) to my friend so he can fill out the form and send the request for payment.
So far so good, I made some basic fill in forms, radio forms (that returned a variable), and i'm creating one giant string variable by combining all the data (which then the string variable will be sent as the body of the email).
As part of the form, you can select one of the 4 types of shoes, but some shoes are in some sizes. I have a combobox for the size selection, but i need to be able to load the one corresponding movie clip containing the correct combo box, while unloading the other combo box movie clips. I used a simple "on(Press)" code on the radio buttons, but i can't figure out how to unload the movie clips and load just the one. These movie clips are nested, they are not seperate .swf files. Does anyone know how to do this? i've tried unloadMovie(expressgreysize); or loadMovieNum(expressgreysize, 1); but that never worked (the 4 combo box movie clips are labeled expressgreysize, expresswhitesize, expressblacksize, and ordnance, the first 3 are the color variations of the express SOAP shoe, the last is some spare ordnance).
Sorry for the long thing, i hope someone can help. Thanks!
Unload/Load New Movie Clip Problem
I have a quick question to see if I am missing something or just generally not coding it correctly.
Basically, I have a main movie clip on the time where I load external SWFs into.
I have one opening SWF titled "front_page.swf" that is loaded upon entry of the site.
Basically this animation stops at frame 24 as that is the "intro" section of the animation.
I have nav bars at the top that when clicked should cause "front_page.swf" to play starting at frame 25 until end. Consider this the "outro" animation.
Now, all that is well and good, but I want a NEW .swf to be loaded into the Movie Clip after "front_page.swf" is finished playing.
Here is some code that I attempted to make this happen, but has yet to work.
Frame 1 of "front_page.swf":
Quote:
_global.isplaying = 1;
then at the last Frame of "front_page.swf":
Quote:
_global.isplaying = 0;
Now, on the button in the main movie timeline where "front_page.swf" is loaded into:
Quote:
//this is where i attempt to load the new .swf into the movie clip with the instance name of "main_page" after it reaches a point where the previous movie clip, "front_page.swf" has declared the variable as being 0.
on (release) {
_root.main_page.gotoAndPlay ("close");
if (_global.isplaying = 0) {
loader.loadClip ("galleries/gallery.swf", main_page);
}
}
Does anyone see a problem with how I am attempting this? Is there an easier way?
Clearly I am doing something incorrectly as it is not functioning.
It makes sense in my head but I think the Actionscript is processing it too fast or something.
I have also attempted to use the getBytesLoaded and getBytesTotal commands in order to see when "front_page.swf" reaches the last frame... but that isn't functioning correctly, either.
I spent probably 5 hours trying to figure this out last night and completely spent and at a loss on how to fix this.
Any help would be greatly appreciated!
Movie Clip Control Load Then Unload Onclip Action
Ok in a tute application in have been building I have a a problem getting rid of the results movie clip.
Here is the process that is taken by the user.
1st. the user is asked a question
2nd. they responed by clicking a button
3rd. once a user click's an answer they recieve a response .
the response is a movie clip so I have used this code on the button that is clicked.
stop ();
tellTarget ("/result") {
gotoAndStop (2);
}
This is all cool user gets response.
Next step for movie is
User selects button that says "NEXT"
so script in the movie clip
on (release) {
tellTarget ("_root") {
nextFrame ();
tellTarget (".unloadMovie(result)") {
}
}
}
This works fine the root movie moves to the next frame but the movie doesn't unload it stays on the screen.
Idealy the movieclip would remove and then reload with the next frames answer once the has selected there response.
Hope someone can see my error I'm sure it's something simple I have just been looking at it for to long.
Cheers
Andy
[Edited by andyclark on 12-09-2001 at 08:21 PM]
[F8] Help With Loading Images/conflict From Unload/load Movie Clip
The situation > I'm loading imaged into my pic loader which currently mask under shape so that the image cropped to fit my shape. The image is loaded via the movie clip loader class from a path inputed from an array of stings with the path to to image. The image load into the mask pic loader masked/cropped by a shape which is inside another movie clip which has buttons inside of it. This movie clip pops up when i click and image or when i click and image and then input a password.
The problem > is that all of this works fine until I unload this swf and load another swf then return back to the original swf. Then when i try to load and image or click any button that is inside of my move clip with the pic loader they don't function any more. I wold assume this is a problem of simple not scoping out thing correctly but traces reveal that doesn't seem to be the case. Note this only happens when I unload the swf, load another one, unload that one and then reload the swf i started from otherwise it works fine.
Now for my code - I believe I included everything applying to my question.
-------------------------------------
Code:
for (a=1; a<8; a++) {
this['dlbtn'+a].id = a;
this['dlbtn'+a].onRelease = function() {
dlbnum = this._name.charAt(5);
trace(this);
if (dlbnum>2) {
bigdisplayctrl(true);
rollOutBtn(this);
fader.alphaTo(60,.5);
entrcode();
} else {
if (this.id == 1) {
fader.alphaTo(60,.5);
getBigDisplay(1);
rollOutBtn(dlbtn1);
//bigdisplay._x = this._x;
bigdisplayctrl(false);
trace("dlbnnum"+dlbnum);
} else if (this.id == 2) {
getRecipeCardDisplay();
}
/*//--------DOWNLOAD BUTTONS------------------
dlbtn1.onRelease = function() {
fader.alphaTo(60,.5);
getBigDisplay(1);
rollOutBtn(dlbtn1);
//bigdisplay._x = this._x;
bigdisplayctrl(false);
trace("dlbnnum"+dlbnum);
};
//trace(a)
};
this['dlbtn'+a].onRollOver = function() {
rollOverBtn(this);
};
this['dlbtn'+a].onRollOut = function() {
rollOutBtn(this);
};
}
bigdisplay._xscale = 0;
bigdisplay._yscale = 0;
fader._alpha = 0;
var downloads:Array = new Array('cornwall.gif', null, '2.jpg', '3.jpg', '4.jpg',
'5.jpg', '6.gif');
bigdisplay.closebtn.onRelease = function() {
tracebox_txt.text = "bigdisplayclosebtn";
closeDisplay();
};
function getDownloadPreview(downloadID) {
tracebox_txt.text = "getDownloadPreview";
trace('downloadID: '+downloadID);
if (downloadID != 2) {
dlpath = 'downloadimg/'+downloads[downloadID-1];
trace(dlpath);
//var container:MovieClip
var container:MovieClip = bigdisplay.picloader;
bigdisplay.createEmptyMovieClip("container",0);
//pictest_mc
//
//bigdisplay.picloader;
var mcLoader:MovieClipLoader = new MovieClipLoader();
mcLoader.addListener(this);
mcLoader.loadClip(dlpath,container);
//bigdisplay.picloader.loadMovie(dlpath);
getCorrectDepths(bigdisplay);
bigdisplay.scaleTo(100,1);
tracebox_txt.text = "getDownloadPreview 2 "+dlpath;
}
}
function onLoadInit(mc:MovieClip) {
trace("onLoadInit: "+mc);
tracebox_txt.text = "onLoadInit: "+mc;
}
function onLoadError(mc:MovieClip) {
trace("onLoadError: "+mc);
tracebox_txt.text = "onLoadErro: "+mc;
}
function onLoadComplete(mc:MovieClip) {
trace("onLoadComplete: "+mc);
tracebox_txt.text = "onLoadComplete: "+mc;
}
function getBigDisplay(id:Number):Void {
tracebox_txt.text = "getBigDisplay";
disableAllBtns();
getDownloadPreview(id);
trace("dloads"+downloadID-1);
bigdisplay.swapDepths(0);
trace('display id: '+id);
if (id == 0) {
//donothing
} else if (id == 1) {
} else if (id == 2) {
} else if (id == 3) {
bigdisplay.dlbtn.onRelease = function() {
getURL(canonpath+"downloads/coloringpage.pdf", "_blank");
closeDisplay();
};
} else if (id == 4) {
bigdisplay.dlbtn.onRelease = function() {
getURL(canonpath+"downloads/doorhanger.pdf", "_blank");
closeDisplay();
};
} else if (id == 5) {
bigdisplay.dlbtn.onRelease = function() {
getURL(canonpath+"downloads/wordsearch.pdf", "_blank");
closeDisplay();
};
} else if (id == 6) {
bigdisplay.dlbtn.onRelease = function() {
getURL(canonpath+"downloads/postcard.pdf", "_blank");
closeDisplay();
};
} else if (id == 7) {
bigdisplay.dlbtn.onRelease = function() {
getURL(canonpath+"downloads/screensaver.zip", "_blank");
closeDisplay();
};
}
}
function closeDisplay() {
fader.alphaTo(0,.5);
this._parent.bigdisplay.scaleTo(0,1);
bigdisplay.scaleTo(0,1);
enableAllBtns();
}
Help With Loading Images/conflict From Unload/load Movie Clip
The situation > I'm loading imaged into my pic loader which currently mask under shape so that the image cropped to fit my shape. The image is loaded via the movie clip loader class from a path inputed from an array of stings with the path to to image. The image load into the mask pic loader masked/cropped by a shape which is inside another movie clip which has buttons inside of it. This movie clip pops up when i click and image or when i click and image and then input a password.
The problem > is that all of this works fine until I unload this swf and load another swf then return back to the original swf. Then when i try to load and image or click any button that is inside of my move clip with the pic loader they don't function any more. I wold assume this is a problem of simple not scoping out thing correctly but traces reveal that doesn't seem to be the case. Note this only happens when I unload the swf, load another one, unload that one and then reload the swf i started from otherwise it works fine.
Now for my code - I believe I included everything applying to my question.
-------------------------------------
Code:
for (a=1; a<8; a++) {
this['dlbtn'+a].id = a;
this['dlbtn'+a].onRelease = function() {
dlbnum = this._name.charAt(5);
trace(this);
if (dlbnum>2) {
bigdisplayctrl(true);
rollOutBtn(this);
fader.alphaTo(60,.5);
entrcode();
} else {
if (this.id == 1) {
fader.alphaTo(60,.5);
getBigDisplay(1);
rollOutBtn(dlbtn1);
//bigdisplay._x = this._x;
bigdisplayctrl(false);
trace("dlbnnum"+dlbnum);
} else if (this.id == 2) {
getRecipeCardDisplay();
}
/*//--------DOWNLOAD BUTTONS------------------
dlbtn1.onRelease = function() {
fader.alphaTo(60,.5);
getBigDisplay(1);
rollOutBtn(dlbtn1);
//bigdisplay._x = this._x;
bigdisplayctrl(false);
trace("dlbnnum"+dlbnum);
};
//trace(a)
};
this['dlbtn'+a].onRollOver = function() {
rollOverBtn(this);
};
this['dlbtn'+a].onRollOut = function() {
rollOutBtn(this);
};
}
bigdisplay._xscale = 0;
bigdisplay._yscale = 0;
fader._alpha = 0;
var downloads:Array = new Array('cornwall.gif', null, '2.jpg', '3.jpg', '4.jpg',
'5.jpg', '6.gif');
bigdisplay.closebtn.onRelease = function() {
tracebox_txt.text = "bigdisplayclosebtn";
closeDisplay();
};
function getDownloadPreview(downloadID) {
tracebox_txt.text = "getDownloadPreview";
trace('downloadID: '+downloadID);
if (downloadID != 2) {
dlpath = 'downloadimg/'+downloads[downloadID-1];
trace(dlpath);
//var container:MovieClip
var container:MovieClip = bigdisplay.picloader;
bigdisplay.createEmptyMovieClip("container",0);
//pictest_mc
//
//bigdisplay.picloader;
var mcLoader:MovieClipLoader = new MovieClipLoader();
mcLoader.addListener(this);
mcLoader.loadClip(dlpath,container);
//bigdisplay.picloader.loadMovie(dlpath);
getCorrectDepths(bigdisplay);
bigdisplay.scaleTo(100,1);
tracebox_txt.text = "getDownloadPreview 2 "+dlpath;
}
}
function onLoadInit(mc:MovieClip) {
trace("onLoadInit: "+mc);
tracebox_txt.text = "onLoadInit: "+mc;
}
function onLoadError(mc:MovieClip) {
trace("onLoadError: "+mc);
tracebox_txt.text = "onLoadErro: "+mc;
}
function onLoadComplete(mc:MovieClip) {
trace("onLoadComplete: "+mc);
tracebox_txt.text = "onLoadComplete: "+mc;
}
function getBigDisplay(id:Number):Void {
tracebox_txt.text = "getBigDisplay";
disableAllBtns();
getDownloadPreview(id);
trace("dloads"+downloadID-1);
bigdisplay.swapDepths(0);
trace('display id: '+id);
if (id == 0) {
//donothing
} else if (id == 1) {
} else if (id == 2) {
} else if (id == 3) {
bigdisplay.dlbtn.onRelease = function() {
getURL(canonpath+"downloads/coloringpage.pdf", "_blank");
closeDisplay();
};
} else if (id == 4) {
bigdisplay.dlbtn.onRelease = function() {
getURL(canonpath+"downloads/doorhanger.pdf", "_blank");
closeDisplay();
};
} else if (id == 5) {
bigdisplay.dlbtn.onRelease = function() {
getURL(canonpath+"downloads/wordsearch.pdf", "_blank");
closeDisplay();
};
} else if (id == 6) {
bigdisplay.dlbtn.onRelease = function() {
getURL(canonpath+"downloads/postcard.pdf", "_blank");
closeDisplay();
};
} else if (id == 7) {
bigdisplay.dlbtn.onRelease = function() {
getURL(canonpath+"downloads/screensaver.zip", "_blank");
closeDisplay();
};
}
}
function closeDisplay() {
fader.alphaTo(0,.5);
this._parent.bigdisplay.scaleTo(0,1);
bigdisplay.scaleTo(0,1);
enableAllBtns();
}
How To Load And Unload "clip"?
hi all
i am wondering if anyone knwo how to load a clip (run it and when it end) unload it when the clip is finished
for example
on 2advance.com they have the change scene thingy (the white flash thing whenever you click on the other scene)
i want to make just that
flash thingy
i made the clip but dont know how to unload it to make it continue the movie
if anyone know plz post or email me @ avefalco@msn.com
thankz all
Unload Pic In Gallery When Navigate To Other Scenes
Hi all,
I have downloaded a sample photo gallery for my personal website (total of 3 scenes)
scene 1 - home page
scene 2 - photo gallery
scene 3 - guestbook
in scene 2, when click at the thumb, the pic will be enlarged... but when i navigate to other scenes, eg scene 3, the enlarged pic remains on top of current scene...
how do i unload the pic???
thks in advance!!!
have uploaded the .fla & .swf files for your reference. (PhotoGalleryProb.zip)
http://members.lycos.co.uk/mandyless/TestDir/
Unload Clip With A Button In The Loaded Clip
Hi and thanks everybody for a great forum!
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) {
loader.percent.text = Math.round((loaded/total) * 100) + "%";
}
mclL.onLoadInit = function() {
loader._visible = false;
loader.percent.text = "";
}
mcl.addListener(mclL);
And this code on my button to load the clip into holder:
loadClipBtn.onRelease = function() {
loader._visible = true;
mcl.loadClip("start.swf",holder);
}
And then when my start.swf file has loaded into holder, I want to be able to remove it from holder, with a button placed on start.swf.
Ive tried this code for the button in start.swf, it doesnt work there, i think its something with the path?
removeClipBtn.onRelease = function() {
mcl.unloadClip(holder);
}
Help is Much appreciated
Thanks
Load, Unload, Load... Will The Movie Need To Download Again?
hi,
I have a quick question about loadMovie and unloadMove...
If I load an external movie (section 1), lets say its 200k, and then unload it when the user moves to another section (section 2).
When returning to section 1, when the external movie is called to load, will it need to redownload? Or is it saved in some type of cache area?
any help or a point to a resource would be great.
thanks,
alex
Load Play Unload Load Problem
Ok subject heading isn't the best but hey. Okay here is my question. I have created a small animation in Swish. Then created my site base in flash MX, now I want to combine the two. So I created a 3rd file again in flash. Now the swish is the intro (was easier to animate) so it is intro.swf at present. The site is site.swf and the 3rd file holding them together is base.swf.
Anywho, Base.swf loads, now I want it to load intro.swf, then when intro.swf finishes playing, I want site.swf to load.
base.swf has a empty mc in it called mtClip. I can get the intro.swf to load into this easy enough. But have no idea on how to get it to once finished playing unload and load site.swf.
Let me know if this should be directed at the Swish help section. But personally thought flash being more powerfull should have some function i can't find to deal with this problem of mine.
Thank heaps in advanced
Trent
Unload A Movie Clip Instance? Not Unload Movie
I'm new to this so probably doing it totally wrong, anyway....
I've go 4 buttons with 4 movie clip instances behind them. They are menu buttons eg About Us, contact Us, Products and Departments. When I click on "aboutus" it sets the mc "aboutus" playing which opens a tv screen graphic and then added the text for the profile of the company. This is fine. However, I now want to click on the "contactus" button which should unload or made the "aboutus" mc disappear and load the "contactus" tv screen and text contained in the "contactus" mc instance. Currently whenever I click on another button then just load on top of each other.
Any help appreciated.
List Box Load, Unload And Load
i try to make something with the list box and remote
it connect and retryve the values perfec but i got a problem and i can't figure it out
i have amny buttons A to Z
when I click A it load the value on the listbox
here is the AS for this button (A)
on (release) {
soNetcla = cfServer.getService("edespnet.cfc.titsel", this);
soNetcla.getabrtit_a();
btnServiceManager.useHandCursor = false;
// Evento p/ abreviado no combobox().
cbtitulo.removeAll();
function getabrtit_a_Result(result) {
for (var i = 0; i<result.items.length; i++) {
cbtitulo.addItem(result.items[i].NOM_tit);
}
}
function SelectItem() {
titulosel = cbtitulo.getSelectedItem().data;
}
}
*--- and when I click in B it unload the old values but doesn't load the new ones
here is the AS for button (B)
on (release) {
soNetcla = cfServer.getService("edespnet.cfc.titsel", this);
soNetcla.getabrtit_b();
btnServiceManager.useHandCursor = false;
// Evento p/ abreviado no combobox().
cbtitulo.removeAll();
function getabrtit_b_Result(result) {
for (var i = 0; i<result.items.length; i++) {
cbtitulo.replaceItemAt(result.items[i].NOM_tit);
}
}
}
If some one could help me I'll appreciate
TIA
molotophy
SWF Load Play To End Unload - Load Next SWF
Hello,
I'm new to this forum and joined because I have spent several hours researching this basic question but either I find info that is too old (eg. Flash 5) or too complex for what I want to do.
In Flash 8, using ActionScript 2.0 I would simply like to load an swf intro into a container movie - let it play to the end (how can I tell when the last frame is finished) and then unload it to purge the memory (as there are some large bitmaps and animation that won't play again) - then play the next swf - the actual main movie.
I don't want a preloader script and I don't want to activate these movies with buttons, which is what I'm coming up with when I search for this.
Thanks!
Charles
Clip Unload
Hi, im a little new to flash and ive been messing with it, ive seen a lot of flash sites where you open a clip when you press a button, and when you press another button, the clip unloads with an animation and then the other clip appears, and if you press another button, the second clip unloads with an animation too, how can you do this? i tried some different ways, but i cant do it! T_T
Can someone help me? i need to know how to unload clips with an animation.........T_T
Thanx in advance......
Possible To Unload A Clip From Within Itself?
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:
ActionScript Code:
// closeBox is just an MC sitting inside a section SWFcloseBox.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.
Help How Do I Load And Unload A .SWF
hi there
i have a main scene and have a button that loads a game which is a .swf i then want a button on this .swf that will return to the mail .swf ???
how do i do this i have tried unloadMovie but it does not work
thanks you
moo
Help How Do I Load And Unload A .SWF
hi there
i have a main scene and have a button that loads a game which is a .swf i then want a button on this .swf that will return to the mail .swf ???
how do i do this i have tried unloadMovie but it does not work
thanks you
moo
Load/Unload?
Well, i have my movie ... and the first frame alone is 471k. Thats just the background stuff, the basic buttons for the major sections, and I dont want to increase that filesize by adding anymore to the section.
Instead I want to load completely new SWF's ontop of it, complete with their own preloader and everything... so that i dont have to reload the 500k, and i can load the sections only as needed.
I guess the way to do this is with load/unload movie -- but i dont understand the syntax.
Ive gotten this far:
on (release) {loadMovie(main2.swf, ??, ??);
}
Can anyone help me out? And once i load it with that command -- how do I place it where i want it? and how do I unload it?
::sigh:: im really bad with actionscripting and the helpfiles are well.. confusing ;]
Thanks in advance
~DW~
Load And Unload
Hi there
is it possible, when I load a movie, to go to a specific label?
greetz, Robin
please answer at linckx@yahoo.com
Load/unload All?
ok, i know this is probably a very simple question that can be answered... but on my site (see below) i have a series of links...
ok, say i have 5 links
named 1,2,3,4 and 5...
each of those links loadsa new movie on a different layer... such as layer 1,2,3,4 and 5... but i want it so that if i click link 4... movie 4 opens... but when i click link 5... movie 4 (or any others that are open) close... how do i do this?
is there a simple bit of code that i can add to each button to comand this to happen?
also... ive seen some websites where you click a link and an animation loads up the page... then when you click a different part of the site... the animation seems to go backwards before opening a different section up... any ideas?
probably simple i know but ive not looked at this sort of thing before...
thanx for any help...
Load/unload
oke..i wanna know
if i need to load a swf...
ill prefer to load it in to a movieclip...
(dunno if this is correct)
loadMovie("http://www.website.com/swffile.swf", "_root.content.holder");
now... that works.... but then..when i from the menu..makes this
on (release){
unloadMovie("_root.content.holder");
}
then it unloads..well..but THEN...i CANNOT load a new SFW....is that because if unloaded the entire movieclip...????? ( ---> "_root.content.holder )
so...do i need to know, if i need to name (give instance name) that swf/clip i load...can i give it a instance name...so i can unload it correct...or how do i get around this problem
??
any help apreceated
Load&unload
Hi! I have a button A which says load movie1.But when e problem is when i clicked buttonB, load movie2 did not come out. I guess the problem has to do with load and unload. what should i put on buttonA to unload movie1 so that movie2 show when buttonB is clicked???
anyone oout there can explain ??
Load Unload?
Hi all,
Got a problem.
I have a few levels of movies. At any point or from any level I want the levels to be removed and only the very first level '0' to remain so that the navigation can begin again.
How can I achieve this? Is it via 'unloadmovie'? If so what is the actionscript?
I have managed to load the new levels on top of level '0'.
Cheers all.
Load / Unload
Hello World,
I am building a site that requires me to load movies on top of each other and unload them to avoid having one big movie.
The problem I have is that there are 9 movies and they get loaded in random order according to what the user wants to view, so how do I know which level to specify when I want to Unload a movie they have finished with.??
Thanks
MS
Load/unload ?
ok, so if i have a movie load from a file
Code:
on (release) {
loadMovie("shows.swf", "_root.mainWindow");
}
then i want another button to load a different movie,
Is there a way to make the first movie ... play backwards ...
(kinda like "crawl back in its hole")
notice how the menu system works on this site
http://www.24-7media.de
thanks in advance
-dan
Load And Unload
can someone explain the load and unload feature for me coz i'm going insane. I have created a movie and when you click on a button it should load a new movie . I have managed to do that but the buttons from "old" movie still works behind the new movie. I can unload the first movie but I want the the new one to "slide" over the old movie.
so my question is ... is possible to unload the the old movie after you have started playing the new one.
is it possible to do that?
How To Load & Unload
Hi,
After having problems with linking scenes as i explained in an earlier post, i have turned to trying to load /unload movies. I thought that would be a better "optimized" approach. Heres the code am using for the navigation menu:
on (release) {
unloadMovieNum(1);
loadMovieNum("intro.swf", 1);
}
The links are as follows (smaller files):
Intro-Movie
Intro-Fla
Menus-Movie
Menus-Fla
Contact-Movie
Contact-Fla
The problems am having are:
1) a clash between movies. The previous movie is not unloaded. I have attached the unload code on each code. So how do you unload a move? through the timeline or through the button?
2)I also have a fourth movie which loads before the above mentioned movies. How do you load movies from the time line?
I appreciate the help. I going through a wreck !
Cheers,
UrbanDev
Load.unload?
howdy.
i want to use a collection of thumbnails as individual buttons that will load a jpg into an empty mc using MovieClip.loadMovie(). easy enough. now i haven't put this together yet, but my question is, if a user loads a jpg into the empty mc from the thumbnail button, will the next jpg replace the old jpg when they click another thumbnail, or will the old jpg remain in its place and load the new one next to it? do i need to use unloadMovie()? to remove the previous jpg? but then how would i know which name to unload in the parentheses if the user will be selecting at random?
thanks.
Load.unload?
howdy.
i want to use a collection of thumbnails as individual buttons that will load a jpg into an empty mc using MovieClip.loadMovie(). easy enough. now i haven't put this together yet, but my question is, if a user loads a jpg into the empty mc from the thumbnail button, will the next jpg replace the old jpg when they click another thumbnail, or will the old jpg remain in its place and load the new one next to it? do i need to use unloadMovie()? to remove the previous jpg? but then how would i know which name to unload in the parentheses if the user will be selecting at random?
thanks.
Load/unload
first, how do i load my intro movie into my main movie?
second, I want to have a skip intro button in my intro. How do I code the button so that it will unload the intro movie and then goto frame label "main"?
Thanks
Load And Unload SWF
Hey,
This is the code I have so far, it opens the BonesInsideCastle.swf but it doesnt unload the first swf .... Any idea's ??
PHP Code:
stop();
Castle.addEventListener(MouseEvent.MOUSE_DOWN, mouseDown);
function mouseDown(event:MouseEvent):void {
if (event.target == Castle) {
var myrequest:URLRequest=new URLRequest("BonesInsideCastle.swf");
var myloader:Loader=new Loader();
myloader.load(myrequest);
stage.addChild(myloader); } }// and the unloadFunction function
var myloader:Loader=new Loader();
myloader.unload();
myloader.addEventListener("Unloadme", unloadFunction);
function unloadFunction(event:Event):void {
// event.target is the loader reference.. so cast it as Loader
Loader(event.currentTarget).unload(); }
Thanks in advance
Load Unload
I have a problem with the loading and reloading of an swf; this is my code:
var ldr:Loader = new Loader();
var url:String = "mio2.swf";
var urlReq:URLRequest = new URLRequest(url);
function goFullScreen(event:MouseEvent):void
{
stage.displayState = StageDisplayState.FULL_SCREEN;
mc.visible = false
}
mc.addEventListener(MouseEvent.CLICK,goFullScreen) ;
function fullScreenRedraw(event:FullScreenEvent):void
{
if (event.fullScreen)
{
ldr.load(urlReq);
addChild(ldr)
}
else
{
mc.visible = true
ldr.unload()
}
}
mc.stage.addEventListener(FullScreenEvent.FULL_SCR EEN, fullScreenRedraw);
i have a button that start a fullscreen, the button vanish and a .swf is loaded. If u exit from the fullscreen the button appear again. till now everything is ok!!!
THE PROBLEM:
If i click again the button the fullscreen starts but the .swf is not loaded again!
Please help me
Thanks!!!!
Help MC Load And Unload
I have a mc that uses actionscript to generate typewriter text (downloaded) see below:
The mc has three keyframes on it's timeline KF1, KF2 & KF3.
KF 1
text = "Natalie is very grateful to the forum members for any help they can provide";
max = length(text);
i = "1";
KF 2
i = Number(i)+1;
screen = substring(text, 1, i);
KF 3
if (Number(i)>Number(max)) {
stop();
} else {
gotoAndPlay(2);
}
I have placed an instance of the mc on my main timeline with a stop action and the following script to load the mc
stop();
_root.attachMovie("mc_one", "one", 2);
_root.one._x = 20;
_root.one._y = 20;
I am trying to build a tuturial and what I can't work out is how to unload the mc once it has finished playing and load a new mc in it's place so building the dialogue for the tutorial.
I am sooooo unworthy of your help but begging...
How To Load And Unload MC.
I am a complete idiot when it comes to flash but i am trying my best to get my head around it.
Basically i'm trying to make a site that contains internal movieclips (if this is not wise please tell me) since it's just a small site for my folio. I have a few button on the main stage and what i want to do is when clicked i want the movieclip to load. When i click a different button i want the existing clip to close and a new one appear. I know this is simple to you guys but i'm a dumb ass.
http://img.photobucket.com/albums/v4...mc-example.jpg
The file above is of what i want to do...load one file and close the other.
I don't know any where to begin writing the script. I assume i put the script on the MC right?
Anyway i hope you guys can help me out with a script that's you may have thanks.
Load And Unload
Hello,
I am a novice with flash and learning at this point. I have 4 files that I want to load and unload from my home page. What I want is when each of the buttons are clicked I want one page to load and the other replaced or unloaded.
Right now the pages load one on top of each other and they don't unload properly with this code. HELP!
I read some of the threads at the discussion forum and managed to figure this out, however the pages still overlap one on top of each other.
Would appreciate if someone can help me....
mcBackground.mc_home.buttonMode = true;
mcBackground.mc_slide.buttonMode = true;
mcBackground.mc_audio.buttonMode = true;
mcBackground.mc_quiz.buttonMode = true;
mcBackground.mc_contact.buttonMode = true;
//declare variables for container and loader
var container:Sprite = new Sprite();
var initrun:Boolean = true;
addChild(container);
//declare function init to hold the URL and load the page.
function init(s:String) {
var pageLdr:Loader = new Loader();
var pageURL:String = s;
var pageURLReq:URLRequest = new URLRequest(pageURL);
pageLdr.load(pageURLReq);
//calls the pageloaded to see if a page exists in the loader
pageLdr.contentLoaderInfo.addEventListener(Event.C OMPLETE, pageLoaded);
trace(pageLdr);
trace(pageURL);
}
//function pageLoaded checks to see if page exists int he container, if so(initRun is set to false), replaces with a blank container.
function pageLoaded(event:Event):void {
if (initrun == false) {
while(container.numChildren > 0)
container.removeChildAt(0);
}
initrun = false;
addChild(container);
container.addChild(event.target.content);
container.visible = true;
}
//add an event listener for each movieclip that will call the function to navigate based on the button clicked.
mcBackground.mc_home.addEventListener(MouseEvent.C LICK, homeLoad);
mcBackground.mc_slide.addEventListener(MouseEvent. CLICK, slideLoad);
mcBackground.mc_audio.addEventListener(MouseEvent. CLICK, audioLoad);
mcBackground.mc_quiz.addEventListener(MouseEvent.C LICK, quizLoad);
mcBackground.mc_contact.addEventListener(MouseEven t.CLICK, contactLoad);
//Declare a function to unload the old page and load the new page based on the button clicked.
function homeLoad(e:MouseEvent):void {
init("FlashSiteFinal_Ver2.swf");
}
function slideLoad(e:MouseEvent):void {
init("SlideShow.swf");
}
function audioLoad(e:MouseEvent):void {
init("AudioPlayerFinal.swf");
}
function quizLoad(e:MouseEvent):void {
init("quiz.swf");
}
function contactLoad(e:MouseEvent):void {
init("contact.swf");
}
Load And Unload Swf
i have a flash site with three buttons i want each to load a swf but unload whatever was previous. i know how in as2 but i am lost in as3
//code//
// Btn1 Over function
function btn1Over(event:MouseEvent):void {
btn1.gotoAndPlay("over"); // go into btn1 movieclip and play the over frame label
}
// Btn1 Out function
function btn1Out(event:MouseEvent):void {
btn1.gotoAndPlay("out");// go into btn1 movieclip and play the out frame label
}
// Btn1 listeners
btn1.addEventListener(MouseEvent.ROLL_OVER, btn1Over);
btn1.addEventListener(MouseEvent.ROLL_OUT, btn1Out);
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Btn2 Over function
function btn2Over(event:MouseEvent):void {
btn2.gotoAndPlay("over"); // go into btn2 movieclip and play the over frame label
}
// Btn2 Out function
function btn2Out(event:MouseEvent):void {
btn2.gotoAndPlay("out"); // go into btn2 movieclip and play the out frame label
}
// Btn2 listeners
btn2.addEventListener(MouseEvent.ROLL_OVER, btn2Over);
btn2.addEventListener(MouseEvent.ROLL_OUT, btn2Out);
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Btn3 Over function
function btn3Over(event:MouseEvent):void {
btn3.gotoAndPlay("over"); // go into btn2 movieclip and play the over frame label
}
// Btn3 Out function
function btn3Out(event:MouseEvent):void {
btn3.gotoAndPlay("out"); // go into btn2 movieclip and play the out frame label
}
// Btn2 listeners
btn3.addEventListener(MouseEvent.ROLL_OVER, btn3Over);
btn3.addEventListener(MouseEvent.ROLL_OUT, btn3Out);
//end code//
Load And Unload Swf
i am new to as3 and cannot figure how to load and unload swf....each menu should load a swf
Load/unload
When I load into targets. Do I have to unload the loaded .swf when I load a new in the same target MC?
Load And Unload
Hi everyone,
I have this code on top of my movieclip and it seems to only work if I make it a button. Can someone please help!?!?
on (release) {
if (_root.currMovie == undefined) {
_root.currMovie = "section2";
container2.loadMovie("section2.swf");
} else if (_root.currMovie != "section2") {
if (container2._currentframe>= container2.midframe) {
_root.currMovie = "section2";
container2.play();
}
}
}
How? Unload And Then Load Another Swf
I have a project with several chapters that I want to select from a main menu. I want each chapter to replace the previous on the stage. My problem is I can unload the movie (core-menu.swf) on the stage, but then the next movie (core-part1.swf) does not display.
If I take the following unloading code out, the 2nd movie displays over top of the menu.
Here's what the code looks like:
I am starting with an empty stage and calling the main menu with:
var cpr_container:MovieClip = createEmptyMovieClip("cpr_container", 0);
var mcLoader:MovieClipLoader = new MovieClipLoader();
mcLoader.addListener(this);
mcLoader.loadClip("./core-menu.swf", cpr_container);
The menu (core-menu.swf) is then displayed. Selecting a button performs a
this.gotoAndPlay("2");
to go to frame 2, which contains the following code:
stop();
unloadMovieNum(0);
var cpr_container:MovieClip = createEmptyMovieClip("cpr_container", 1);
var mcLoader:MovieClipLoader = new MovieClipLoader();
mcLoader.addListener(this);
mcLoader.loadClip("./core-part1.swf", cpr_container);
Again, if I take out the unloadMovieNum(0); code, the second movie loads over top of the menu, but with unloadMovieNum(0); the second movie never loads.
Any idea?
Thanks!
- C
Help With Load/Unload
Okay, here's what I've got going on:
I've got a page in this site I'm doing that has a menu of web sites that I want people to be able to click on and view screen shots, etc. When you first enter the page, the menu drops down and the first site on the list loads into a placeholder movie clip called "wsholder" and is set into position. There's an arrow underneath of this screenshot that takes you to the second one and you also have the choice of going back to the previous one. (This is a movie clip in this swf). And yeah!! it works! :)
My question is, how do I unload this first swf file that's in this movie clip "wsholder" and load the next web site in it when you click on the appropriate button? I tried unloading "wsholder" and loading the next swf but it didn't work. Apparently once the first web site loads into "wsholder" it's then considered a "parent" cos this is how I had to address it to get it to go to the next screenshot. (Hope this makes sense.)
To get a better idea of what I'm talking about the URL is http://www.baymed.com/baymedia-new2. Once you get to the homepage click on "portfolio" and then "web sites" and you'll see what I'm referring to.
Also, please note this site is still a "work in progress". :)
Thanks for your help from all you Flash wizards!
Rhiannon
Unload Before Load?
Im in the habit of unloading a level before I re-populate it. I realize that only one movie can occupy a level at the same time so Im wondering if this is necessary for memory management or anything. Thanks!
unloadMovieNum("1");
loadMovieNum(playOrder[whereAt], "1");
Movie Clip Unload?
hey there.
how would i make a movie clip unload itself after a period of time?
say i have a loop that generates duplicate MCs....i want only 25 on screen at one time....so how would i put together the code to unload...uh... _leveli-25? i know that cant be the correct syntax. any ideas?
Unload A Moive Clip
hi there,
how to unload a moive clip by action script? (not for an external swf file)
pls check the fla file here...
- I want to click the buttom of unload to unload the "MC_1"
http://communities.msn.com/mingcheun...nts/unload.fla
Thanks a lot
How To Unload Movie Clip?
Hi there!
im not an expert but i am working in expert mode as funny enough
it seems easier. Anyhow my situation is that I have a main site swf and need to load like 6 seperate external swfs within to the main swf to specific target areas which are invisible movie clips. I am using the below code and it works fine:
on(release) {
loadMovie("wav1.swf",_root.dropZone);
}
But what am i doing wrong when i am trying to unload the current external wav1.swf.as its not unloading.Basically what is the opposite of the above code that i should be using to unload a movie correctly?
Many thanks for your help!
Chris
Unload A Movie Clip?
Hi, you probably think this is simple but Im having problems.
I have a main movie with an empty movie clip.
When I click a button an external flash movie loads into the empty target movietarget. So far so good.
I want to insert a close button into the external movie clip (not the main movie), so when it is clicked the loaded clip disappears or unloads.
Can you please help?????
Unload A Movie Clip?
Hi, you probably think this is simple but Im having problems.
I have a main movie with an empty movie clip.
When I click a button an external flash movie loads into the empty target movietarget. So far so good.
I want to insert a close button into the external movie clip (not the main movie), so when it is clicked the loaded clip disappears or unloads.
Can you please help?????
|