Help With Script

I’m using xcode and want to get teh alternate image of a button, but can’t make it work.

if the alternate image of the_object is ("elephant") then
				set the visible of the_object to false
end if

Thanks

Hi guys, I downloaded this from another site a few weeks ago and I’m having trouble with it. Here’s the script.

set Profile to do shell script "/usr/sbin/system_profiler SPHardwareDataType"
set SN_Start to ((offset of "Serial Number" in Profile) + 15)
set Partial to text SN_Start thru (length of Profile) of Profile
set SN_End to offset of " " in Partial
set SN to text 1 thru SN_End of Partial

set result to display dialog "What is the name of this computer?" default answer ""
set TheName to text returned of result

set result to display dialog "What is the Tag# of this computer?" default answer ""
set TheTag to text returned of result

tell application "System Preferences" to activate
tell application "System Events"
get properties
tell application process "System Preferences"
click button "Sharing" of scroll area 1 of window "System Preferences"
delay 3
click button "Edit�" of window "Sharing"
set value of text field 1 of sheet 1 of window "Sharing" to TheName
click button "OK" of sheet 1 of window "Sharing"
click button "Access Privileges�" of tab group 1 of window "Sharing"
delay 3
set value of text field 1 of group 2 of sheet 1 of window "Sharing" to TheName
set value of text field 2 of group 2 of sheet 1 of window "Sharing" to TheTag
set value of text field 1 of group 1 of sheet 1 of window "Sharing" to SN
click button "OK" of sheet 1 of window "Sharing"
keystroke tab -- forward tab key
end tell
end tell

The script runs fine till it gets here
click button “Access Privileges�” of tab group 1 of window “Sharing”

then I get this message
System Events got an error: NSReceiverEvaluationScriptError: 4

Enable access for assitive devices is on. I’m using Panther 10.3 and I noticed in the sharing pane there is no Access Privileges button until you highlight the Apple Remote Desktop selection in the window to the left. I’m not a scripter so I was wondering if someone could tweek it so it’ll work in Panther. Thanks in advance.