Search content:

 

Personal Menu
Username:
Password:
Save password

Become a member

Forgot Password?

 

Don't miss these
List Inspector
Go to URL
Text Outliner
Moka Xtra
ProMusicLoops
Bounce That Sprite
simInetPro Xtra
Angle detection by J.R.D.R.
Stop Projector After Eject CD
LEAP YEAR
MediaMacros Xtras Mall
 

 

 

Behavior Image skew in projectors

Added on 8/29/1999

 

Compatibilities:
behavior D7 D8 Mac PC Shockwave

This item has not yet been rated

Author: MediaMacros (website)

This behavior allows you to have 4 "handle" sprites that the end user can use to skew images in a projector or shockwave file

--Copyright 1999 Chuck Neal
--chuck@mediamacros.com
--If you find this code helpful, send me an e-mail and let me know.  :-)

property whichItem, spriteNum, whichPoint, quadList

global activeSprite

on getPropertyDescriptionList me
  p_list = [:]
  p_list.addProp(#whichItem, [#format : #symbol, #comment : "Control point or object?", #default : #point, #range : [#point, #object, #background]])
  return p_list
end

on editQuad me
  if whichItem = #point then
    sprite(spriteNum).loc = sprite(activeSprite).quad[whichPoint]
    
  end if
end

on hidePoints me
  if whichItem = #point then
    sprite(spriteNum).loc = point(-1000, -1000)
  end if
end

on mouseDown me
  if whichItem = #point then
    repeat while the stillDown
      sprite(spriteNum).loc = the mouseLoc
      sendSprite(activeSprite, #rescaleQuad, whichPoint, sprite(spriteNum).loc)
    end repeat
  end if
end

on beginSprite me
  if whichItem = #point then
    whichPoint = (spriteNum mod 4) + 1
    sprite(spriteNum).loc = point(-1000,-1000)
  else
    quadList = sprite(spriteNum).quad
  end if
end

on rescaleQuad me, whatHandle, whatPoint
  quadList.setAt(whatHandle, whatPoint)
  sprite(spriteNum).quad = quadList
  updateStage
end

on mouseUp me
  if whichItem = #object then
    activeSprite = spriteNum
    sendAllSprites(#editQuad)
  else if whichItem = #background then
    sendAllSprites(#hidePoints)
  end if
end

on getBehaviorDescription me
  return "For this behavior you will need 4 small " & quote & "handle" & quote & " sprites and at least one image, text, or shape sprite.  Drop the behavior on the points, the object and on a background sprite.  When you click an object the handles will jump into place and draging them will skew and scale the image.  Click the background the hide the handles off screen."
end

 


Upload Provided by ABCUpload ASP

Contact

MMI
22 West Court Sq
Suite 2C
Newnan, GA 30263
USA

Fax - (206) 339-5833

Send e-mail