Okay...I've got another Flash question.
Here's the deal: I'm trying to create a photo scroller, and I've got the photos loaded into movie clips via a preloader. However, when I try to duplicate them and put them into a slider, they don't seem to want to...well, duplicate, or more importantly, show up in the Flash itself.
I'm sick of struggling with this (and discovering 100 more reasons why Flash sucks), so I'm going to post the ActionScript for the slider holder and hopefully someone out there will have some clue as to what the hell is going on.
Code:
onClipEvent (enterFrame) {
if (!thumbsDisplayed) {
var xPosition, yPosition, xSpacer;
xSpacer = 10;
xPosition = xSpacer;
yPosition = 10;
var sliderWidth, sliderHeight;
sliderWidth = 10;
sliderHeight = 74;
this.opaqueBackground = 0xFF0000;
for (var i = 0; i < _root.maxSize; i++) {
var movieName = "thumb_" + i;
var movieWidth = _root.thumbWidth[i];
var movieHeight = _root.thumbHeight[i];
var currentClip:MovieClip = _root[movieName];
clipsCount = clipsCount + 1;
var newMovieName = "thumb_" + clipsCount;
duplicateMovieClip(currentClip, newMovieName, clipsCount);
setProperty (_root.sliderHolder[newMovieName], _x, xPosition);
setProperty (_root.sliderHolder[newMovieName], _alpha, 100);
setProperty (_root.sliderHolder[newMovieName], _width, _root.thumbWidth[i]);
xPosition = xPosition - (-1 * movieWidth) - (-1 * xSpacer);
}
sliderWidth = xPosition;
this.lineStyle (1, 0xFFFFFF, 0);
this.lineTo(sliderWidth, sliderHeight);
this._x = xSpacer;
this._y = 10;
_alpha = 100;
thumbsDisplayed = true;
}
}
When I do a trace on currentClip._width, I get the correct width of the movie. However, I can't set any properties for the new movie, nor does it seem to duplicate the photo inside of it.