I gotta run home, maybe someone else can help - I'll try and write up
some examples if I can later  - but relax, don't go nuts on us.  And you
didn't have to change your sig just because I teased you a little!  :)  

Seriously, I'll try and work up an example that might be a little
cleaner if I can find some time tonight or tomorrow. 

Jason Merrill   |   E-Learning Solutions   |  icfconsulting.com










>>-----Original Message-----
>>From: [EMAIL PROTECTED] [mailto:flashcoders-
>>[EMAIL PROTECTED] On Behalf Of Corban Baxter
>>Sent: Wednesday, February 01, 2006 6:42 PM
>>To: Flashcoders mailing list
>>Subject: RE: [Flashcoders] understanding the for loop - EXTENDED HELP
NEEDED.
>>
>>Well it's kind of working. I'd love to have some help on this to get
me
>>going correctly. So with that said I'll try and explain what this is.
>>
>>Ok so we are creating a screensaver that has 5 img layouts/templates
>>with different numbers of images per layout but they have empty MC's
in
>>place to place the images later.
>>
>>For each template we have created sets of images to choose from that
>>will be placed in each template. These images have linkage id's in the
>>lib.
>>
>>What we want to do is select a random "LAYOUT" (template). Then select
>>images for each position in the layout/template at random from a set
of
>>images designed for each template. So with that said it's a mouth
full.
>>
>>What I thought I could do is generate all this random stuff and create
>>an array from it that stores my images to be used. Then I need to
>>generate a list of MC's to place these images into. Which is more or
>>less determined in each template but each template has a different #
of
>>images in it.
>>
>>NEXT issue is this. Once I have both array's one of "linkage id's" for
>>the template and another array that holds my "MC references". I want
to
>>load these images into the corresponding MC but in another random
order.
>>(I know I know but we don't ever want ANYTHING to look the same
twice).
>>
>>So what I will have to do is then figure out a decent way to get the
>>loading to work without killing myself.
>>
>>Now my new problem is flash is telling me my function "createMCrfcs "
is
>>some sorta infinite loop and can't finish the task. Which makes no
sense
>>cause I am more or less doing the same thing above. But what ever. I
>>hope this makes sense and someone can throw some insight to me after
>>typing all this! Thanks for listening boys!
>>
>>I'm going crazy and this might sound crazy but any help would be
GREATLY
>>appericated!!!!
>>
>>
>>//setup vars
>>clipNum = 1;
>>
>>selectLayoutNum = function(){
>>              //check if it was the last layout
>>              //set layoutNum
>>              layoutNum = random(5) +1;
>>              while(layoutNum == oldNum){
>>                      layoutNum = random(5) +1;
>>              }
>>              oldNum = layoutNum;
>>              trace("layoutNum: " + layoutNum);
>>              getSetsNLayout(layoutNum);
>>}
>>
>>getSetsNLayout = function(layoutNum){
>>      setsArray = [null, 3, 3, 3, 3, 4];
>>      totalSetsNLayout = setsArray[layoutNum];
>>      trace("totalSetsNLayout: " + totalSetsNLayout);
>>      gatherImages4Layout(totalSetsNLayout, layoutNum);
>>}
>>
>>gatherImages4Layout = function(totalSetsNLayout, layoutNum){
>>      totalImagesNLayout = [null, 9, 8, 6, 6, 11];
>>      imagesToGrab = totalImagesNLayout[layoutNum];
>>      trace("imagesToGrab: " + imagesToGrab);
>>
>>
>>      //dynamicly create array of images to be used in layout
>>      imgArray = new Array();
>>      for(i=0; i<=imagesToGrab; i++){
>>              randomSet = random(totalSetsNLayout) + 1;
>>              while(randomSet == oldSet){
>>                      randomSet = random(totalSetsNLayout) + 1;
>>              }
>>              oldSet = randomSet;
>>
>>              img = "layout" + layoutNum + "_set" + randomSet + "_img"
>>+ i;
>>              imgArray.push(img);
>>      }
>>      trace("imgArray= [" + imgArray + "]");
>>      gotoAndPlay("lay_" + layoutNum);
>>      createMCrfcs(layoutNum, totalImagesNLayout);
>>}
>>
>>createMCrfcs = function(layoutNum, totalImagesNLayout){
>>      trace("totalSetsNLayout: " + totalSetsNLayout);
>>      //create clip array...
>>      rfcsArray = new Array();
>>      for(p=0; p<=totalImagesNLayout; p++){
>>              myMC = "lay" + layoutNum + "_img" + p;
>>              rfcsArray.push(myMC);
>>      }
>>      trace("rfcsArray = [" + rfcsArray + "]");
>>}
>>
>>selectLayoutNum();
>>stop();
>>
>>
>>
>>
>>//cb
>>_______________________________________________
>>Flashcoders mailing list
>>Flashcoders@chattyfig.figleaf.com
>>http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
NOTICE:
This message is for the designated recipient only and may contain privileged or 
confidential information. If you have received it in error, please notify the 
sender immediately and delete the original. Any other use of this e-mail by you 
is prohibited.
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to