FORUMS: list search recent posts

specify a duplicate movie

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
specify a duplicate movie
on Apr 3, 2006 at 9:12:56 pm

Hello all,

I'm doing some xml / experimenting and was hoping for some input. I have an image holding box movie clip that is duplicated and loaded with images specified in an xml file. I already have it working where if you click on a box it loads a url as specified in the xml, but what I'm wondering is there a way to specify the clicked box. for instance if box one is clicked is there a way to basically tell all the other boxes to go invisible or have a different alpha setting than the box that has been clicked?

Here is my actionScript, if anyone has any ideas or suggestions on different ways to go with this I'm all ears:

var xml:XML = new XML();
xml.ignoreWhite = true;
var namers:Array = new Array();
var link:Array=new Array()
xml.onLoad = function(){
var nodes = this.firstChild.childNodes;
//Loops through the XML nodes and caches them//
for(i=0;i namers.push(nodes[i].attributes.namers);
var myBox = box.duplicateMovieClip("box"+i,i+1);
myBox.useValue = i; // this is my made up variable
myBox.onRollOver = function(){
myBox.onRollOut = function(){
myBox.onEnterFrame = getImage;
myBox.onRelease = gotoLink;
var leftMargin = 100;
var topMargin = 100;
var cellWidth =110;
var cellHeight=110;
var maxBoxes= nodes.length;
var nbrColumns = 3;
var cellX = i%nbrColumns;
var cellY = Math.floor(i/nbrColumns);
myBox._x = leftMargin+cellX*cellWidth;
myBox._y = topMargin+cellY*cellHeight;

}function gotoLink(){

temp_url = link[this.useValue];

function getImage(){
temp_name = namers[this.useValue];





Return to posts index

Re: specify a duplicate movie
on Apr 15, 2006 at 3:33:43 pm

Does anyone have any ideas? I'm still kind of in the dark here. Other help I've gotten but tried has had no effect for me.

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 All Rights Reserved