Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Website Design Forum


You are currently viewing our Website Design Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Another Flash question
Old 02-25-2008, 01:34 PM Another Flash question
ADAM Web Design's Avatar
Canadastaninianite

Posts: 5,935
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
Trades: 0
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.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
(my blog)


Please login or register to view this content. Registration is FREE
(with proof)
ADAM Web Design is offline
Reply With Quote
View Public Profile Visit ADAM Web Design's homepage!
 
 
Register now for full access!
Old 02-26-2008, 02:03 AM Re: Another Flash question
ADAM Web Design's Avatar
Canadastaninianite

Posts: 5,935
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
Trades: 0
Never mind. Got it.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
(my blog)


Please login or register to view this content. Registration is FREE
(with proof)
ADAM Web Design is offline
Reply With Quote
View Public Profile Visit ADAM Web Design's homepage!
 
Reply     « Reply to Another Flash question
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.09563 seconds with 12 queries