# ColorRequired

**URL:** <https://forum.kirupa.com/t/colorrequired/172669>\
**Category:** flash\
**Created:** [December 16, 2005, 6:09pm UTC](https://forum.kirupa.com/t/colorrequired/172669 "2005-12-16T18:09:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Force34](https://avatars.discourse-cdn.com/v4/letter/f/57b2e6/32.png) [@Force34](https://forum.kirupa.com/u/Force34)\
**Post date:** [December 16, 2005, 6:09pm UTC](https://forum.kirupa.com/t/colorrequired/172669/1 "2005-12-16T18:09:37Z")

</div>

Hi people XD Im using this code in flash 8 but it’s not working. (It’s only part of the code but its repeated with some other stuff added but anyway, I think this is all you really need to see. It’s for a contact form)

on (press) {  
initial\_name = “0”;  
initial\_comment = “0”;  
if (Number(length(name))\>=1) {  
initial\_name = “100”;  
colorRequired = new color (bg\_name);  
colorRequired.setRGB(0xF1F3F3);  
} else {  
colorRequired = new color (bg\_name);  
colorRequired.setRGB(0xFFECE7);  
}

I get the error -

**Warning** Scene=Scene 1, layer=Fields, frame=1:Line 6: The identifier ‘color’ will not resolve to built-in object ‘Color’ at runtime.  
colorRequired = new color (bg\_name);

Total ActionScript Errors: 1 Reported Errors: 1

In flash 8… I couldn’t find any colorRequired function in the help bit… so I’m guessing this is probably from an older version of flash… Any suggestions?
