Removing _root From Code
I need some help in getting rid of "_root" in this code.thanks ActionScript Code: maxImage = 13;colWidth = 50;rowHeight = 50;colGap = 30;rowGap = 30;cols = 5;rows = 3;counter = 1;initX = 25;initY = 25;for (row = 0; row < rows; row++){ for (col = 0; col < cols; col++) { if (counter <= maxImage) { _root.createEmptyMovieClip("cont" + counter, 1000 + counter); _root["cont" + counter].loadMovie("thumbnails/image_" + counter + ".jpg"); _root["cont" + counter].attachMovie("border","border1",1) _root["cont" + counter]._x = col * (colWidth + colGap) + initX; _root["cont" + counter]._y = row * (rowHeight + rowGap) + initY; _root.createEmptyMovieClip("tmp" + counter, 2000 + counter); _root["tmp" + counter].idx = counter; _root["tmp" + counter].onEnterFrame = function () { var l = _root["cont" + this.idx].getBytesLoaded(); var t = _root["cont" + this.idx].getBytesTotal(); trace(this.idx + " == " + l + " : " + t); if ((l >= t) && (l > 1) && (_root["cont" + this.idx]._width > 1)) { trace("Fully loaded!!!"); delete this.onEnterFrame; _root["cont" + this.idx].idx = this.idx; _root["cont" + this.idx].onPress = function () { trace("Pressed ... " + this.idx); _root.sel_txt.text = "Selected menu : " + this.idx; } this.removeMovieClip(); } } ++counter; } }}
KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 02-27-2007, 08:03 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Removing TextField From _root
I'm creating a TextField in one frame and I want it completely removed when I move to the next frame.
I'm creating it like this:
Code:
_root.createTextField("skipTxt1", this.getNextHighestDepth(), 700, 200, 100, 50);
I can set the _visible property to false and the text will disappear, but the text field is still detectable by the mouse cursor. The removeTextField function doesn't do anything either.
Eval Removing HTML Code?
I have a php script that pumps out member names in an array to flash...
the content of each level of the array contains HTML data. The data works fine when use a literal path, but as soon as I go to my dynamic path, it drops all the data... I think it might have something to do with the eval.
this works...
_level0.member2.member = memberName[2];
this is when it drops data...
memString = "_level0.member"+i+".member";
eval(memString) = eval("memberName["+i+"]");
The code is in the following environment:
// duplicate clips //
while (amount>0) {
duplicateMovieClip(_root.member,"member"+i, i);
if (i eq 0){
setProperty (eval("_level0.member"+i), _x, "176");
setProperty (eval("_level0.member"+i), _y, "88");
} else if (i > 0){
setProperty (eval("_level0.member"+i), _x, eval("_level0.member"+(i-1)+"._x"));
setProperty (eval("_level0.member"+i), _y, eval("_level0.member"+(i-1)+"._y")+eval("_level0.member"+(i-1)+"._height"));
}
_level0.clips = _level0.clips+1;
//set member names
memString = "_level0.member"+i+".member";
eval(memString) = eval("memberName["+i+"]");
//set target for each member
targetString = "_level0.member"+i+".target";
eval(targetString) = eval("target["+i+"]");
i = i+1;
amount = amount-1;
}
The HTML data is basically just <B></B> tags... and Font tags...
Any ideas? Thx
Removing Code From A Movie Clip
Is there a way to remove all of the on(rollOver){} on(Press){} ect from movie clips? basically just destroying any action script assoociated with that movie clip. I just want the movie clip to stop moving, and rollover effect etc
Any ideas anyone?
Code Won't Continue After Removing Eventhandler
Hi there,
i've got a function containg other functions and listeners...
I want to get back the amount of collected items in this game...
when everthing is done, i set the exit bool to true and the listeners are deleted, but, the program stops there. after the trace "key listeners removed" comes once again the trace "sdkfjkdsfj" and then the program should give back the collectedAmount... but it doesn't...
please help me...
ActionScript Code:
import flash.display.Sprite;
import flash.events.Event;
import flash.events.MouseEvent;
import flash.display.*;
import flash.net.URLRequest;
trace(startGame());
function startGame():int{
...
...
...
function moveNerd(event:KeyboardEvent):void{
var speed:int = 20;
if(event.keyCode == 38){
trace("nach oben gedrückt")
//circle.y -= 5;
}
else if(event.keyCode == 40){
trace("nach unten gedrückt")
//circle.y += 5;
}
else if(event.keyCode == 37){
trace("nach links gedrückt");
if(!(nerd.x <= 35))nerd.x -= speed;
}
else if
(event.keyCode == 39){
trace("nach rechts gedrückt");
if((nerd.x < 500))nerd.x += speed;
}
}
stage.addEventListener(KeyboardEvent.KEY_DOWN, moveNerd);
//This loop creates 40 particles that are positioned randomly on the stage.
for (var i=....
....
...
}
trace("done!");
function enterFrameHandler (e:Event):void {
//Loop through the particles
var exit:Boolean = false;
for (var i = 0; i < particlesArray.length; i++) {
var particle = particlesArray[i];
var Badparticle = BadparticlesArray[i];
particle.y += particle.speedY;
particle.x += particle.speedX;
Badparticle.y += Badparticle.speedY;
Badparticle.x += Badparticle.speedX;
if(nerd.hitTestObject(particle)){
particle.y = 0;
particle.x = Math.random() * stage.stageWidth;
++collectedAmount;
}
else if(nerd.hitTestObject(Badparticle)){
Badparticle.y = 0;
Badparticle.x = Math.random() * stage.stageWidth;
if(collectedAmount > 0)
--collectedAmount;
}
AmountField.text = ("Anzahl: " + collectedAmount);
//If the particle is below the bottom, position it back to the top
if (particle.y > stage.stageHeight) {
particle.y = 0;
particle.x = Math.random() * stage.stageWidth;
}
if (Badparticle.y > stage.stageHeight) {
Badparticle.y = 0;
Badparticle.x = Math.random() * stage.stageWidth;
}
if(TimerField.text == "Time's up!"){
exit = true;
//break;
}
}
if(exit == true){
removeEventListener(Event.ENTER_FRAME, enterFrameHandler);
trace("enter-listener entfernt");
stage.removeEventListener(KeyboardEvent.KEY_DOWN, moveNerd);
trace("key listener removed");
}
trace("sdkfjkdsfj");
}
addEventListener (Event.ENTER_FRAME, enterFrameHandler);
return collectedAmount;
}
Where To Place A _root In This Code?
this is some drag and drop code, after a user has dropped a object i want it to go a diffrent movie clip frame. where would i put my root code?
instead of the nextFrame();
would i put
_root.DO1.gotoAndStop(3);
------------------------------------------------
DRAG DROP CODE
on (press) {
startDrag(getProperty(_x, _y));
}
on (release) {
stopDrag();
if (_droptarget eq "/TA1") {
nextFrame();
} else {
setProperty("", _y, OrgY);
setProperty("", _x, OrgX);
}
}
__________________________________________________ _
THANKS
aIDAN
Add Code To A Frame In A MC From _root
This is not really importand but is it possible? I'm trying to see if I can keep all the code in a file on the root but I'm setting variables and stuff on specific frames within movie clips. Is there anything like:
movieclip.onFrameNumber(number or label){
do something;
}
Cheers,
jr.
_root. Vs This. - Someone To Check This Code
Hi,
I'm trying to load a jpeg, display a text preloader then fade in the image. I can get the preloader working but when I tack on the call to the fadeIn function at the end all I see is the fade and no preload. What am I doing wrong here?
I've got the following code:
on frame 1
//variables
var series = "p";
var index = 1;
var totalFiles = 22;
loadMovie("../images/"+series+"/image"+index+".jpg", "container");
fadeIn = function () {
if (container._alpha<=100) {
container._alpha += 5;
}
};
same frame different layer
stop();
container._visible = false;
this.onEnterFrame = function ()
{
var l = container.getBytesLoaded();
var t = container.getBytesTotal();
var getPercent = l / t;
loadText = "Photo loading... " + Math.round(getPercent * 100) + "%";
if (l > 0 && l >= t)
{
container._visible = 1;
loadText = "";
container._alpha = 0;
_root.onEnterFrame = fadeIn ;
}
}
Removing Default Html Code In Textboxes
hello folks,
i am working on a script which applies dynamic fonts/sizes/colours etc. to a number of textboxes. Problem is, when i set the texbox properties to html, the following appears:
<p><font face="verdana" size="12">enter your text here</f></p>
however, all i want to extract is "enter your text here". when modifying the text with te dynamic info, i have to take this entire chunk as a variable, and hence i get:
<b><font face="arial" size="10"><font face="verdana" size="12">enter your text here etc. i.e. i need to cut out the code around the original code.
**skip this to get to the meat of the qn **
i figured an easy way to do this would be to not set the textbox to html, then all i get is "enter your text here". this would then be sent to an html textbox which could display this + the dynamic stuff.
however, upon clicking a button, the text needs to be transferred back from the html box, to the non (original) box, and also i want the original textbox to preview the dynamic text. hence this method aint gonna work.
so , i need a way to cut the crud that flash automatically puts in. i tried:
_root.cleanedstring=paneltext.substring(63, paneltext.length-31);
i.e. make a substring to remove the unnecessary, but once this gets passed to the 2nd textbox, the precise points (63 and length-31) no longer apply cos i think more garbage gets stuffed in.
**
the crux therefore is, how can i search a string for selected words, i.e. <p>,</p>,<font face etc>,</font> and remove em to get the text i want? .
any ideas would be greatly appreciated.
bob
http://www.sensoriumdesign.net
Checkboxes - Code Removing Selection Don't Work
Hi
I'm following a chapter in my director MX2004 book - this chapter makes a Flash movie that is imported into Director. Basically, there is 3 checkboxes with instance names of biking, running and walking. If one checkbox is ticked then the other two should not be ticked.
the code in my book for the biking checkbox is;
on (click){
if (this.selected == true){
_root.running.selected == false;
_root.walking.seelcted == false;
}
}
This is attached to each checkbox, with an alteration to which boxes are made false so that it makes sense for each checkbox.
Firstly, the syntax checker in expert mode did not like the on (click) event it said it was not a legal event, I changed it to on (press) and it was happy. My problem is you can tick all 3 boxes, the code preventing this is not having any effect - why?
thanks for any help - I'm stumped on this one
David (I am using Flash MX)
Removing MC Problem(Code Included This Time)
I want to remove a MC from the stage. I've tried several different methods but it throws error codes. Any ideas? Thanks
electronic.visible = false;
hiphop.visible = false;
pop.visible = false;
alternative.visible = false;
classical.visible = false;
butt.addEventListener(MouseEvent.CLICK, butt1);
function butt1(event:MouseEvent):void {
if (electronic.visible == false) {
electronic.visible = true;
}else if (electronic.visible == true) {
hiphop.visible = true;
//here is where I'm having the problem
this.parent.removeChild(electronic);
}else if (hiphop.visible == true) {
pop.visible = true;
hiphop.visible = false;
}
}
When I run it and I get to that "else if" it throws the following error:
"Error #2025: The supplied DisplayObject must be a child of the caller."
Website - _root. Code Causes Problems
Hi
I am currently building a website that dynamically loads multiple movies into one main .swf file. However in one of my movies i have used the code:
_root.TnF_MC.gotoAndStop(2);
however when this movie dynamically loads into the main swf, the _root. code wont play because it refers to the main swf instead of the dynamic swf.
Is there another way to make the code without using _root?
The code is used in a Movie Clip to control another Movie Clip on the main timeline of the DYNAMIC SWF not the MAIN SWF.
Thanks for any possible help
TedTLogan
ActionScript 3.0 Migration Code For _root.
Hello Friends
I am using AS2 and i have some doubts in AS3.
function zoomer(){
var x:Number = _root.xmouse; //storing some value and using that while movie onenterframe.
}
what is the code in AS3 for that.
Making Code Work Faster ... Removing Listeners
I have an onKeyDown function with an if else statement in it that looks like this:
ActionScript Code:
else if (Key.getCode() == 97) {
trace("the #1 btn has been pressed");
_root.gotoAndPlay("janesShows_l1");
_root.helpmenu_mc.gotoAndPlay(9);
killEverything();
The killEverything(); function kills all of the listeners in the movie before it jumps to the next frame. The problem is that if you press the key to quick one after the other the listeners are not removed fast enough which results in multiple listeners on the next frame.
Here is my killEverything function:
ActionScript Code:
//kills all listeners so that they are not created multiple times, close net stream for videos and clears XXML variables
function killEverything() {
ns.close();
menu_xml = undefined;
d = 0;
lastd = -1;
i = 0;
Key.removeListener(keyListener);
Key.removeListener(keyListener2);
Key.removeListener(keyListener3);
Key.removeListener(keyListenerBuy);
trace("LISTENERS DEAD!!!");
}
My question is, would it work better if I call the killEverything() function before I say gotoAndPlay or does the order really not matter?
Also is there a way to say don't jump to the other frame until the killEverything function is complete?
Hope this all makes sense. Thanks in advance for any help you can offer!
Does Removing White Space In Code Lower SWF Size?
Hi --
I am working on a Flash project where file size optimization is critical. I
am curious if removing white space from the code (which lowers the size of
the AS file) will reduce the size of the finished SWF or if the Flash
compiler already does this?
Thanks
Rich
_root Code Doesn't Work In Scene 2
I have a preloader that has a progress bar using the following code....
loadedBytes = _root.getBytesLoaded();
totalBytes = _root.getBytesTotal();
if (loadedBytes < totalBytes){
percentageOutput = int((loadedBytes / totalBytes) * 100);
_root.progressBar._xscale = percentageOutput;
gotoAndPlay("preloading_loop");
}
else{
gotoAndPlay("start_movie");
}
This code works great on Scene 1 (the maintimeline), which is what _root refers to...
My question is this, how do I alter this code to make it work in a Scene 2 movie (in the same FLA).
I want to be able to work in ONE FLA file and export separate scenes as swf's that will be loaded into the main timeline (swf). For each of these, I want a progress bar preloader using the above code. It seems the only way I can achieve this is to have separate FLA's for each swf, which I want to avoid if I can. How do I target the Scene 2 stuff (and additional scenes). I can't use _root, I've tried, which means to me that it's exclusive to the maintimeline (Scene 1) in ANY fla file.
Thanks for any help!
Loaded Movie Code (_root.) Not Working
In my main movie i have the code _root.load_movie.loadMovie("images_main.swf");
images_main.swf loads fine but any code in that movie that starts with _root. doesn't work. Do i have to add something before _root. to indicate the main movie?
Removing Clips Created At "Authour Time" With Code
I don't know how I have used Flash for a year or so with out comming across this question or knowing a simple answer to it but....
Is it possible to remove a movie clip created at author time, (eg. drawn onto the stage & not created through code) while a movie plays by using code?
I know it can be done with “Duplicated Clips”, but wonder if there is any way of doing this through code at runtime for clips that were on the stage from the start? (Setting _alpha to 0 & moving the clips of stage not an option- clip must be removed.)
Removing "click For Flash Activation" Code?
hello -
i created a flash navigation. but for some reason, when viewing it within a browser i have to click on the flash once to activate it. i have to then click it a second time for it to take me to the linked page. is there any code that i can add so it removes having it to click the flash area to activate it? thanks!
_root.play() / _root.gotoAndPlay() Not Working
Hi,
I am working on an interactive movie, the movie consists of a number of small movie clips. I need each clip to play and when it reaches it’s end stop and tell the main time line to move to next frame, on that frame the next MC will [play and do the same.
I am trying to use this script for the last frame of the movie:
_root.play()
I also tried “_root.gotoAndPlay()” and “_root.nextFrame()
It doesn’t seem to work.
Anyone has any idea why ???
Loading .swf To _root And Performing Actions On _root
Hello, I have a loader which should load a movie which should be placed on the _root so that all of it's actions will still work. also, i need to perform some actions on the _root which is specified in my loader. f.eks. say I load my movie at _level0 and then I trace "movieLoaded" all the time.
And I use flash MX
This _root And That _root, Parents, Children, LoadMovie...
I'm building a showcase to show a bunch of my work. Let's call my work "children" and the showcase file the "parent".
A lot of the children files have some actionscript that references functions and variables on the root level. However, when those files are loaded into the parent file, the root is now the root of the parent file, not the child file.
SOME of the stuff, I've been able to remedy by opening each flash file and copying and pasting all that crud into the shell flash movie.
Unfortunately, not all of my wizardry is working, and hey, who knows what's wrong. Since the individual files each have functionality that works on it's own, is there some way of telling those children files to look at the root ONLY on their own file, or, as soon as the swf is loaded, the root is changed?
How can I avoid this in the future?
ALSO, is there some way to globally override the "getURL" function call so any and all clicks are now dead links?
_root.link / _root.page Help
hi gang, ive got a flash template im trying to edit for a friend, id say im fairly good at flash ive made alot of sites with actions but having trouble with this.
the problem i have got is the _root.link=
this is the action script:
on (release) {
if (_root.link <> 8) {
_root["page"+_root.page].gotoAndPlay("w2");
_root.link = 8;
_root.page = _root.link;
}
}
(there was more but that was just controling the button animation, ive just posted this to keep it simple , for me atleast)
what im having trouble doing is working out where the route is?
i want to be able to creat another movie and link it
eg:
on (release) {
if (_root.link <> 9) {
_root["page"+_root.page].gotoAndPlay("w2");
_root.link = 9;
_root.page = _root.link;
}
}
how would i lable the movie to be '9' where would i do this, i have looked and ive had no joy, some help would be good, if u need more info from me please do ask
_root._root[eelmine].nextFrame(); ?
if a condition is true, then:
_root.(MC with instance name that is the value of "_root.eelmine").nextFrame();
is this correct?
_root._root[eelmine].nextFrame();
_root._root[eelmine].nextFrame(); ?
if a condition is true, then:
_root.(MC with instance name that is the value of "_root.eelmine").nextFrame();
is this correct?
_root._root[eelmine].nextFrame();
_root._root.testbox?
I have this small problem.
I have 2 swfs(main.swf and links.swf)
I then load links into main. In links I loadvar using php and sql.
I fetch links from my sql databas and print it in php.
But it doesnt work when I load links into main.
It only works when I view links.swf directly.
Example:
links.php
databas connection etc etc
mysql query etc etc
print"&name=$name";
print"&link=$link";
print"&status=DONE";
in flash(links.swf)i then have this:
status = "LOADING";
loadVariablesNum("links.php", 0, "POST");
if (status eq "LOADING") {
gotoAndPlay (_currentframe-1);
} else {
gotoAndPlay (2);
}
I have 3 dynamic boxes called:name,link and status.
and a stop() on frame 2.
So how do I get this to work? I´m sure you guys know the answer to this.
I also have another question.
When I look at the links.swf directly only the first post appears and I want the whole list so that the user/visitor can scroll the link list. How do I loop that in flash or is it in php/sql It should be done and if so,, how would the php code look like.
Would this work?
$query="select * from links";
$result=mysql_query($query);
$name=mysql_result($result,"name");
$name=mysql_result($result,"link");
print"&name=$name";
print"&url=$link";
print"&status=DONE";
How do I then make the name linkable?
I can only have one dynamic box in the flash right?
So that the name flashkit is the link to flashkit.
Please help me with the above,, really need to get this to work.
_root._parent.? Problem With "_root" Etc
I have been using flash for some time now and understand basic actionscript. However only just recently(last few days), i have gone onto more advanced stuff like cursors (advanced for me )
Well i am making a flash movie that incorporates all of my testings for people to see.
I am current;y working on a movie where the cursor is a knife, and when the cursor goes over this picture of someone, the knife (cursor) should go to and play the second frame of the knife (cursor) which has added blood.
I.e, when the mouse goes over the picture, the knife becomes a picture with blood, so in effect you are stabbing the picture. (don't worry, i'm not a sadist!)
At the moment my movie is like this...
drag drag2
(pic) (knife)
^ ^
| |
<<drag_mc>>
^
|
Scene 1 -----> navigation...
(root?)
Description: The scene one has two movies in it, "navigation" (which is OK) and the "drag_mc". The "navigation" is fine so i won't go into that. The "drag_mc", then has two movie clips in it, "drag" and "drag2".
I assume that to make the "drag2"(cursor) go to frame 2 when it hovers over "drag"(picture) that the "drag" should have a on(rollover)
command. I've put in the command, but i'm having troubles linking that to the "drag"'s frame 2.
I have just messed about with _parent and stuff, but never understood it.
Please could someone help me here, and/or tell me exactly how the _root and stuff works??
P.S. the on (rollover) is actionscript for the drag movie, and not in the movie if you get what i mean....
---newbie in distress---
EDIT: the picture did not come out as planned, but it is still readable. Just remember that the two movies ("drag" and "drag2") are placed in the "drag_mc" movie
A Button In A MC In Frame 1 Of _root Hiding An MC In Frame 2 Of _root?
Hi. I have a button, "auroraB" in a movie clip "startupMC" which is in frame 1 of _root. There is another MC, "scenic" in frame 2 of _root.
The button "auroraB" is clicked and takes the user to frame 79 of the MC in frame 1. From there the user clicks another button to go to frame 2 of the _root.
How do I get it to hide MC "scenic" in frame 2 of _root when the button "aurroraB" is clicked? Thanks
_root.send1.text = _root.total3.text;
Ok I have this script in a Movie Clip! First frame has
_root.send1.text = _root.total3.text;
2nd frame
gotoAndPlay(1);
So it updates!
Both send1.text and total3.text are input text fields in Flash! When I test this out it works fine but when I get it up online it doesn't work! The information in total3.text doesn't get sent to send1.text!! Also note both have Var titles asigned to them! Let me know if you can figure out what's wrong! Thanks!
Convert "_root" To _root
anyone know how to convert a string "_root" to the path specifier _root???
The Object() converstion function doesn't seem to be doing the trick..
hmmm
any help would be appreciated
cheers
"_root.MCname" + "_root.MCvalue"
Hallo,
how can I grab the value contained within a MC name, e.g.:
Code:
duplicateMovieclip(_root.myMC, "_root.myMC"+someIntegerVariable, level);
_root.myMC+someIntegerVariable._x = 100;
It happens that the parser cannot parse the second row, since
"Left side of assignment operator must be variable or property".
My target is to make the sum of two instance names as a single instance name.
thank you very much!
s---
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?
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
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
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.
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?
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
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.
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]);
};
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
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.
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...
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
|