Hey, I am new here.  So bare with me.  I am working on a globe portion of my 
file I want the globe to look like it is turning. so I randomly generated green 
islands on a blue background.
Just looks like a short segment of a circle blue with green islands on it. 


Since I wanted to continuously generate islands as I scroll, I chose random.  
The code that I used: prototype.loadIsland below (Works Just Fine).  What I 
want to do is take the island instances and scroll them towards to bottom of 
the screen and expand it so It looks like getting closer or flying towards a 
horizon from the air.  Use:

 island._xscale+=2;    
 island._yscale+=1;
 island._y+=2;

 the only problem is that I want to run a function for all island instances 
after they are on   screen.  If you look at the code below, that means either 
setting a function to move them individually till they are off screen, or maybe 
with an array after they are all generated and moving the batch, and unloading 
them at a high enough y value (when they are off screen).
then reloading a version of the function with tighter placement parameters 
(smaller and on the horizon), and looping through the scroll function. For a 
constantly spinning globe.  I will share the code with anyone who helps me out 
on this.

Anyone Have any solutions or ideas that would work?


_global.islandClass=function(){};
island = new islandClass();

islandClass.prototype.loadIsland=function(){
 islandNum=1;
 for(i=251;i<=291;i++){     
 attachMovie("island", "island"+islandNum, islandNum);  
//placing the mc, naming the instance and adding it to the level (islandNum).

 island=eval("island"+islandNum);
//generating an  instance for the object

 x=random(900);
 while(x<0 || x>800){x=random(900);}
 island._x=x;
//x parameters - keeping it on screen not sure if I need to do this.
 
 y=random(600);
 while(y<425 || y>500){ y=random(600);}
 island._y=y;
//y parameters - lower portion of screen

 scale=random(64);

islandNum++;}
}



Thank you!!
Paul V.


_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to