External Movie Clips With Multiple Menu Movie Clips
It's pretty late and I don't think i have enough time to search this question in the forums but here I go. Sorry If I upset someone for making a topic that already exists. I have a main timeline that im importing an external movie clip in. This external movie clip is named "members" it has several buttons that load other external movie clips into a window within "members" . What do I need to do to make this work. Do I need to use "this, _parent, _root, level(s) or "whatever.swf". If you can help me out that will be great. I'll make it up to you down the road. No sexual favor please. I'm using flash mx 2004 btw. Thanks in advanced
KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 09-19-2005, 05:57 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
How To Make AS Generate Multiple Movie Clips According To External Inf
Hi
I'm trying to write a code whith which an user can add comments to a certain image areas. It contains two sections: one for user, who is the owner of a picture and can add and edit tags and another section for a guest who can only see comments.Pictures and comments are loaded into movie externally from server. Comments are stored in txt file, each picture has its own txt file, all comment parameters are written into that file with a little help on php.
Now, I havent quite got a clue how to make following:
´When guest is about to see the comments, His desired picture is loaded into movie and so are the information from the texfile (spot coordinates, size, text etc.). Now code should generate comment movieclips based on the info from txt. How to make flash ganarate right number of movie clips according to the amount on for exaple commentbox size, which are separated wiht commas in txt files.
i could manage to replace infomanaging with xml instead on txt files, it that helps.
Thank you.
Movie Clip Runs Slow When There Are Multiple Movie Clips Running
Hi, Can someone help me out? I have made a flash where a movie clip containing text runs at the same time that a second movie clip runs (movie clip 2). I used function updateCursor() to replace the standard mouse symbol with the movie clip symbol (movie clip 2). After the scene runs a few times at the correct speed, everything within it slows down markedly, which I don't want. Why is this happening? Any ideas? I have actually seen something similar in Flash 5...but I can't figure out how to keep this from happening!!
How To Remove All Movie Clips/array: Movie Clips Carry Over To Next Frames/ Scenes
Hi: I am creating a small game. So far so good, but only problem I have come across is when I jump to another frame or scene, previous movieclips (using an array) that are still running carry over to the next frame/scene.
See attached if you have some time- start clicking on answers in the game, and when time runs out some movie clips that are still running will remain on top of my end frame and carry over to the next scene as well.
Is there any sort of remove all movie clips or "clear all" type of actionscript?
thanks in advance!
How To Preload Multiple Movie Clips With The Main Movie
I want to know that how i can preload multiple movies with main movie together. lets supose i have two movies named first.swf and second.swf and i have also Main movie with intro so how i can preload these movies together then these movies can play together.
Please help me in this regard.
Thankyou
Maintaining Event Behavior For Movie Clips Nested In Movie Clips
Is there any way to maintain a clip's event callbacks when said clip is nested in a parent clip that has its own definitions for those callbacks?
In other words, if clip B has a definition for .onPress and clip A has a definition for .onPress, is there anyway to maintain clip B's definition if it is nested in clip A?
I have tried doing it by making clips into movie clip subclasses but it doesn't work... but how do components work then?
Problem Loading External Movie Clips Into Target Movie Clip
Hello,
I've been desperately trying to figure how to get this function to work. I created a target movie clip, then assigned an external one to it, but I can't seem to get it to work. Can anyone help me with this and fully explain it so I don't miss anything? I'm using flash professional 8.
Thanks so much!
Rob
Multiple Movie Clips On Multiple Layers (Playing Problem)
Hi dears,
I am also new in flash users. I have created some movie clips and want to play in “mcmovie”. All movie clips are on different layers i.e. movie clips are as follows:
1.mccommercial
2.mccorporate
3.mcenvirnomental…etc
I placed these MCs in on layer1 frame1 mccommercial, on layer2 frame2 mccorporate, on layer3 frame3 mcenvironmental and so on.
I want to play all movies’ clips one by one i.e. mccorporate should be played after completing mccommercial and playing last movie clip, it should be start from beginning.
I will appreciate, if somebody could do me a favor in this regards.
Thank you,
Yasin
Multiple Movie Clips
I am new to ActionScript and I have a problem.
Is there ANY way to target multiple movie clips spanned across 5 levels?
For example a MC within a MC on level 3 controlling an MC within the MC loaded to level 1?
Multiple Movie Clips
i have been reading these forums alot and i have a ques please. is there any limit to hte number of movie clips you may add within another ? i mena i read about people loading a clip into a clip that resides within another clip and am just curious if there is a limit
Multiple Movie Clips
How can I copy and paste movie clips, and set different actions to them? When I make copies, and set actions to just ONE of them, all of the others do the same.
Im still a n00bie, trying to learn : ) Thanks for the help.
Multiple Movie Clips
Hello, I'm new here and was wondering if anyone could help. I have two movie clips that I am trying to animate at different FPS. It is basicly a sky picture that is divided in two. There is an upper sky and a bottom sky. I made them so that they scroll across the screen from right to left, however I would like them to move at different speeds. I would like the top half of the screen to move at 30 FPS and the bottom to move at 15 FPS. I'm trying to create a neat effect here but when I double click the movie clip in the libarary to edit it to change the FPS, it changes the FPS for the other animation in my libarary as well. Whenever I change one it automaicly changes the other. Anyone know how to get around this? Also is there a way to remove the background from a movie clip?
Multiple Movie Clips With Same Name
Hi
I'm writing a quiz question where students are asked to drag either 'principal', 'principles' or 'principle' into the correct spaces in a piece of text.
I've given the spaces which require the same answer the same name and ditto for the words to fit into those spaces. I've done this hoping that any copy of the word 'principal', for example, will fit into any one of the spaces for that word.
However, when I publish the quiz, it recognises only the first instance of each movie clip as dragable, or dragable-onto.
Has anyone got any ideas?
'elp!
Thanks
Trinitybay9
Multiple Movie Clips
I have a file with multiple movie clips. I just want to have clip one play once, then clip two play, then clip then, etc. How do you do this?
Thanks.
Michelle
Multiple Movie Clips
I just can not figure out how to write an action script to load separate swfs into two separate movie clips.
When I build a flash program I only get the first swf to play. It shows up in the correct movie clip. I can not get the other swf to play in the second (different name) movie clip.
That's my main problem.
A secondary concern is if I try to then add audio to the main Flash program that never plays.
Can anybody point me in the right direction?
Thanks
Randy
Help With Multiple Movie Clips
Hey everyone,
Stuck on a little problem here. I have my main MC that loads another on top of it. The movie clip thats loaded on top has some buttons on it. I'm having trouble with the actionscript to make it so that when you click the button on the top MC, it will go inside the bottom MC and play a specific frame.
Any help would be great!
Thanks.
Multiple Movie Clips
I've created a slider that opens by a mouse click. This slider opens multiple movie clips in the form of individual windows with additional buttons on each window. How do I activate the buttons within the slider so that the opened windows can be minimized to the visible edge of the slider without tweening all windows out of sight.
I know it sounds very confusing but I'm hoping that someone can help and guide me through this.
Sabras
Multiple Movie Clips
Hi
I am currently making a grid based game and across the grid there is upto 10 repetitions of 10 different objects over the 100 squares.
Each object is a movieclip which there is a copy of in the project library. At the start they will either all be spread across the grid or the player can place them in the grid to solve the puzzles.
if i have a loop
ActionScript Code:
for(var i=0;i<10;i++){
for(var j=0;j<10;j++){
}
}
and within this loop the clips are randomly placed how do i dynamically attach them, say for example a library reference is one,two,three etc
at the minute i have something like below which doesnt appear to work but if i take this out and only attach one specific movie it works fine.
ActionScript Code:
clip = _root.grid.createEmptyMovieClip("num"+i+"_"+j, 1300);
clip._x = _root.tileClickedX;
clip._y = _root.tileClickedY;
switch(_root.puzzle[i,j]){
case 1 : clip.attachMovie("one",one,_root.grid.getNextHighestDepth());
break;
.
.
.
.
}
Multiple Movie Clips
Hi everyone,
I have 2 movie clips (so far) on my main timeline. Also on my main timeline I have a rewind button. The rewind button rewinds correctly for my first movie clip named main1_mc which is on the frame labeled "screen". But when it reaches my second movie clip and I want to rewind the entire movie, the first movie clip rewinds in front of the second movie clip. So the second movie clip is still there and the first movie clip appears on top and rewinds. My second movie named "mainr_mc" is also on my main timeline on the frame labeled "resources". So I've tried multiple variations of removeMovieClip with _root and all (as commented in the code below) but nothing seems to work. Any suggestions? Here's my AS for my rewind button (which is also on my main timeline) below:
// ========== REWIND BUTTON ==========
prev.onPress = function() {
//removeMovieClip("_root.mainr_mc");
_root.next._visible = true;
_root.createEmptyMovieClip("controller_mc", 1);
controller_mc.onEnterFrame = function() {
_root.screen.gotoAndStop(_root.screen._currentfram e-3);
if (_root.screen._currentframe-3<1) {
_root.gotoAndStop("screen");
}
};
};
prev.onRelease = function() {
controller_mc.removeMovieClip();
_root.next._visible = true;
//removeMovieClip("_root.mainr_mc");
};
prev.onReleaseOutside = function() {
controller_mc.removeMovieClip();
_root.next._visible = true;
//removeMovieClip("_root.mainr_mc");
};
Help With Multiple Movie Clips
I'm fairly new to Flash and am havig trouble getting two movie clips to play sequesntially (one after the other). I've tried stop() and gotandplay() actions but am not having any luck. Any help would be greatly appreciated.
There's always a better way...
How Do I Load/stream Individual Movie Clips Within Other Movie Clips
I am using flash 5
I have a movie with a huge movie clip in it and that movie clip has lots of movie clips inside that. how do I load each one individually so when the viewer clicks on abutton it starts to laod the related movie clip.
Please help.. I'm working on borrowed time and borrowed money
Movie Clips Within Movie Clips: Text Link Problem
Hello.
I have a Movie Clip that is my main one with another Movie Clip inside of it. In the subordinate Movie Clip, I wish to have text linking frame (13) to frame (14) for instance. The problem that manifests is that while buttons is the subordinate Movie Clip link to frames within it with no complications, the text link from 13 to 14 with its respective code links to the last frame (would be 14) in the main Movie Clip.
Am I doomed to convert all text links to buttons in the subordinate Movie Clip or is there (what I am praying for) a code to work around this and keep frame links confined to the subordinate Movie Clip? I would appreciate any help that anyone can offer regarding this problem. Many Thanks.
Movie Clips Acting As Buttons Can't Load Other Movie Clips
Frame 1 has three movie clips on it, instance names are A, B, C. I have the following actionscript on frame 1 as well:
stop();
import flash.filters.GlowFilter;
ar = [A, B, C];
for(var z=0; z<ar.length; z++) {
ar[z].onRollOver = rollover;
ar[z].onRollOut = rollout;
}
function rollover() {
this.swapDepths(0);
this.filters = [new GlowFilter(0x333333, .20, 7, 7)];
}
function rollout() {
this.filters = null;
}
This code creates a glow, obviously, on whatever movie clip I rollover. What I want to do as well is this:
I want to click on mc "A" and have it launch a different movie clip (let's say "X") on top of everything else (so that A, B and C are still visible in the background). "X" is in a sub-folder of "A" if that makes any sense or is relevant. Same kind of action for mc's B and C. B should launch mc "Y" and C should launch mc "Z".
What is the actionscript for this? Any questions please let me know. Please respond, I need this info as soon as possible. Much appreciated!!
Text
Loading External Movie Clips Into Flash Movie
I was wondering if anyone could help me, I attached the code below to a button in an existing flash movie in hopes that when it is clicked it would create an empty movie clip on level 1 of the movie with the button and then load an external .swf (from the same directory) into or in place of the empty movie clip. However this isn't working for me does anyone have any suggestions?
--Thanks
ActionScript Code:
on (release) {
_root.createEmptyMovieClip("dummyclip", 1);
dummyclip.loadMovie( "Untitled-1.swf");
}
Setdrag Using Multiple Movie Clips
I have a movie with a box with the setdrag propertys set to drag the movieclip when u press and hold down the clicp and let go when u release the mouse. i did that no problem but when i duplicate the clip only one of the clips will let me drag it in that scene even though the coding is the same. help me please. a.s.a.p
Multiple Draggable Movie Clips
Help! I have 5 different movie clips that i have being able to be dragged around. I hvae a huge problem tho, and that is when i try dragging any of the other 4 movie clips, the 1st movie clip always gets dragged ....whyy?????
Targeting Multiple Movie Clips
Maybe this is a dumb question, but is there a way to change the properties (specifically _alpha) of multiple instances at once?
Here's my situation. I'm making a map, and there are 188 instances, which all fall into 4 categories. I use a naming convention of category + number. When I click on a category, instead of changing the alpha for 50 or so isntance, I'd like to hit them all at once. Is that possible?
Multiple Button & Movie Clips
I have 3 Buttons that control 3 Movie Clips. 1 Button controls only one Movie Clip. Each Movie Clip runs for 7 seconds. The problems is if I click all 3 buttons inside the 7 seconds all 3 Movie Clip will be playing together.
If someone clicks the button quickly I want the present Movie Clip to stop and the new one start. In other words I only want one Movie Clip to be able to play at once.
I know this can be done, but I need some help please...Thanks
Preloaders For Multiple Movie Clips
I have an animation that stops at a frame in a main movie. Several (randomly generated) .swfs are loaded into container movie clips on the stage.
I wondered how I would go about employing a preloader that accounts for the loading times of all the .swfs simultaneously.
Basically, so nothing is visible until ALL clips have fully loaded.
Any ideas?!
telekin:
__________________________________________________ __________
Help On Collusion Between Multiple Movie Clips
Any one know how to detect collusion between multiple movie clips against one.
I meant say I have a movie clip. Now I want to detect if it has collied with two or more other movie clips whose instant names are generated runtime.
Anyone Please ????
HELP: Controlling Multiple Movie Clips
Can somebody please tell me if there is a way to control multiple or all of the movieclips at once, (not the timelines, just a simple instruction like play() or gotoandstop() ) except the main movie clip ?
I mean, I can just put a tellTarget to each of the movieclips, but what if it's just a simple instruction for 20 or 30 movie clips ?
I tried with:
tellTarget(all){
play();
}
but that screwed the whole movie.
Thanks.
Controlling Multiple Movie Clips
I've got some script that i want to use to control 5(to 500 if need be) but is doesn't work on more than one movie clip. Previously, i would have just duplicated the script and changed the instance name. It doesn't work with this script(because of the .onEnterFrame). Does any one know how to send this script to multiple movie clips?
back_btn.onRollOver = function() {
first_mc.onEnterFrame = function() {
this.prevFrame();
}
}
back_btn.onRollOut = back_btn.onReleaseOutside = function() {
delete sqr_mc.onEnterFrame;
first_mc.stop();
}
the first_mc being the name of my instance.
Loading Multiple Movie Clips (HELP)
Greetings!
I've created a flash promo movie (the ones with the next and back buttons). Anyway, I have serveral movies that I want to use... How can I get them to load one after the other via the "next" and "back" buttons or just playing through... Thanks
Creating Multiple Movie Clips
Hi there - here is what I'm trying to achieve:
I have a m/c of a small square rotating from edge on to face on via it's Y axis. I want to now, using duplicateMovieClip, create 25 of these, in a grid 5 x 5, one after the other, playing as they are created.
I know how to create the 25 duplicates, using Linkage in the library and something like this:
Code:
for (i=1; 1<=25; i++) {
square_mc.duplicateMovieClip("square" + i + "_mc", i)
}
But once they are created, how do I reposition them? Also I will need to be able to determine once 5 are created so that a new line is started.
Would it be something like this: Set a first X and Y position before the loop and after each pass, use -
Code:
this._x = n + somenumberofpixels
this._y = g + somenumberofpixels
where n is the preset _x before the loop and g is the preset _y before the loop and somenumberofpixels is the size of the square after full rotation plus a little gap inbetween?
Sorry my text sounds/reads a bit messy; I can see the solution, but I just don't know how to reach it.
cheers
frank
Visibility Of Multiple Movie Clips
part of my website involves an archive of stories. i wanted to menu to select each story to be scrollable, because of this i could not figure out how to use goto frames to get each new story. so instead im using
onClipEvent (load) {
setProperty("/aaaaaaa", _visible, "0");
setProperty("/Panels/Grid State/mark1", _visible, "0");
}
on each story's MC, and the button to activate each story has this:
on (release) {
visible = int (getProperty("/aaaaaaa", _visible));
if (visible == "1") {
setProperty("/aaaaaaa", _visible, "0");
setProperty("/Panels/Background_State/mark1", _visible, "0");
}
if (visible == "0") {
setProperty("/aaaaaaa", _visible, "100");
setProperty("/Panels/Background_State/mark1", _visible, "100");
this.swapDepths(_root.mcNum);
_root.mcNum = "_root.aaaaaaa";
}
}
my problem comes when a person activates a story., but then goes to activate another - the first one remains. I could just have each button make every other story have visible = 0, but i plan on adding more and more stories, so adding each story to each code would become exponentially tedious...
is there a way to code so that "all but this story has visibility = 0"
thank you
Scroll Multiple Movie Clips
hi, im trying to scroll a "content" movie clip up and down controlled by a couple of buttons (not a scrollbar). I need to be able to load in different movie clips with varying sizes (depending on content in them) and control them.
anyone know how i can do it? or know any tuts? ive found heaps using scrollbars, but none using what i would think is more simple just buttons.
thanks!
Call Multiple Movie Clips...HELP
i have a movie clip called splatter.
then on the main timeline, I have the following actionscript on frame 1
setInterval(placeIt,2000);
function placeIt() {
var name = "movieclip" + random(1000);
attachMovie("splatter", name, 1);
name._y = random(800);
name._x = random(600);
};
I want to be able to have this just run over and over and place hundreds of instances of splatter all over the page.
It works to a certain degree. It does attach a movie every 2 seconds, but it does it at coords 0,0 and not at the random x,y I am wanting. I think. At the very least it is calling the fuction and attaching a movie every 2 seconds.
How do I dynamically create a 'name' and then reference it?
Any help is greatly appreciated!
B
Multiple Movie Clips/ Loadingtimes
PLZ help
I have created a grid layout, in each of the squares of the grid is a movie-clip, i have copy and pasted the same clip into each of the squares. There are a few hundred squares, each with the same movie-clip. It creates a kinda mouse trail effect when u roll-over, (the clips have a roll-over command to play).
But heres the problem ... it takes way too long to load. I thought cos i used the same instance and movie-clip in each square, that it would only have to load the clip once. What am i doin wrong? Is there another way or am i stuck with the long loading time?
thnks
Tracking Multiple Movie Clips
My app has a number of dynamically created movie clips using duplicateMovieclip();. Each new clip's name is incremented one. How can I identify which movie clip has been last clicked or touched by the user.
I want this info because I want to be able to have the user select the movie clip he/she doesn't want anymore and kill it.
Below is the code that adds a movie clip:
//ADD PRODUCT CONTAINER
//Creates a new product container instance
//Try to get seperate variables
var x = 1;
function addContainer() {
var newClip = "container" add x add "_mc";
duplicateMovieClip(_root.stage_mc.container1_mc, newClip, x);
x++;
return;
}
Reversing Multiple Movie Clips?
Here's my problem. I have a stage set up with three movie clips. The main functions are as follow:;
aboutMc.onPress = function() {
playPanels("about", true);
playPanels("contact", false);
playPanels("portfolio", false);
};
contact.onPress = function() {
playPanels("contact", true);
playPanels("about", false);
playPanels("portfolio", false);
};
portfolio.onPress = function() {
playPanels("contact", false);
playPanels("about", false);
playPanels("portfolio", true);
};
function playPanels(mc, forward) {
_root[mc].onEnterFrame = function() {
if (forward) {
this.nextFrame();
} else {
this.prevFrame(-1);
}
};
}
Is there a way to delay opening a new movie clip until the existing clip on the stage closes? As it stands now... they will open and close at the same time(this is rather messy)
Please help.
Multiple Movie Clips As A Mask...help
Okay, so I am trying to make a mask for an image that will drip down like blood to reveal the picture underneath. I've tried several different ways of doing it, but the way that looks best is giving me trouble.
I have one movie clip as the mask, and inside are several layers with different movie clips. Some of the MCs are one drop of blood with a trail that stretches behind it. Some are MCs that contain a bunch of little drops that do the same thing.
When i test it, they all run correctly, EXCEPT when some of the clips overlap each other, they act as a NEGATIVE MASK and reveal what is under everything. This doesnt make sense to me! I thought that with everything overlapping, it would make a solid block that wouldn't have gaps or holes, but when they overlap, the overlapping regions create a hole and it just looks stupid.
Is this common? Should I scratch this idea and try doing it another way? Can anyone help?
Thanks!
Stopping Multiple Movie Clips
I’m using Flash MX.
I have a 4 minute flash video running multiple movie clips, some within each other and some one after the other.
I want to make a “pause” button. I realize that this will involve a stop(); and a play(); in some format but I can’t figure out how to “stop all movies” with one button without using complex paths to every one of my movie clips.
This is made even more complex by the fact that I have no idea when the viewer of the video will pause the video, so I don’t know which movie clips to stop at that point.
Adressing Multiple Movie Clips At Once Via AS
Okay um,
I got a few movie clips on the stage, which I want to move around when
I use the arrow keys, which isn't a problem, however instead of going
about typing in:
object1._x = object1._x - 5
object2._x = object2._x -5
object3._x = obj... and so on
I want to be able to adress ALL the movie clips I want to move around
in ONE line. I've tried placing all the object names in a array and adressing
the array._x to move them all around but that won't work for me, perhaps I'm
looking over something here...
anyone got ideas as to how I can tackle this ?
Multiple Movie Clips Doing Same Action?
hey all.
im working on a basic little game cup-under-ball game, with a twist. problem is, when you lift up a cup, only one cup will lift up, which is good, but the 'prize' object applies to all the other cups. how do i fix this.
thanks!
(enclosed is the flash im working on)
Resizing Multiple Movie Clips
I need to resize 4 square movie clips that are just plain colored.I want them to grow in width and height to a specific size. They also need to resize after the previous one has finished.
I suck with AS so could someone give a script and explain it to me. I would greatly appreciate it. I'm working for a client so..not much time.
Thanks again.
Duplicate Multiple Movie Clips From Xml
I'm using the duplicateMovieClip command with regard to an xml file. I'm trying to duplicate several clips inside the fla all depending on the number of entries with in the database. I've managed to successfully duplicate the firstchild of the xml file but when it comes to a duplicate movie clip of multiple symbols inside the fla., it only duplicates the last duplicate movie command.
Has anyone encountered a problem like this where the fla will only duplicate one symbol as opposed to several different symbols in the same manner.
heres the code I'm using
museum_xml = new XML();
museum_xml.onLoad = startObjects;
//museum_xml.onLoad = startChurchs;
museum_xml.load("xml/museums.xml");
museum_xml.ignoreWhite = true;
//_root.background.tecg.text = "lkjlkjlk";
function startObjects(success)
{
startMuseums(success);
startChurchs(success);
}
function startMuseums(success) {
if (success == true) {
rootNode = museum_xml.firstChild.firstChild;
for (var i = 0; i < rootNode.childNodes.length; i++)
{
//trace("loop"+i);
museumNode = rootNode.childNodes[i];
nodeName = museumNode.attributes.name;
duplicateMovieClip("_root.background.mainMap.map.p an.start", nodeName, i);
//_root.background.nodeName
x = museumNode.attributes.x;
y = museumNode.attributes.y;
//url = museumNode.attributes.url;
//line2 = museumNode.attributes.line2;
//line3 = museumNode.attributes.line3;
// create new movie clip
// set all properties most importantly name
// make visible
setProperty("_root.background.mainMap.map.pan."+no deName, _x, x);
setProperty("_root.background.mainMap.map.pan."+no deName, _y, y);
setProperty("_root.background.mainMap.map.pan."+no deName, _visible, false);
}
}
}
function showText(museum_name)
{
_root.background.line1.text = museum_name;
rootNode = museum_xml.firstChild.firstChild;
for (var i = 0; i < rootNode.childNodes.length; i++)
{
museumNode = rootNode.childNodes[i];
if (museum_name == museumNode.attributes.name)
{
_root.background.line1.text = museumNode.attributes.line1;
_root.background.line2.text = museumNode.attributes.line2;
_root.background.line3.text = museumNode.attributes.line3;
}
}
}
function clearText()
{
_root.background.line1.text = "";
_root.background.line2.text = "";
_root.background.line3.text = "";
}
function openMuseumURL(museum_name)
{
rootNode = museum_xml.firstChild.firstChild;
for (var i = 0; i < rootNode.childNodes.length; i++)
{
museumNode = rootNode.childNodes[i];
if (museum_name == museumNode.attributes.name)
{
getURL(museumNode.attributes.museum_url, "_blank");
}
}
}
function toggleMuseumVisibility(visibleV) {
//trace("bout to show / hide");
rootNode = museum_xml.firstChild.firstChild;
for (var i = 0; i < rootNode.childNodes.length; i++)
{
museumNode = rootNode.childNodes[i];
nodeName = museumNode.attributes.name;
//trace("showing " + nodeName);
setProperty("_root.background.mainMap.map.pan."+no deName, _visible, visibleV);
}
}
function startChurchs(success) {
if (success == true) {
rootNode = museum_xml.firstChild.firstChild.nextSibling;
for (var i = 0; i < rootNode.childNodes.length; i++)
{
//trace("loop"+i);
churchNode = rootNode.childNodes[i];
nodeName = churchNode.attributes.name;
duplicateMovieClip("_root.background.mainMap.map.p an.church", nodeName, i);
//_root.background.nodeName
x = churchNode.attributes.x;
y = churchNode.attributes.y;
//url = churchNode.attributes.url;
//line2 = churchNode.attributes.line2;
//line3 = churchNode.attributes.line3;
// create new movie clip
// set all properties most importantly name
// make visible
setProperty("_root.background.mainMap.map.pan."+no deName, _x, x);
setProperty("_root.background.mainMap.map.pan."+no deName, _y, y);
setProperty("_root.background.mainMap.map.pan."+no deName, _visible, false);
}
}
}
function showText(church_name)
{
_root.background.line1.text = church_name;
rootNode = museum_xml.firstChild.firstChild.nextSibling;
for (var i = 0; i < rootNode.childNodes.length; i++)
{
churchNode = rootNode.childNodes[i];
if (church_name == churchNode.attributes.name)
{
_root.background.line1.text = churchNode.attributes.line1;
_root.background.line2.text = churchNode.attributes.line2;
_root.background.line3.text = churchNode.attributes.line3;
}
}
}
function openchurchURL(church_name)
{
rootNode = museum_xml.firstChild.firstChild.nextSibling;
for (var i = 0; i < rootNode.childNodes.length; i++)
{
churchNode = rootNode.childNodes[i];
if (church_name == churchNode.attributes.name)
{
getURL(churchNode.attributes.church_url, "_blank");
}
}
}
function togglechurchVisibility(visibleV) {
//trace("bout to show / hide");
rootNode = museum_xml.firstChild.firstChild.nextSibling;
for (var i = 0; i < rootNode.childNodes.length; i++)
{
churchNode = rootNode.childNodes[i];
nodeName = churchNode.attributes.name;
setProperty("_root.background.mainMap.map.pan."+no deName, _visible, visibleV);
}
}
Duplicate Movie Clips For Multiple MC's
I need to duplicate several MC's (each one x 20) when he movie is loaded.
I can't get it to work for the life of me....
Any ideas?
Thanks
~fit
this code resides in _root.MC and the first frame
================================================== ==
count = 0;
function dup1() {
while (count<20) {
circle.duplicateMovieClip("circle"+count, count);
count++;
}
}
count2 = 0;
function dup2() {
while (count2<20) {
circle2.duplicateMovieClip("circle2"+count2, count2);
count2++;
}
}
dup1();
dup2();
================================================== =
Only duplicates the circle2. If I don't initiate the 2nd func (dup2();...it works for circle...and visa/versa?????????
Can you NOT do duplicate movies for multiple MC's??
|