# onClipEvent (enterFrame)/Array misery

**URL:** <https://forum.kirupa.com/t/onclipevent-enterframe-array-misery/120782>\
**Category:** Uncategorized\
**Created:** [August 27, 2004, 10:57am UTC](https://forum.kirupa.com/t/onclipevent-enterframe-array-misery/120782 "2004-08-27T10:57:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pup\_100](https://avatars.discourse-cdn.com/v4/letter/p/da6949/32.png) [@Pup\_100](https://forum.kirupa.com/u/Pup_100)\
**Post date:** [August 27, 2004, 10:57am UTC](https://forum.kirupa.com/t/onclipevent-enterframe-array-misery/120782/1 "2004-08-27T10:57:02Z")

</div>

[font=Times New Roman]I’ve got the following simple script in the first keyframe of my movie & the appropriate text field & clip on stage.[/font]

[font=Times New Roman][color=red]cols=[0x2915B9,0xA62445,0xA4B812,0x09C14E][/color][/font]

[font=Times New Roman][color=red]my\_color=new Color(my\_clip);[/color][/font]

[font=Times New Roman]On my movie Clip (my\_clip) I have the following script:[/font]

[font=Times New Roman][color=red]onClipEvent (enterFrame) {yet=Math.floor(Math.random()\*4)[/color][/font]

[font=Times New Roman][color=red]my\_color.setRGB(cols[Number(yet)])[/color][/font]

[font=Times New Roman][color=red]\_root.lippy\_txt.text=yet;[/color][/font]

[font=Times New Roman][color=red]}[/color][/font]

[font=Times New Roman]Although when testing the text field displays the appropriate numbers, the clip instance does not change color?[/font]

[font=Times New Roman]Could anyone point out where I’m going wrong & then point out the nearest drug store so I can buy some headache pills?[/font]

[font=Times New Roman]Thank you.[/font]
