need help, trying to set background opacity/alpha value of text field?

I know in IB one can set the background color and opacity of a text field.
How can you do this dynamically? I keep hitting errors. Any help much appreciated!!

	tell color panel
		set shows alpha to true
	end tell
	set myColor to color of color panel
	set avalue to alpha of color panel
	set text color of text field "text1" of window "main" to myColor
	set contents of default entry "TextColor" of user defaults to myColor
	log avalue
	--This line does not work:
             set alpha value of text field "text1" of window "main" to avalue

I dont think that you can set the alpha of individual objects like this. The window has an alpha property, but a quick look did not show me alpha for any container view objects. Check the documentation in depth.

A little late I guess but I’m sure that this can be accomplished in Objective-C and ‘call method’. I’m not sure about the exact method or parameters though.