On Thu, 28 Jun 2001, Rodney Tamblyn wrote:

> Scott,
> 
> Thanks for your reply, this was just the information I was looking for.  
> 
> I'm sorry if my message wasn't completely clear, maybe I was getting a little ahead 
>of myself.  I'd assumed that the image would have to be drawn somewhere, either 
>offscreen or in a hidden object, so your comments are corrrect.
> 
> As always it seems, in Metacard there is a better way of doing it.
> 
> In director 7 I used the (as then undocumented) function getPixel to determine the 
>colour. The rollover image just had to be present in the cast for this to work.  
>Seemed to work fine but there may well be limitations that I didn't discover.

My guess would be that these limitations would come into play if you
tried to use some object that had to be rendered by the OS (buttons,
fields, etc.) rather than images or graphic objects, which the engine
can render itself.

> For those of you who may be interested, here's an example script:
> 
> on mouseWithin me
>   -- check colour in rollover image against mouse location
>   theH=the mouseH
>   theV= the mouseV
>   myLoc = point(theH,theV)
>   myRect = sprite(spriteNum).rect
>   ofH = theH-the left of myRect
>   ofV = theV- the top of myRect
>   myCol = getPixel(member myParent.myRoll,ofH,ofV)

You could write something similar to return a pixel out of an image
object, but it looks like this is CLUT based (256 colors) whereas
MetaCard is RGB based, so the logic will have to be changed some.

>   if myCol <> oldCol then
>     -- mouse is over coloured area in rollover
>     oldCol = myCol
>     theLine = myCol-251
>     if theLine < 1 then exit -- some sort of error
> member("commentTag").text=member(myParent.myComments).text.line[theLine]

Do we love the "dot notation", or do we not?  ;-)
  Regards,
    Scott

>   end if
> end 
> 
> Rodney
> -- 
> --
> Rodney Tamblyn
> Educational Media group
> Higher Education Development Centre, 75 Union Place
> University of Otago, PO Box 56, Dunedin, New Zealand
> ph +64 3 479 7580 Fax +64 3 479 8362
> http://hedc.otago.ac.nz ~ http://rodney.weblogs.com
> 

********************************************************
Scott Raney  [EMAIL PROTECTED]  http://www.metacard.com
MetaCard: You know, there's an easier way to do that...



Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.

Reply via email to