# Figuring out some code

**URL:** <https://forum.kirupa.com/t/figuring-out-some-code/194755>\
**Category:** Uncategorized\
**Created:** [July 26, 2006, 12:48am UTC](https://forum.kirupa.com/t/figuring-out-some-code/194755 "2006-07-26T00:48:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rotarypot](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/rotarypot/32/1289_2.png) [@rotarypot](https://forum.kirupa.com/u/rotarypot)\
**Post date:** [July 26, 2006, 12:48am UTC](https://forum.kirupa.com/t/figuring-out-some-code/194755/1 "2006-07-26T00:48:21Z")

</div>

i figured out most of the following code, except for the one in RED  
there is a function called ‘displayStar’  
i guess that displayStar is called when…display?

🅱

```auto

objectsInScene = new Array();
for (i = 1; i <= 10; i++)
{
    attachedObj = theScene.attachMovie("seccion", "star" + i, theScene.depth++);
    attachedObj.x = 500 - Math.random() * 1000;
    attachedObj.y = 500 - Math.random() * 1000;
	
	///mine code
	attachedObj._yscale = Math.random() * 100;
	attachedObj._xscale = Math.random() * 100;
	attachedObj._alpha = Math.random() * 100;
		
    attachedObj.z = i * 500;
    attachedObj.onPress = selectStar;
[COLOR="Red"] attachedObj.display = displayStar;[/COLOR]
	objectsInScene.push(attachedObj);

```
