Monte Goulding wrote/ schreef:

> Hi all
> 
> I have a project that involves interacting with graphic objects in simmilar
> ways to MC. I need to be able to draw, resize, move, stretch, color. Does
> anyone have any experience doing this that could explain how to script user
> interaction. How to I get handles on a graphic for instance?
You can get handles by:
  select graphic 1

But the user can't resize the graphic because of the browse tool. You have
to:
  choose pointer tool
to allow the user to resize the graphic.

You can make a group of the graphic and 8 little rectangles, which you show
if you want to get handles, and give them a script like this:
  on mouseDown
    repeat until the mouse is up
      set the loc of me to the mouseLoc
      set the rect of graphic "TheGraphic" to item 1 to 2 of the rect of
graphic "TheGraphic" & comma & the bottomRight of me
    end repeat
  end mouseDown
  -- (Didn't test it, but something like this for the bottom-right handle.)

Give the graphic itself the script:
  on mouseDown
    grab this group -- the group will follow the pointer 'till mouseUp
  end mouseDown

For other user interaction you can use
  set the mouseLoc to tNewLoc -- not prefferable, and doesn't work on some
computers
  drag from tStart to tFinish

> Best regards
> 
> Monte
Hope this helps,
Sjoerd


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