Book a Demo

Author Topic: shape script  (Read 2578 times)

Yossi

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
  • Always look on the bright side of life (-:
    • View Profile
shape script
« on: June 13, 2007, 08:55:00 pm »
Hello everybody..

I'm trying to write a shape script using the method "image (string imageId , int left,int top, int right, int buttom)"
and for some reason it fails to draw the picture from the image manager.
I'v wrote
shape main {
image (Bridge, 5,10, 10, 5)
}
and I'v received a shape script parsing error (Unexepted symbol)

what is the correct imageId syntax?
does anyone has an example code that I can use?

Thanks for the help..

Yossi Hazan
Yossi Hazan
Panda Tech

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: shape script
« Reply #1 on: June 13, 2007, 09:29:51 pm »
Bridge must be in quotes and you are missing a ";". Also, the number values are a percentage of the size of the whole shape, so you are limiting your image to a very small part of the top left corner of your shape. Try this instead:

Code: [Select]
image("Bridge",0,0,100,100);

HTH :)
The Sparx Team
[email protected]