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......
FlashKit > Flash Help > Flash Newbies
Posted on: 10-28-2005, 09:55 PM
View Complete Forum Thread with Replies
Sponsored Links:
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
View Replies !
View Related
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.
View Replies !
View Related
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.
View Replies !
View Related
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?
View Replies !
View Related
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
View Replies !
View Related
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
View Replies !
View Related
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?????
View Replies !
View Related
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?????
View Replies !
View Related
[CS3] Movie Clip That Will Unload Itself
hello,
i have a button that loads a external MC, and also makes a invisible button
appear so that when you rollOut from that MC, you will, rollOver the button
and the mc unloads.
what i want instead, is a button that unloads a MC on rollOver, but...
from inside the MC. A MC that will unload itself.
is that possible?
View Replies !
View Related
Unload A SWF From A Movie Clip?
(I'm a beginner at AS 3.0, so please take it easy on me)
I'm trying to load a SWF into a movie clip. I've got that working, but I can't seem to unload the first SWF when I load another SWF into the same clip.
Here's the code I've been using to load the initial SWF:
Code:
buttonName.addEventListener(MouseEvent.CLICK, functionName);
function functionName(event:MouseEvent){
var imageRequest:URLRequest = new URLRequest("movie.swf");
var imageLoader:Loader = new Loader();
imageLoader.load(imageRequest);
mcMarker.addChild(imageLoader);
}
I tried to use the same code for another SWF, but it just loaded it on top of the first.
Then I tried with two MC placeholders and used:
mcMarker.removeChild(imageLoader);
That gave me an error.
How can I get one SWF to disappear when the other loads?
Thanks!
View Replies !
View Related
Unload A SWF From A Movie Clip?
(I'm a beginner at AS 3.0, so please take it easy on me)
I'm trying to load a SWF into a movie clip. I've got that working, but I can't seem to unload the first SWF when I load another SWF into the same clip.
Here's the code I've been using to load the initial SWF:
------------------------------
buttonNameDog.addEventListener(MouseEvent.CLICK, functionName);
function functionName(event:MouseEvent){
var imageRequest:URLRequest = new URLRequest("movie.swf");
var imageLoader:Loader = new Loader();
imageLoader.load(imageRequest);
mcMarker.addChild(imageLoader);
}
----------------------
I tried to use the same code, modified to load another another SWF to the same place holder, but it just loaded it on top of the first.
Then I tried with two MC placeholders and used:
mcMarker.removeChild(imageLoader);
That gave me an error.
How can I get one SWF to disappear when the other loads?
Thanks!
View Replies !
View Related
Can't Unload Movie Clip :(
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!
View Replies !
View Related
Unload Movie Clip
Hi all,
I used the tutorial in this site for the "load random movieclip"
The code looks like this:
-------------------------------------------------------------------------
filename = ["Image00.swf", "Image00.swf", "Image00.swf", "Image00.swf"];
path = "swf_files/";
i = filename.length;
k = Math.floor(Math.random()*i);
loadMovie(path+filename[k], movieTarget);
-------------------------------------------------------------------------
It works prefectly fine, but now my question is, I want to be able to unload the randomly loaded swf. I try to make a button and assigned the unloadMovie script to it
and I've this:
on(release){
unloadMovie(movieTarget);
}
but it doesn't work, does anyone have any ideas?
I tried to put "movieTarget" or even 'movieTarget' but still doesn't work. I would need help for this.
Thanks in advance
View Replies !
View Related
Unload From Movie Clip - Help
I want to unload from a movie clip - I've load an external .swf file into a movie clip, with an event handler (button) I want to unload the loaded the movie and then move on to a frame number in the main time line .root and play.
View Replies !
View Related
Unload Movie Clip HELP
hello all
i need help please.
i made a mini site with 5 buttens.
if i press on them upside down its unload the movie clip good.
if i press on them randomly every movie clip is coming above the one below.
so i need your to fix it.
in addition the test case, it's a sepose to be a game in a new scene (2)
and i can't connect it.
i appreciate to get a new FLA.
tnx
DB
here is the link:
http://archiv.to/?Module=Details&Has...E4815C6498954B
View Replies !
View Related
Can't Unload Movie Clip :(
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!
View Replies !
View Related
Unload Movie Clip
I have a movie clip that loads a nav bar by fading it in, I want to be able to load another movie clip in the same position but I want the nav bar to fade out first before the new clip moves in. can anyone help.
Thank You.
Chivo01
View Replies !
View Related
Unload Movie Clip Problem
On my current site I am using the loadmovie action to load a seperate swf file which will contain examples of clients work.
I load it into a level (5 for example)
The problem is, that I would like to be able to close this loaded movie down (unload movie) and tell the main movie to go to a certain frame in the original swf file.
View Replies !
View Related
Unload/remove Movie Clip - Please HELP
I load a movie using the following.
loadMovieNum("movieClip.swf",990)
Later, I want to remove the movie and all the movies that were 'attached' to this movie clip via the unload.
I've tried various forms but nothing works like I want it to.
if I do a this.removeMovieClip() then it removes the part where the button is attached, as expect (note: the MC with the 'remove' button is attached to the _level990 movie after it is loaded.
I try _parent.removeMovieClip(), _level990.removeMovieClip() neither one works.
HELP!
View Replies !
View Related
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
View Replies !
View Related
Unload Movie Clip Help Needed
Howdie all readers.
Just needing some quick help
how can i make a movie clip remove itself from the main stage.
l'm needing to place an action in the last frame of the movie clip so it will clear itself from the stage..
thanks in advance.
View Replies !
View Related
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!
View Replies !
View Related
On Release Unload Movie Clip
I have a movie clip that creates confetti when you get to a frame in my movie.
Here is the action that starts the confetti:
numConfetti = 200;
for (i=2; i<=numConfetti; i++) {
confetti1.duplicateMovieClip("confetti"+i, i+100);
}
on the layer beneath that action I have my movie clip with the following actionscript:
onClipEvent (load) {
function reset() {
//generate the random color
R = random(256);
G = random(256);
B = random(256);
colorHexString = R.toString(16)+G.toString(16)+B.toString(16);
colorHex = parseInt(colorHexString, 16);
hairColor = new Color(this);
hairColor.setRGB(colorHex);
//generates random movemtn onscreen
xSpeed = random(3)+1;
ySpeed = (Math.random()+1)*random(5)+1;
if (ySpeed == 1) {
ySpeed = (Math.random()+1)*random(5)+1;
}
direction = random(2)+1;
//randomly places confetti at the top of the screen
position = random(550)+1;
_x = position;
_y = 0;
}
reset();
}
onClipEvent (enterFrame) {
//makes the confetti fall
_y += ySpeed;
directionChange = random(10)+1;
if (directionChange == 1) {
direction = random(2)+1;
xSpeed = random(3)+1;
}
if (direction == 1) {
_x += xSpeed;
}
if (direction == 2) {
_x -= xSpeed;
}
if (_y>400) {
reset();
}
}
This all works fine.
On this frame I have a button to jump back to a previous frame. I need the movie clip of the confetti to unload on the release but its not!! I must be missing something! Here is the actionscript I have on that button:
on (release) {confetti1.unloadMovie()
gotoAndPlay ("turn6b"); stopAllSounds();
}
View Replies !
View Related
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
View Replies !
View Related
Unload Clip And Show Buttons
I have a movie that loads another video. When it goes to video by hitting button
below I can hide buttons underneath.
When I unload the movie, I need the buttons to show up again and clickable.
I added the onEnterFrame, but makes no difference.
Can someone help as to how I can bring the buttons back when movie that was loaded is unloaded?
script........
onEnterFrame(_root.VideoBtn.enabled._visible = true);
VideoBtn.onRelease = function(){
loadMovieNum("video.swf", 10);
VideoBtn._visible = false;
};
Thank you in advance.
View Replies !
View Related
Unload Empty Movie Clip
Hi,
I'm trying to unload an empty movie clip in an external swf in the same directory as the main. I'm using this code, but I know something is wrong.
on (press) {
unloadMovie("c_scroll.swf.loader");
}
Thanks
View Replies !
View Related
Problem 2 Target Second Movie In Same Clip Unload First..?
my other problem is
(i am using targetclips to load movies for the first time, i always used levels)
i have:
A main movie that contains "targetbox", a clip in which a new movie get loaded into
well in this new movie, there's also a button, if this button is pushed another, new movie, has to get loaded into the target box that is on the "main" movie
this code
on(release){
container.loadMovie("movies.swf");
}
doesn't do anything...
help
View Replies !
View Related
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!
View Replies !
View Related
[MX04] Movie Clip Unload Issue
Does unloadmovie remove the clip? Is there a clearmovie function or something that will unload the movie without removing with clip? If you want to see my problem then visit www.hummingman.com and select the da button and then click on the movies to remove the image and the text and then select the da button again! -- see... nothing!
any help rewarded with humming lessons!
View Replies !
View Related
Automatic Unload After Movie Clip Finished?
hello.
I would like to load a movie test1.swf by clicking a button located in scene 1 of my main movie main.swf so i use:
on (release) {
loadMovieNum("test1.swf", 1);}
Then I want once this loaded movie in scene 1 is finished to automatically switch to scene 2. and do the same again.
The movie I am loading is a test1.swf file is also loading an external .flv. Maybe putting the code inside this file will do but what code?
there is nothing like a button or action loacated in test1.swf with an action such as gotoAndPlay("Scene 2", 1); of the main.swf?
Do i need to use a timer or time interval to operate the automatic switch? if yes how can I do that? or is there something simpler, I use flash MX ot flash mx2004.
Thanks a lot for help
kcabe
View Replies !
View Related
Wowza I Can't Unload My Opening Movie Clip
Hello all. I am building my first ever Flash site and am having trouble with the opening page. In the first page I have a navigation bar underneath a box. In the box there is the "welcome.swf" describing what the site is for etc. But when I click on a link to bring up another mc, they just load over and you can see the text underneath. Now, I could take the easy way out and just put a background on every mc to cover up the text underneath, but, I would like to know how to have the movie clip "welcome" start out in that box and how to unload it. I'm using possibly the simplest types of action script I can to do so. No parent or root tags, for example: on(release) {
mc_1.loadMovie ("links.swf");
}
and that's it for everyone of the links in the nav bar. And everybody seems to mention mc's on the same "level", I have no idea what that means... so, could anyone help me out and explain a few things? Thanks!
View Replies !
View Related
Disable Or Unload Movie Clip Features
Hello. I'm working on a project that has 2 movieclip containers. They load external content, and they swap their depths to show either content. When a movieclip that has buttons is behind the other movieclip it still lets the user click on what is behind. How can I unload the content of the movieclip that is behind or disable all its buttons so this doesn't occur?
View Replies !
View Related
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!
View Replies !
View Related
Help To Auto Unload A Movie Clip That Is Playing An Flv.
I'm looking for help to unload a movie clip automatically after the flv file in the clip is finished playing. I'm just using "loadMovie" to start the clip. The clip that contains the flv(Paul.swf) uses the flv playback component. I can unload the clip with a button but I need it to unload on its own upon completion of the flv if possible.
stop();
loadMovie("Paul.swf", mcPaul);
btnStopMovie.onRelease = function() {
mcPaul.unloadMovie("Paul.swf", mcPaul)
}
Any advice will be greatly appreciated.
View Replies !
View Related
Unload Movie Clip Doesnt Work When External Swf
I have my main movie. I load about.swf into target load.
well in my about.swf I have a movie clip that is attached to the stage when a button is clicked. In that particular movie clip I have a close button that has the code
on (release) {
_root.attachMC.unloadMovie();
}
Well that close button works fine when the swf is by itself, however when loaded into the main movie it doesnt work. I would assume becuase its saying _root is the main movie now.
What is another way around unattaching movieclip?
Movie
about.swf
attachedMC
View Replies !
View Related
Listening For A Movie Clip To Unload - Check My Logic
Hey folks,
I'm still relatively new at writing actionscript, so hear me out on what I'm trying to do and see if it makes sense.
I'm creating a module piece where I have one master .swf that calls all the other .swf files into it (by creating an empty movie clip and then loading the .swf into it). The loaded .swf will cover the entire stage and will have an intro, functionality, and an outro - the outro function will occur when an onPress event occurs to a movie clip instance. What I was planning on doing was having that outro function unload the movie at the _root and change the value of a global variable to the name of the next .swf that is going to be loaded. I would have a listener in the master .swf that would listen for the movieclip to unload, then load the new .swf.
Does that make sense? If so is there a class or function that broadcasts that a movieclip has unloaded? Or am I barking up the wrong tree and making this harder than it needs to be? Any help, or links to tutorials or other sites that could help will be very much appreciated.
Thanks!
View Replies !
View Related
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]
View Replies !
View Related
[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();
}
View Replies !
View Related
Unload A Movie Clip As The Play Head Jumps To Another Frame
Hey everyone:
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)
{
theScene.unloadMovie();
}
This does infact unload the movie if I put it in the keyframe with the code that creates it (on Frame 60), but it will not unload it upon moving the play head to another Frame, i.e. clicking a button to jump that movie clip to Frame 50, 70, 100... whatever.
I added a trace(this._currentframe), however, it will only trace Frame 1, and never runs again, how do I get it to run everytime the playhead moves?
Thanks,
Adam
View Replies !
View Related
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();
}
View Replies !
View Related
Unload A Movie Clip Within A Movie Clip
Hi all,
I am trying to unload a movie clip that is on a layer in a movie clip. After clicking on a button, I would like the movie to go back to the previous menu without playing a couple of movie clips that's in the main movie clip.
So at the end of my movie clip I have:
_parent.gotoAndPlay("resources"); // resources is the frame name in the main movie clip where I would like the movie to restart from
_parent.vhost_mc.unloadMovie("vhost_mc"); //vhost_mc is a movie clip in the main movie clip that I want to unload
_parent.videoScreen_mc.unloadMovie();
But the videoScreen_mc doesn't unload. The main movie clip starts with the videoScreen and I've actually deleted the frames of videoScreen_mc where the "resources" frame starts, but still it appears.
I've even tried _parent.videoScreen_mc._visible = false; but nothing works! I've tried createEmptyMovieClip, but since the videoScreen_mc is on the main timeline, I don't think it works. I've even tried putting this function on the "resources" frame:
onEnterFrame = function() {
play();
vhost_mc.unloadMovie("vhost_mc");
vhost_mc.removeMovieClip();
this.videoScreen_mc.unloadMovie();
this.videoScreen_mc.removeMovieClip();
this.mask._visible = false;
}
But when I do this, the play button loops starting at the "resources" frame.
Essentially I would like the main movie clip to play without certain movie clips that's included within the main movie clip.
I hope I'm making sense. Please help, I've been at this for days!
View Replies !
View Related
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
View Replies !
View Related
Unload Movie In Movie Clip
I've been using empty movie clips placed on the stage to load .swfs for a while. The code style I use is usually:
PHP Code:
_root.movieclipcontainer.loadMovie("nameofmovie.swf");
This time, I wanted to unload the movie in the movie clip so that there would be a blank space in the main .swf. I tried:
PHP Code:
_root.movieclipcontainer.unloadMovie
but it didn't work. It looked like it unloaded the main movie. As a work around, I put in
PHP Code:
_root.movieclipcontainer.loadMovie("fakenameofmoviethatdoesn'texit.swf")
Since Flash couldn't find the fake movie, the effect turned out to be the same, but I want to know if there is a better way to get the same effect.
View Replies !
View Related
HitTest A Clip On Main Timeline With Clip Inside A Clip
I've got a specific (smaller) area that I want to be what makes the collision, not the whole movie clip, so I added a layer with a movie clip on it (inside the main movie clip), gave it an instance name then put this on the clip I want it to collide with:
onClipEvent (enterFrame) {
if (_rider.riderHit.hitTest(this)) {
_root.gotoAndPlay("leftWipeOut");
}
}
"rider" is the main movie clip
"riderHit" is the instance name of the clip inside the main clip
Is what I'm wanting possible. Not sure why it's not working.
Thanks for looking. Hope there's enough information here.
jorge
View Replies !
View Related
Not An UNLOAD
HI Flashs
I have this big (4 me) problem with my homepage. It is when i try to load another flash.swf from the ones runnin' its like the ones running not disaperes. Its running in the back. An the .txt can not display on my scroller in the new load. I can tell you that this is not working:
on (release) {
loadMovieNum ("menu_eng.swf", 1);
}
** this is on a grafh that is dif. as a button **
From Denmark
Tony.
View Replies !
View Related
Unload Mc
If I have a MC with buttons within it, I click on lets say(services) to load another MC within it, then I decide to click on (clients) , how do I make the (services) MC unload and the (clients) MC appear?
View Replies !
View Related
Ok, How Do I Unload It?
I figured out how to load a clip from a remote source and place it where I want with this code:
this.createEmptyMovieClip("mc",2);
mc.loadMovie("movie.swf");
this.onLoad = function() {
setProperty("mc", _x, 100);
setProperty("mc", _y, 100);
};
stop();
How do I get the clip to unload once it's done playing?
[Edited by willi-jay on 07-11-2002 at 12:07 PM]
View Replies !
View Related
|