How do I reference Solution Media images in the Agent Plugin

I am having difficulty referencing media (JPEG, GIF) within the internally stored media (ie - image imported into a Solution through the Media Library dialog). I can import the image without any difficulty.

The plugin I am having trouble getting going is the Agent plugin, method is: plugins.agent.setImageURL(‘string to access the internal library is ???’).

I think my problem is that I don’t have the correct format for the location string.

Suggestions?

Can you try to pass “media:///myImage.png” (replace myImage.png by your media name)?

Hi Patrick,

Thanks - I’ve tried that without success. I am working with a test form (only one button that calls a form level method). The test code (that doesn’t work yet) is:

plugins.agent.setImageURL(‘media:///CAUTION.jpg’);
plugins.agent.setBalloonSize(100,80);
plugins.agent.setLocation(320,100);
plugins.agent.show();
plugins.agent.speak(‘Test’);

I’ve tried different parameter techniques for the agent plugin (double quotes, no quotes) and checked the spelling and case for my file name within the media library.

Anything else you could suggest to try? thx, Michael

Maybe a late reaction, but I still have the problem.

When I use a media image and the agent shows up, the balloon is printed on top of the image.

plugins.agent.x = 300; 
plugins.agent.y = 300; 

plugins.agent.setBalloonSize(200,100); 
//plugins.agent.setImageURL('media:///icon.png'); 
plugins.agent.setImageURL('media:///bussinesman.png'); 
plugins.agent.setLocation(200, 200); 
plugins.agent.setVisible(true); 
plugins.agent.speak("Hi bussinesman");