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 ?
FlashKit > Flash Help > Flash ActionScript
Posted on: 02-26-2004, 08:15 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Adressing Movie Clips And Hybrid Sites
hi,
I am tryin to make a hybrid site with a flash navigation menu.
I dont know how to target an element on a html page from within the flash file.
On the home page there is a flash menu at the top of the page and the rest of the page is html. How do i load a frame in the page with different content by clicking the flash menu.
Also if there are 3 movies on the stage, how do u target all the timelines within the movie clips by clicking on 1 movie.
Thanks...
and thanks for the help on the preloader.
Adressing Multiple MC's With Functions.
Hi,
I can post the .fla if you want, but id thought id explain it all first.
Im making a wierd little project with a strange flower that looks crazed and does different stuff.
One of the things it does is have moving petals, i created a random movement code that worked perfectly when applied to each petalMC (i have multiple copies of the MC containing the MC with the code attached so it works on every single one.) But now, i want it to do different things according to different events, and the only way i can see is to use lots of variables at the _root level and LOTS of 'if' checks in the movieclips, which would eat up some system speed.
I tried setting a function with the different actions i want, and applying that to the petalMC from the root level, but for some reason now it only applies to one of the petals, instead of every petal (which it should, because its adressing the MC inside the copies, so every copy should act the same?)
Any idea of how to adress those multiple petals without using lots of check statements or arrays and complicated names,
Thanks for your time,
Alex
EDIT : Oh well, ill add it anyway
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
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 Buttons Multiple Movie Clips - PLEASE HELP ME
Hello -
QUICK BACKGROUND: I am working in Flash MX. I have used Flash for over 3 years, however, I am still struggling with Action Scripting. I plan to take some advanced courses this Autumn.
THE PROJECT AND PROBLEM: I am working on a large Flash site for a cosmetic dentist. I have multiple buttons and when you rollover the button, it will play a movie clip. I got this to work okay.
EXCEPT, I want the movie clip to stay in place and then go away when you click on the next button. Currently, I do not really have any Action Scripting involved except for a few STOP actions. The movie clip is attached to the "OVER" state for each button.
I have attached the .fla file for anyone who can take a few moments to review it. I am really at a stand-still and ready to have a nervous breakdown trying to figure this out. I have been up until 3am every night for the last 4 nights researching this and I have come close but still have not figured it out.
Any help is GREATLY APPRECIATED!!
Denise
Multiple Preloaders For Multiple Movie Clips
Designed in Flash 8, the site's timeline is all in Scene 1 and is comprised of an introduction, which contains a short video, and 6 movie clip categories that the user selects to view. Since I want the intro to play as soon as possible, I'd like to limit the first preloader to just the video in the intro and not _root.getBytesTotal. Then, as the viewer watches this short video, the rest of Scene 1 movie clips will keep on loading. After the intro, the viewer will choose which of the 6 categories to view. These categories are identified with buttons which play the particular movie clip. Since I don't know the order of the categories they will select, I thought there should be a separate preloader for each category. Hopefully, after they view a category, the rest of the categories will have loaded and the loading time will be nil. The design for the preloader is comprised of a status bar and a percent loaded. Is there a way to limit the _root.GetBytesTotal to specific frames? I know I could break these categories up into separate SWF files but then I loose the advantage of one loading while another is being viewed.
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!!
Question On Adressing A Loaded Movie
I have a project which requires a lot of dynamic content to be loaded based on user logins. I'm loading in several .swfs and then attempting to address them. KEY THING: _levels will not work as the whole focus on this project is dynamic creation of content, ie, draggable placement of items within a given area. so I load the external .swfs into a blank movie clip instance placeholder. what I want to know is this:
is there a way to address the loaded movie to get properties like _width and _height of that movie to resize a button instance to place over it to make it draggable? (is that clear? ) basically I have tried this:
_root.viewingplane.photo1.button1._height = _root.viewingplane.photo1.placeholder1._height;
and it does not work. I searched here, and someone said
Quote:
you can't address a loaded .swf as you would a movie clip directly.
is this true? Is there any way, through anything other than levels? I really need these clips to exist on the same level as not only each other, but the rest of the movie as well.
any help would be greatly appreciated
Adressing Maintimeline From External Movie
I have a button in an externally loaded swf that I want to tell to go to a scene "main" on the root movie timeline and play frame 260. It doesnt work!!
on (press) {
_root.gotoAndPlay(main,260);
}
The only thing that works is if I ignore scenes and find the particular frame of the root movie where that frame resides ie
on (press) {
_root.gotoAndPlay(288);
}
This will be the death of me.
Adressing Main Movie From Inside Mc
Ok, there's different ways to tackle the problem I have, you only need to answer one of the questions:
I have a button inside a movie clip, and when it's clicked, I want to advance the main timeline. How would I do this?
OR
Can you add roll-over actions to movieclips and not just buttons, coz everytime I try to it f**ks up.
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 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
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.
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??
Multiple Movie Clips Embedded
I have multiple MC's in 2 scenes. They are the same clips, but now i want to add a different MC in each. How can I allow them to work separately so that each scene has different clips?
Controlling Multiple Movie Clips...
I have a portfolio page in which I have 10 images. I am trying to turn off all 9 and keep only the selected one on...
i.e. turn off mc 1-9 turn on 10, or turn off 2-10, turn on 1 etc. it is overlapping and all jumbled -
please take a look - www.prevestige.com
then click on vestigia at the top left (red button)
then click on "tilton" (the only active project at the moment)
p.s. - im doing this in Flash 5
please help!
thanks for any assistance...
|