problem using LoadGraphicFile

This forum is meant for requesting technical support or reporting bugs.

Moderators: time-killer-games, Vengeance66, Candle, reneuend, GM-Support

problem using LoadGraphicFile

Postby unwired » Wed Aug 23, 2006 1:52 pm

Hi

i want to change the cursor associated with a hotspot.
i tried this example :



Code: Select all
Similar to the Action.LoadAPicture command, but for more advanced users. It loads a graphic file from the "Areas" sub-folder of the project folder into a property. For example, to change the cursor that is associated with the hotspot number 5, you should type:

   Hotspot(5).MouseIcon = LoadGraphicFile("FILENAME")
   Hotspot(5).MousePointer = 99

where FILENAME is the name of the graphic file, located inside the "Hotspot Graphic Files" sub-folder of the "Project Resources", which corresponds to the directory "c:\...\PROJECTNAME\Areas". The supported graphic types are: BMP, JPG, GIF (not animated), WMF, EMF, ICO and CUR. Replace FILENAME with an empty string to unload the picture.


if i try :
Code: Select all
Hotspot(2).MouseIcon=Action.LoadGraphicFile("mypointer.ico")

AM error is "object action required"

if i try
Code: Select all
Hotspot(2).MouseIcon=LoadGraphicFile("mypointer.ico")

AM error is : typeMismatch "LoadGraphicFile"

(mypointer.ico is in project's areas folder.

help !

:|
unwired
Member
 
Posts: 19
Joined: Mon Jul 24, 2006 12:20 pm

Postby GM-Support » Sun Sep 10, 2006 2:49 pm

Hi,

I have just made the following test:
- I have created an empty hotspot
- I have copied the file "Key1.ico" (which you will find in the "Tutorial Graphics" folder) to the "Areas" folder (aka "Hotspot Graphic Files").
- I have executed the following code:

Code: Select all
Hotspot(1).MouseIcon=Action.LoadGraphicFile("Key1.ico")
Hotspot(1).MousePointer=99


The code works just fine on my computer.

Perhaps the problem is due to the ico file you use not being a valid icon. Could you please test with the file Key1.ico too?

Thanks,

Best regards,
GM-Support
GM-Support
Forum Admin and Games Page admin
 
Posts: 2221
Joined: Thu Jun 05, 2003 7:52 pm


Return to Adventure Maker Technical Support and Bug Reports

Who is online

Users browsing this forum: No registered users and 0 guests

cron