More clearly....

(Director 9.0)

I would like to be able to access the SPRITE properties like blend, locH, color, not the script property-properties.

x = #fontSize
put sprite(21).member.getProp(x)

will return my fontsize, just as if I'd typed in

put sprite(21).member.fontsize

that's the way object stuff works. So I could pass a generic function an object and a symbol and it could get and change the property that that symbol represents in the object.


But sprite(21) and #LocH don't work.


x = #locH -- or #blend, or any sprite property
put sprite(21).getProp(x)

SYNTAX ERROR

So, is the work-around to handle sprites with a do statement instead of dealing with them like ordinary objects?

do "put sprite(21)."&x

(The flash guy is already done with his code...his screen objects are full objects.)

Is this part of the dot.syntax Director 10 improvements?

roymeo



At 02:25 PM 2/20/2004, you wrote:

I've got a parent script which does your standard Mass-Spring-Damper sort of boinging. I'd like to be able to pass it a sprite object and a #Property and have it automatically get/set that sprite's property.

So if I want to attach it to sprite(x).locH, I send it sprite(x) and #locH which are params oSprite and sProp

and I can address
sprite(x).locH

But you can't address
sprite(x).sProp  or
sprite(x).getProp(sProp) etc.

Is there a way to do this without using do statements?

My brain is itching in that way that means I'm either missing something obvious or due for my next trepanning session.

roymeo

----------
roymeo(AT)brokenoffcarantenna.com
----------
A person who eats meat
wants to get his teeth into something
A person who does not eat meat
wants to get his teeth into something else
If these thoughts interest you even for a moment
you are lost
- Leonard Cohen
[To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!]

---------- roymeo(AT)brokenoffcarantenna.com ---------- i used to love you back when you wrote poetry

[To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!]

Reply via email to