mouse entered handler

According to the apple docs, the ‘load image’ command takes a posix (slash-delimited) file path as an argument, not a hfs (colon-delimited) path. Regardless, you don’t even need to specify the whole path. By default, the load image command already looks in your resources directory for an image by name. You don’t even have to include the file extension. Try the following instead…

on will finish launching theObject
	(* Shouldn't need these two lines if they're only used to load images *)
	--set the_app to path to me as string
	--set thePath to the_app & "Contents:Resources:"

	set blackpod to load image "blackpod"
	set blackpodmenu to load image "blackpodmenu"
	set blackpodnext to load image "blackpodnext"
	set blackpodback to load image "blackpodback"
	set blackpodplay to load image "blackpodplay"
	set blackpodaction to load image "blackpodaction"
	set blackpodmenuin to load image "blackpodmenuin"
	set blackpodnextin to load image "blackpodnextin"
	set blackpodbackin to load image "blackpodbackin"
	set blackpodactionin to load image "blackpodactionin"
	set blackpodplayin to load image "blackpodplayin"
	set image of image view 1 of window "main" to blackpod
	show window "main"
end will finish launching

It’s good applescripting practice to name all of your objects, instead of referencing them by index. You should name your image view and reference it by name in the line above where you set the image of the image view. Also, not that it really matters in the case of an application, but photoshop files have a much larger file size than other image types, such as png, tiff, jpg, gif, etc. While it’s probably not too big a deal, it might shave a bit off of the total software package size to change to a different image type.

Good luck,
j

thanks it worked, i tried other image formats but they all didint have transparency, and i needed transparency around the edges. and if a user doesnt have photoshop will they still be able to see the psd files?

Actually, both png and tiff files support ‘anti-aliased’ transparency. gif files also support transparency, but do not have anti-aliased transparency, making them unsuitable for interface design such as you’re doing with your custom window background images. By default, photoshop usually gives most images you create an opaque background. You may need to go in and delete the portions that need to be transparent, or create a new image that is transparent and add your content to it. I usually use png’s in my interfaces, and use tiff’s once in a while. Users won’t need to have photoshop installed, as osx has some support built in, but files in psd format may not render properly if they are layered. If the image view can’t find a suitable image representation it will display a generic error image instead of the psd file you see in photoshop. Unless you have a good reason, I’d make png’s or tif’s out of your photoshop files and use them instead.

Sorry, I didn’t get that :wink:

this works (I always use get, if I want to get a value, there are less error messages than without using get ;))


tell theObject to set bounds to (get bounds)

ok, thanks for all your help. i will probably convert them to png and if the transparency doesnt work with it, i can always just flatten the psd files in photoshop.

png and tiff files seem to have bad quality in my app for some reason, i tried them both with a 720 dpi and they still look wierd around text, will it be ok if i use a flattened psd file?

EDIT: flattened psd’s dont look that great either, have any ideas on how to get better quality, it just looks wierd around the menu text and next back and play pause icons. if not i’ll just live with the png’s.

EDIT AGAIN: i just cleaned the project and rebuilt and the png’s look fine…haha.