PDA

View Full Version : Taking Random items from the library


o_f
01-13-2003, 09:17 AM
Is is possible to output random items from the library or how do u call certain items from the linrary to the screen when u run the movie clip?

farafiro
01-13-2003, 09:36 AM
welcome o__f to the forums, to get an object from the lib we use attachMovie(), like that
_root.attachMovie("mc","newMc",1)the "mc" is its linkage name, we give it to the mc instance from the library

to attach a random object, say we hace 5 object in the lib with the names of (mc0,mc1, to mc4)on(release){
ranNum = Math.round(Math.random()*4)
_root.attachMovie("mc"+ranNum, "newMc",10)
}