referencing createEmptyMovieClip with dynamic names

This is a discussion on "referencing createEmptyMovieClip with dynamic names" within the Flash & Multimedia Forum section. This forum, and the thread "referencing createEmptyMovieClip with dynamic names are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Flash & Multimedia Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Jun 4th, 2007, 01:11
New Member
Join Date: Jun 2007
Location: Sydney
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
referencing createEmptyMovieClip with dynamic names

Hi i almost have this but i have a dilema, can anyone please help?

I am trying to load a series of 33 images into my movie to create a slide show. now as creating say 100 individual movie clips is teadious i wanted to do it dynamically.

My issue is that it creates the movieclips and loads the movies fine BUT does not retain the previous created movieclip. IE if i create 33 movies after the function completes only CLimage33 is the only one on the stage. all the others have dissapeared. ANY help will be apprecited.

//------IMAGE Load---------------//
imageCount = 1;
pageCount = 1;
maxImages = 1;

function initLoadMovies() {
if (_root.maxImages <= 33) {
_root.createEmptyMovieClip ("CLimage"+_root.imageCount, this.getNextHighestDepth());
loadMovie ("images/"+_root.imageCount+".jpg", _root["CLimage"+_root.imageCount]);
if (_root["CLimage"+_root.imageCount].getBytesLoaded() >= _root["CLimage"+_root.imageCount].getBytesTotal()) {
trace ("CLimage"+_root.imageCount+" Loaded");
_root.imageCount++;
_root.maxImages++;
initLoadMovies();
}
}
}
initLoadMovies();

function nextImage (){
if (_root.pageCount == _root.maxImages) {
_root.pageCount= 1;
} else {
_root.pageCount++;
_root["CLimage"+_root.pageCount]._y = 200;
}
}
Reply With Quote

  #2 (permalink)  
Old Jun 4th, 2007, 22:49
New Member
Join Date: Jun 2007
Location: Sydney
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Re: referencing createEmptyMovieClip with dynamic names

thanks to all who replied >_>..

the issue was..
_root.createEmptyMovieClip ("CLimage"+_root.imageCount, this.getNextHighestDepth());

i had to change it to

_root.createEmptyMovieClip ("CLimage"+_root.imageCount, _root.imageCount);

the this.getNextHighestDepth() set them all to the same depth and must have overridden the previous created movieclip on that depth level.

hopefully this helps anyone who has had a similar problem
Reply With Quote
  #3 (permalink)  
Old Jun 5th, 2007, 15:02
Multimedia Specialist
Join Date: Apr 2007
Location: Arizona
Age: 25
Posts: 666
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Sgaspar11
Re: referencing createEmptyMovieClip with dynamic names

Awesome! Thanks for posting your solution.

Sorry I didn't have a chance to respond, some issues came up this last weekend and I have been away working on those...

Cheers!

Scott
Last Blog Entry: Yay!? (Oct 8th, 2007)
Reply With Quote
Reply

Tags
createemptymovieclip, dynamic names

Thread Tools

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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Pulll Down menu referencing a list rmcellig Web Page Design 8 Feb 23rd, 2008 14:17
Domain Names Help crackafaza Hosting & Domains 7 Oct 19th, 2007 16:12
createEmptyMovieClip & onclick R Verbrugge Flash & Multimedia Forum 7 Sep 13th, 2007 15:34
Referencing the original size of a .jpg... DrGonzo Flash & Multimedia Forum 0 Mar 15th, 2007 11:32


All times are GMT. The time now is 07:31.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43