Posts Topics Forums Images
Search videos from message boards Videos Search messages from microblogs Microblogs Search messages from imdb.com Imdb Search messages from yuku.com Yuku Search messages from lefora.com (free forums) Lefora
My account: Login | Sign Up
Loading... 

Thread: Place 35 movie clips in random order on stage in specific XY coordinates

Started 1 month, 3 weeks ago by mercuryfx
I have 35 movie clips named mcMyObject1, mcMyObject2, etc. to mcMyObject35 Each time the playhead enters the frame this code sits on, I want all of these 35 movie clips to be placed on the stage in random order I want each one of these 35 movie clips to land on one of these X coordinates: 57, 187, 317, 447, 577, 707, 837 and on one of these Y coordinates: 53, 183, 131, 443, 573. (It's a 7 x...
Site: Kirupa Forum  Kirupa Forum - site profile
Forum: ActionScript 1.0/2.0  ActionScript 1.0/2.0 - forum profile
Total authors: 3 authors
Total thread posts: 9 posts
Thread activity: no new posts during last week
Domain info for: kirupa.com

Other posts in this thread:

cjke.7777 replied 1 month, 3 weeks ago
Hi mate, First you have a variable called setNewLocations and a function called setNewLocations() this will lead to problems. Second your trace (that returns NaN) is because you can't times two arrays. Can i ask why you were * the arrays? Also what are the names of the stage objects?

mercuryfx replied 1 month, 3 weeks ago
Quote: Originally Posted by cjke.7777 Hi mate, First you have a variable called setNewLocations and a function called setNewLocations() this will lead to problems. Second your trace (that returns NaN) is because you can't times two arrays. Can i ask why you were * the arrays? Also what are the names of the stage objects?...

glosrfc replied 1 month, 3 weeks ago
ActionScript Code: stop ( ) ; // Use just a single Object var myArray = [ { x: 57 , y: 53 } , { x: 57 , y: 187 } , { x: 57 , y: 317 } , { x: 57 , y: 447 } , { x: 57 , y: 577 } , { x: 57 , y: 707 } , { x: 57 , y: 837 } , { x: 187 , y: 53 } , { x: 187 , y: 187 } , { x: 187 , y: 317 } , { x: 187 , y: 447 } , { x: 187 , y: 577 } , { x: 187 , y: 707...

mercuryfx replied 1 month, 3 weeks ago
Quote: Originally Posted by glosrfc ActionScript Code: stop ( ) ; // Use just a single Object var myArray = [      { x: 57 , y: 53 } , { x: 57 , y: 187 } , { x: 57 , y: 317 } , { x: 57 , y: 447 } , { x: 57 , y: 577 } , { x: 57 , y: 707 } , { x: 57 , y: 837 } ,    &...

glosrfc replied 1 month, 3 weeks ago
No worries...it does work Not surprised your script didn't work as there were a host of syntax/logic errors in addition to those already highlighted: this["mcFindObject"+1].Number - there is no built-in Number property for MovieClips and no indication that you've assigned your own property anywhere this["mcFindObject"+((i-1)*7+j)].newXLoc - Same as above this.newXLoc - no variable ...

mercuryfx replied 1 month, 3 weeks ago
Quote: Originally Posted by glosrfc No worries...it does work Not surprised your script didn't work as there were a host of syntax/logic errors in addition to those already highlighted: this["mcFindObject"+1].Number - there is no built-in Number property for MovieClips and no indication that you've assigned your own property ...

glosrfc replied 1 month, 3 weeks ago
The script was commented so you should be able to follow it. If I'm around, it'll be in here so feel free to post...if I'm not around, there are plenty of others who'll provide assistance.

mercuryfx replied 1 month, 3 weeks ago
Quote: Originally Posted by glosrfc The script was commented so you should be able to follow it. If I'm around, it'll be in here so feel free to post...if I'm not around, there are plenty of others who'll provide assistance. Fair enough. Thanks again!

 

Top contributing authors

Name
Posts
mercuryfx
5
user's latest post:
Place 35 movie clips in random...
Published (2009-11-12 21:09:00)
Quote: Originally Posted by glosrfc The script was commented so you should be able to follow it. If I'm around, it'll be in here so feel free to post...if I'm not around, there are plenty of others who'll provide assistance. Fair enough. Thanks again!
glosrfc
3
user's latest post:
Place 35 movie clips in random...
Published (2009-11-12 19:20:00)
The script was commented so you should be able to follow it. If I'm around, it'll be in here so feel free to post...if I'm not around, there are plenty of others who'll provide assistance.
cjke.7777
1
user's latest post:
Place 35 movie clips in random...
Published (2009-11-12 17:18:00)
Hi mate, First you have a variable called setNewLocations and a function called setNewLocations() this will lead to problems. Second your trace (that returns NaN) is because you can't times two arrays. Can i ask why you were * the arrays? Also what are the names of the stage objects?

Related threads on "Kirupa Forum":

Related threads on other sites:

Thread profile page for "Place 35 movie clips in random order on stage in specific XY coordinates" on http://www.kirupa.com. This report page is a snippet summary view from a single thread "Place 35 movie clips in random order on stage in specific XY coordinates", located on the Message Board at http://www.kirupa.com. This thread profile page shows the thread statistics for: Total Authors, Total Thread Posts, and Thread Activity