Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash








Removing MC's


If I have a number of MC's loaded on the stage with dynamic cotent. How do I remove all the MC's. I wrote what I assumed was correct at the bottom but it doesn't seem to work.


Code:
function yelGallery () {
for (var i = 100; i < 125; i++) {
this.attachMovie ("paintingMC", "paintingMC" + i, i);
this.myMCL.loadClip ("Galleries/forSale/tn_forSale/tn_painting" + i + ".jpg", this["paintingMC" + i].painting);
}
}
pressThis.onPress = function () {
removeMovieClip (this["paintingMC" + i]);
};




ActionScript.org Forums > ActionScript Forums Group > ActionScript 2.0
Posted on: 05-19-2006, 12:02 AM


View Complete Forum Thread with Replies

Sponsored Links:

Removing Attached Movie And Resetting/removing All The Variables It Set?
I have attachMovie() that calls up an item with a Class that extends movie clip, it gets refresh but it is not removing the variables it set earlier and it's giving me a headache.

Is there a way to remove it and ALL the variables contained within?

Thanks!

View Replies !    View Related
Removing MC's
I have a MC at the root that gets duplicated nine times.
When I try to remove the MC's they all disappear except the originator. Anybody had this problem?

View Replies !    View Related
Removing An Mc
During my movie I use the 'attachMovie' function to add new mc's. I also have the ability to delete these mc's, and do so using the 'removeMovieClip' function. Now, everything works fine, visually, so what's the problem? Well when I'm running in debug mode, and I use 'removeMovieClip' the details of the mc still show up in the debug window although the mc has no properties (but the mc's inside the main mc, do still have properties).

Now is this mc actually being removed, or is something else going on?

Cheers for any help

Mat

View Replies !    View Related
Removing An Mc
i have a button when clicked it attaches a mc to another mc.

then i have button2 which when clicked should remove the attached mc.

for me it is not working. i am wondering if my syntax is wrong?

on (press) {
_parent.emptySundae.emptyTopping.removeMovieClip(" ras");
}


or rather what exactly goes in the ()? the identifier name, the level, or the instance name the the movie is attached to?

all help will be greatly appreciated. thanks much

View Replies !    View Related
Removing MC
Hello,
I have a problem with a flash movie.
I have a MC with buttons and stuff playing when another button is clicked. The problem is that I need to remove the MC when the button inside is clicked. How do i go about doing this?

THx in advance.

View Replies !    View Related
Removing Mc
ok i have a button that attaaches a mc
i use this script

on (release) {
_root.attachMovie("statpopupMC", "statpopupMC", 2);
}

then in that movie clip it attaches i have a button to remove it i use the script

on (release) {
_root.removeMovieClip(_root.statpopupMC);
}

but it doesnt remove the movie clip what i do wrong?

View Replies !    View Related
Removing MC
I've got a flash movie with 2 frames on the main timeline. The first frame is a preloader, the second holds the site content. In that second frame I've got an MC sitting on the stage that plays when F2 loads. I have buttons embedded in another movieclip that when pressed, I want them to delete the MC that plays on the main stage. I've tried removeMovieClip and unloadMovie with poor results. The buttons are animated MC's, here's the code I'm using on them.


Code:
home_mc.onRelease = function() {
_root[_root.current].gotoAndPlay(37);
_root.newMovie = "home";
if (_root.current == undefined) {
_root.current = "home";
_root[_root.current].gotoAndPlay(2);
}
_root.shold.unloadMovie();
home_mc.enabled = false;
};
The bold is where I added my unloadMovie line, can anyone help me sort this out?

Thank you kindly,

Phil

View Replies !    View Related
Removing Old Mc's
Im working on a small game just to learn some stuff im planning on putting in my engine im working on. anyway, its a jet game and u can shoot missiles. when the missile launches i have code wich duplicates mc's over and over again to make a streak of smoke. the only problem is after they fade out thier still on the stage and things start to REALLY slowdown after about 8 missiles have been launched.
(thats 17 mc per missile for smoke which ends up being alot of mc on stage). how can i get rid of these movie clips AFTER they finish thier animation.

View Replies !    View Related
Removing %20 From XML
Hello
I am currently using the FlashSQL Component and it works very well.

I have one problem that i need help with which is NOT a component issue.

The component returns the SQL as XML.

I then break up the XML and display it in a DataGrid.

My problem is - I always get %20 where ever there are spaces in incoming data. Is there a way of removing the %20 from being displayed??

Your help would be greatly appreciated.

Scott

View Replies !    View Related
Removing Swf
Hi, I'm trying to use a z-layer on a website to load a flash over my page. Is there any way to REMOVE the flash from the page after it has finished? I've tried using the unloadMovie(); command but that still keeps the flash on the page. The reason I need the flash completely gone is because users can't highlight/click anything under the flash while it's loaded. Here is the site with the flash just being unloaded (wait for the top intro to finish; the stacked flash/html will load in a pink table)
http://bryanathomas.com/ecs/2/
Thanks.

View Replies !    View Related
Removing MC
What's an easy way to automatically remove MC's after they complete?

I've been doing it by labeling the last frame of the MC and using an ENTER_FRAME event to remove it after gets there, but that seems inefficient...

View Replies !    View Related
Removing The SWF Box In IE
I am having an issue with IE. I need some code to tell the IE browser to automatically focus on the SWF when the page loads. That box around the SWF only happens in IE and I hate it. On my client’s site, www.shirleywilliamsart.com, users have to click the SWF to activate the menu. It is confusing to them because they think they have to double-click the first menu item they select, but none thereafter. Does anyone have code I can put in the HTML doc that will set the focus on the SWF when the page loads, or shortly thereafter?





























Edited: 08/05/2007 at 09:29:03 PM by WebMaMa1

View Replies !    View Related
Removing SWF
Hi, I'm trying to use a z-layer on a website to load a flash over my page. Is there any way to REMOVE the flash from the page after it has finished? I've tried using the unloadMovie(); command but that still keeps the flash on the page, just not loaded. The reason I need the flash completely gone is because users can't highlight/click anything under the flash while it's loaded. Here is the site with the flash just being unloaded (wait for the top intro to finish; the stacked flash/html will load in a pink table)
http://bryanathomas.com/ecs/2/
Thanks.

View Replies !    View Related
Removing A MC
I hate to ask somthing like this but my searchs keep coming up empty and I'm clean out of ideas.

How can I remove MCs?

View Replies !    View Related
Removing XML
Hello,
I'm using the slideshow gallery with thumbs and a combo box to load different XML pages into the gallery.

The problem I'm having is that the first XML doc. has 11 nodes and the second has 12. when the second XML page is loaded the last thumbnail is #12 in the first XML file (in other words the thumbnails go 1 - 11, and then an extra thumbnail appears from another XML file). when you click on the thumbnail it does not show the larger version. but I can't get rid of it.

I think I need some code to remove the last loaded XML doc before i load another. If anyone knows anything about this any help would be appreciated.

Thanks.

View Replies !    View Related
Removing Self
hello,
I have a movieclip in flash cs3 that I would like to remove once it hits a certain frame. So what i did was put a keyframe at the end of the animation of the movieclip and in the actions panel i put MovieClip(parent).removeChild(this);
However sometimes i get a null pointer reference error when I run that. So what would be the best way for me to remove the object once its done animating?

thanks
-mad_man

View Replies !    View Related
Removing MCs'
the problem is quite simple but nothing seems to work. i have 4 movie clips that are used as containers for seperately loaded swfs'. I need them all to dissapear onmouseover any of them and then reappear onmouseout. ive tried unloading the movies, removemovieclip ect... nothing seems to work.

View Replies !    View Related
Removing A SWF Within A SWF
So I am still pretty new to AS3 and I am trying to put together a site. I have most of the functions working properly except one and this is the issue. I have a main SWF and inside this SWF i have a button, that when clicked, loads a image gallery SWF. The problem I am having is inside that gallery swf is a close button and when i click the close button to remove the swf, it doesnt work. I have looked through several forums without success. Does anyone know how to remove or close out a SWF with in a SWF? here is the code I am currently using in the gallery swf to close it out...

please help me I you have a solution!

Thanks.

Code:

close_btn.addEventListener(MouseEvent.CLICK,closeWindow);

function closeWindow(e:MouseEvent):void
{
   this.parent.removeChild(this);
}

View Replies !    View Related
Removing Spaces
hi i'm mailing a form out of flash and need to format it to make it more readable.
all multiple spaces are automatically removed when the variables are mailed

does anyone know how i can stop

"fred fred"
turning into
"fred fred"
is there a character or something like a nbsp that i can use.


arrrgh i just previewed the post and it happens here too

i want to stop
"fred__________________fred" (substite " " for "_")
turning into
"fred fred"

thanks

View Replies !    View Related
Removing Menu?
How can i remove the menu when you right click on an SWF?

I have tried:

fscommand ("showmenu", "false");

And it doesn't like it or work.

Thanks

View Replies !    View Related
Removing Multiple MC's At Once
Hello folks,

I've a problem with movie clips at the moment. I have multiple clips in a scene (which I'm using to build a windows style menu system), except for most of the time they are hidden to the viewer outside the screen. I call them in with a bit of script like this:

on (rollOver) {
setProperty ("/animation_menu", _x, "278");
}
on (rollOver) {
setProperty ("/animation_menu", _y, "36");
}

Then on mouse out i tell it to go back to somewhere far outside the screen, but I also have to tell every other clip to get out of the way too.

My problem is however that I have SO many movie clips now, and I'm ending up with having to write far to much actionscript to get my menus to appear and disappear. Is there any way I can use actionscript to do something like

remove all of the movies in this scene no matter what the name is, EXCEPT for this one which will stay here?

I'd really appreciate anyone's insight on this becuase it could save me a tremendous amount of time

Judder

View Replies !    View Related
Removing A VALUE From An Array
Hey folks,

I'm building a game in which the user chooses his 'player' from a list of 100 available characters... and then the other 15 players (controlled by Flash) are chosen randomly from the same list. Each character has specific attributes etc.

Here's the problem - I can (thanks to help from ya'll) now randomly choose 16 characters from a list of 100, and apply their attributes accordingly (for example, if player 5 is 'Dave,' player 5's strength is whatever Dave's strength is)... but I want the user to be able to choose his/her character FIRST. How do I then exclude Flash from choosing the character the user chose? For example, if the user chooses character 5, how do I prevent the Flash from chosing character 5 when it randomly generates the other players?

Here's my code:

******
player1num = (whatever the hell the user chooses!)

//
function getUniqueRandom (number) {
var numberlist = new array();
for (count=1; count<=number; count++) {
numberlist[count] = count;
}
this.randomlist = new array();
for (count=numberlist.length-1; count>0; count--) {
picked = math.floor(math.Random()*count)+1;
this.randomlist[count-1] = numberlist[picked];
numberlist[picked] = numberlist[count];
}
return randomlist;
}
x = new getUniqueRandom(100);
player2num = x.randomlist[2];
player3num = x.randomlist[3];
player4num = x.randomlist[4];
player5num = x.randomlist[5];
player6num = x.randomlist[6];
player7num = x.randomlist[7];
player8num = x.randomlist[8];
player9num = x.randomlist[9];
player10num = x.randomlist[10];
player11num = x.randomlist[11];
player12num = x.randomlist[12];
player13num = x.randomlist[13];
player14num = x.randomlist[14];
player15num = x.randomlist[15];
player16num = x.randomlist[16];
nameArray = ["NAME1", "NAME2"...];
//you get the idea!
player2name = nameArray[player2num];
player3name = nameArray[player3num];
player4name = nameArray[player4num];
player5name = nameArray[player5num];
player6name = nameArray[player6num];
player7name = nameArray[player7num];
player8name = nameArray[player8num];
player9name = nameArray[player9num];
player10name = nameArray[player10num];
player11name = nameArray[player11num];
player12name = nameArray[player12num];
player13name = nameArray[player13num];
player14name = nameArray[player14num];
player15name = nameArray[player15num];
player16name = nameArray[player16num];
//
*******

So, what I wanna do is REMOVE a value (#) from the numberlist array... right?


Should I be using the array.splice command here?

I hope I'm making sense!!!!!!!!!

Any help would be greatly appreciated!!!!

- Thingee

[Edited by Thingee on 11-10-2001 at 11:50 PM]

View Replies !    View Related
Removing Spaces
How can I remove spaces from a string taken from a form field?

View Replies !    View Related
Removing Borders; How Do I?
I read Kirupas tutorial fully but because I am an idiot cannot find the place to make this change. Here is his instructions below;

Different browsers such as Internet Explorer and Netscape have different margin widths. Because you want to maximize the animation and "Take up every pixel of space available!", you don't want the margins to interfere with what your visitors see. You want to remove the margins. To remove margins, delete the <body> tag and place the following line in its place:

<body topmargin="0" leftmargin="0">
-------------------------------------------------------------
Improved text from Mr. Dan;
<BODY topmargin="0" leftmargin="0" marginwidth="0" marginheight="0"> For Netscrape & Exblorer
-------------------------------------------------------------
Anyone who wants to take a peek at the site it's @
http://user.mc.net/~dschultz/
I have only come as far as the template and only three buttons werk, one in the Tools Button, down in the menu popup, it highlights and goes to link and the other is the Checkmark, and the other is the Help Button. But it's pretty good and pretty good for me.
-------------------------------------------------------------
But where in the hell can these changes be made? It is not in the publish settings box or the page setup box. Can anyone help? And if I open the html file in notepad is all I get is garbage.

Frustrated,
Philman
[Edited by philjayhan on 01-11-2002 at 04:45 PM]

View Replies !    View Related
Removing Movieclips, How?
i want to do this, i have a button inside a movieclip so i can drag it, so after dropping it on a certain point I want to remove it(the movieclip that i was draggin) how do i do it?

View Replies !    View Related
Removing A Movieclip
Hello,

I have developed a small test interface in Flash 5 with a series of five buttons.

For arguements sake lets say that I have named them Button1, Button2 etc etc. Again for arguements sake lets say that the buttons appear in the left hand side of the stage and the output for each OnMouseEvent for each button should appear in the right hand side of the page.

When the user clicks on say Button1 it runs a small movieclip that shows detials of that button. What I need to know is if the user clicks on say Button2 how do I tell Flash to remove the movieclip that wss set off by clicking on Button 1 and replace it with the movie that has been linked from Button2. I've tried playing around with unloadMovie and removeMovieClip but I'm guessing that these are not what I need to use. I probably haven't explained this very well but can anyone please help?

Thanks

David

View Replies !    View Related
Removing The Taskbar In An EXE
Hi there...

Is it possible to remove the taskbar in a projector file (.exe)? The flash presentation I am creating is NOT fullscreen so I need to remove the taskbar. This is NOT an online presentation.

I know programs like Jugglor can do this but I'd rather not use a 3rd party app...

Thanx

View Replies !    View Related
Removing Original MC
Hi, i'm building a site with a floating menu...
Its supposed to be on top thru all scenes, so i achieved that with duplicate movie clip in the 1st scene.

Only problem is how do i get rid of the original clip?


this is what i did:
duplicateMovieClip("nav2", "nav3", 2);


but the nav2, is still visible in the first scene.

Please help,
(or maybe there's another way to do it?)

Thanks

View Replies !    View Related
How To Load A Swf Without Removing The First?
I want to build a flash-Site: so i want to use a main swf with the navigationbar (left). right are 300px free. in the freespace I want to load another swf with the content.
Because my website is full of content, i didn't want to load all with the main swf-file.

If i use loadMovie the main (navigationbar) will be replaced !

what do i wrong ???? How it works?

View Replies !    View Related
Removing Scrollbar
I am trying to remove the right scrollbar when playing my SWF in the internet explorer browser. I installed the full screen command which takes care of the top and bottom, but the right scroll bar is still there. Solution anyone???!!

View Replies !    View Related
Mx Bug When Removing Frames
Hi,

when I remove a lot of frames at once (say 300) FLASHmx hangs. This also happens when I keep the shift + F5 pressed and remove multiple layers frame by frame. Anyone has this problem also?

Appie

View Replies !    View Related
Removing The Title Bar?
I am opening up a SWF file and would like it to be only 550 by 400 with NO title bar what so ever!

I am calling this file from another html file.

Is it done at the html level and if so please guide me?

Flash Ghost

View Replies !    View Related
Removing Toolsbars In Pop Ups
Hi,

I have a flash movie that needs an action script command to pop up a new window that contains another flash movie , however I need the window to pop up at 100% height and width, and have the stardard toolbars (with the back, next, refresh, etc.) removed.

I just need the movie in a plain window to pop up.

I thought I could control this with javascript but that isn't the case.

Please help.

Thanks,
Tanya
[Edited by kayaks on 07-04-2002 at 08:00 AM]

View Replies !    View Related
Removing Whitespace From Xml Map
can anyone plz help?
i have incoming data in the format of an xml map which looks like:

<?xml version = 1.0?>
{map}
{level}123{/level}
{/map}

i was able to access the map by doing:
var something = myXML.firstChild.nextSibling.nodeName;

and that returns: "map"
now here is where i have trouble. i can't get to "level" because there's whitespace in my xml map between map and level and therefore i get "null" when i try to do:

var something = myXML.firstChild.nextSibling.firstChild.nodeName;

even though i've tried the code: myXML.ignoreWhite = true;

doesn't work =(
any idea???

i appreciate any help i can get on this. thanks alot.

View Replies !    View Related
Removing Duplicated MCs
Hi,

I am using Flash 5 and I have a movie with 80 frames. In frame 79 (labeled "mark") I have the following code:

i = i + 1
if (i>25) {
i = 1;
}
duplicateMovieClip ("_root.marker", "marker"+i, i); {
_root.marker._visible=0;
_root["marker"+i]._x = Math.floor(Math.random() * 360) +10;
_root["marker"+i]._y = Math.floor(Math.random() * 55) +175;
}

In frame 80:
gotoAndPlay("mark");

This works fine. I have a "replay" button that will restart the movie--but when the movie goes to frame 1, it keeps playing this loop and duplicating the mc "marker" oin top of the replay. I have tried removing the movie clip, but it still continues. How do I remove all duplications of the original instance? As for now, when the movie restarts, these clips are randomly popping up.

Any ideas would be greatly appreciated!

Thanks!!

View Replies !    View Related
Removing Movies
after clicking on a button i want movie which is loaded inside a movieclip to disappear. i tried removeMovieClip but it doesnt seem to work. i havent created it using duplicateMovie.

is there another way?

View Replies !    View Related
Removing Loaded Mc
I have a part of my movie where I use loadMovieNum and the movie s preloaded and everything works fine. But if you rewind from the menu, the main movie starts over, and the loaded movie is still there. How can I have it where the movie is removed if they do that?

View Replies !    View Related
Removing Apostrophes
I need a way to check for the presence of apostrophes in a string, remove them, and replace them with <code>&apos;</code>. Any ideas?

View Replies !    View Related
Removing SetRGB()
here's what i got:


code:
onClipEvent (load) {
myColor = new Color(this);
onPress = function () {
myColor.setRGB(0xff0000);
};
onRelease = function(){
//remove Color?????>
}
}


if turns red....that's fine, but how do i get it to go back to it's orginal colors meaning it has multiple colors and using setRGB(*original Color*) won't work b/c it sets the WHOLE movie clip to one color......any suggestions?....thanks in advance

View Replies !    View Related
Removing An Mc From Timeline
hi

So, I need to be able to play a nested movieclip once and then remove it, from from the movieclip its nested in, as this mc loops.

(ie. the main mc plays the child mc contained within it plays once but is then removed, so when the main mc plays again the child mc is no longer there.)

mmm... cheers

View Replies !    View Related
Removing Whitespace
Hi guys,

Ive seen there are a few threads in the forum about how to remove whitespace from the beginning and the end of a string, but what about from the middle?

Like say a user enters "4 + 3 = 7" or "4+3=7" or "4 + 3= 7", all of these answers are correct but I cant put in if statements for all the possiblities :/

Is there a way to scan through the string and remove the white space?

Cheerz,
Dwayne

View Replies !    View Related
Removing An Mc With Hit Test (help Me)
I have a game where I need a food item to disappear once you have collected it. For the actionscript I have the following part for the hit test:
if (this.hitTest(_root.spaceship)) {
this.removeMovieClip();
_root.score += points;
}
but it won't seem to remove itself when it meets the "spaceship"
Look at the game file if it will help. Can someone tell me where I have gone wrong?

View Replies !    View Related
Removing Backgrounds
Hey guys..
I use adobe to make most of my stuff, and I always run into the problem if it not looking as good because anytime I make something in abobe, when I bring it to flash it adds a solid color around the image, instead of just leaving it invisible. Ex: if your background layer in adobe was invisible, and you added text with a lighting effect. if you brought it into flash, they would make the background white..

can you stop that?! thanks guys

View Replies !    View Related
Flash Removing Mc's By Itself.
Is there some sort of a limit to how long an mc can stay on the stage?

I have a list of mcs from which I take mcs out and put them back in, at one point I find that 1 mc is missing and there's a value left instead of it, which isn't null or undefined, which is the same thing you get when you deleted an mc using removeMovieClip(). Why would Flash delete an mc for no reason?

View Replies !    View Related
Removing All DuplicateMovieClips
Hi,

I was making a Flash Game with DuplicateMovieClip. I ran into the problem where I switch to another Scene (ie Game Over Scene) and those Duplicated Clips are still there! Is there any way to get rid of them all at once? I tried making an actionscript loop and removeMovieClip to get rid of them, but it slows down the computer because I wrote it to cycle through every Duplicated Name that was used in the movie. I appreciate any advice. Thanks.

View Replies !    View Related
RemoveListener Not Removing
I have a scroll system that adds a listener for the wheel mouse when you roll over the content. When you roll out of the content it removes the listener, so that the user can scroll the entire window pane again.

The problem is that the content sometimes contains links, so i made a check that looks to see if the mouse has rolled off of the content and basically prevents removelistener from happening when rolling over links.

However, once a link has been rolled over, even if removelistener is ran when the cursor is pulled off of the content, it doesn't remove the listener. It seems like it loses track of it or something.

Any ideas as to why this would happen?

View Replies !    View Related
Removing LineTo
Hey freinds.

I was wondering how to keep a lineTo on the screen for one frame and then removing it. problem is, the lineTo is created with another Movieclip. heres the code.

code:
_root.createEmptyMovieClip("line"+_root.ht, _root.ht);
with (eval("_root.line"+_root.ht)) {
lineStyle(1, 0xFFFFFF, 25);
moveTo(startX, startY);
lineTo(endX, endY);
_root.ht++;
}


anyone?
thanks in advance.

waste

View Replies !    View Related
Removing Margin
I'm using Flash MX 2004. I have one image that I want to show up flush to the top at 0px and the other image to be flush to the left at 0px. I have both images set up on the stage in flash just so but when I try to publish this to HTML, a border or margin is showing up on the top and left side of the HTML screen and the images are moved down and to the right a few pixels. How do I get rid of this border so that my HTML will look exactly like the Flash stage?

I appreciate any insight on this... Thanks.

View Replies !    View Related
Removing A Swf File 1
hi there...

im loading an external swf file in to an blank movie clip in my flash site...

the swf im loading in plays 100 frames then i want to remove it...

on the last frame of the swf i put this code :

stop();
this.removeMovieClip();


but nothing happens it just stops and stays there

any suggestions

View Replies !    View Related
Key.removeListener() Not Removing
I'm working in Flash MX 2004 and I have an Key.addListener(game) which works fine, but later on when I call the Key.removeListener(game) it always returns false. Are there any other steps or requirements for the removeListener function?

View Replies !    View Related
Removing MC Duplicates
Hello

I am trying to get some duplicates of an MC to disappear for the next screen but I can't do it.


How the duplicates are made: (it works)
PHP Code:




onClipEvent (enterFrame) {

    elapsedTime = Math.round((getTimer() - _root.startingTime)/1000);
    if (elapsedTime >= _root.nextBubbleTime) {
        _root.bubbleCount++;
        newBubble = _root.floatingBubble.duplicateMovieClip("newBubble" + _root.bubbleCount, 100 + _root.bubbleCount);
        newBubble._x = Math.random()*Stage.width;
        newBubble._y = Math.random()*Stage.height;
        _root.nextBubbleTime += _root.timeGap;
}
}








The attempt to remove duplicates: (doesn't work)
PHP Code:




onClipEvent(enterFrame) {
       _root.floatingBubble.removeMovieClip();
       while (_root.bubbleCount>0) {
       removeMovieClip("newBubble" + _root.bubbleCount, 100 + _root.bubbleCount);
       _root.bubbleCount--;
       }
}









If someone can help, I appreciate it...

View Replies !    View Related
Copyright © 2005-08 www.BigResource.com, All rights reserved