Search content:

 

Personal Menu
Username:
Password:
Save password

Become a member

Forgot Password?

 

Don't miss these
Effector Set I for Alphamania
myScreen
Play/ Pause/ Rewind/ StepForward/ StepBackward Video Sprite
Progress Bar lingo Script
Sending Email
Hex to integer
Maeda @ Media
Function Key Keycodes
Director 8.5 Shockwave Studio: The Complete Reference
Image Mover
MediaMacros Xtras Mall
 

 

 

Behavior Cut Behavior (Ctrl + X)

Added on 2/15/2000

 

Compatibilities:
behavior D7 D8 Mac PC Shockwave

This item has not yet been rated

Author: Macromedia (website)

From Technote #14130 at Macromedia.com

property spriteNum, pWhichSprite, pWhichMember, pMemberType

on beginSprite me
  pWhichSprite = sprite(me.spriteNum)
  pWhichMember = pWhichSprite.member
  pMemberType = pWhichMember.type
end

on keyDown me
  if (the commandDown) then
    case (TRUE) of
      (the commandDown AND the keyPressed = "x") : clipboardCut me
    end case
  else
    pass
  end if
end

on clipboardCut me
  if pMemberType = #text then
    whichSelection = member(pWhichMember).selection
    if whichSelection[1] + 1 <> whichSelection[2] then
      put pWhichMember.selectedText.text into member("clipboard temp")
      delete member(pWhichMember).char[whichSelection[1] + 1..whichSelection[2]]
      copyToClipboard member "clipboard temp"
    else
      beep
    end if
  end if
  if pMemberType = #field then
    whichSelection = the selection
    if the selStart<> the selEnd then
      put the selection into member("clipboard temp")
      a = the selStart
      b = the selEnd
      put char a + 1 to b of the text of member pWhichMember into member("clipboard temp")
      delete char a + 1 to b of member pWhichMember
      copyToClipboard member "clipboard temp"
    else
      beep
    end if
  end if
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