Contents
Articles
Behaviors
Books
Director News
Director Web Sites
FAQ
Games
Mailing Lists
News Groups
Project Examples
Reviews
Software
Tools
Useful Web Sites
Utilities
Xtras

Don't miss these
Internet Explorer 5 - PC
Jog Shuffle
Director 8 & Lingo Fast and Easy Web Development (With CD-ROM)
Easy Navigation System
123 Flash Menu
Add all to the search path
Timeline re-direction and navigation
base64 encode/decode
Set Castmember properties for DirectMedia member
Lingo in a Nutshell
 

 

 

Behavior Copy Behavior (Ctrl + C)

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 from 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 = "c") : clipboardCopy me
    end case
  else
    pass
  end if
end

on clipboardCopy me
  if pMemberType = #text then
    if pWhichMember.selectedText.text <> "" then
      put pWhichMember.selectedText.text into member("clipboard temp")
      copyToClipboard member "clipboard temp"
    else
      beep
    end if
  end if
  if pMemberType = #field then
    if the selStart <> the selEnd then
      a = the selStart
      b = the selEnd
      put char a + 1 to b of the text of member pWhichMember into member("clipboard temp")
      copyToClipboard member "clipboard temp"
    end if
  end if
end

 


Contact

MMI
36 South Court Sq
Suite 300
Newnan, GA 30263
USA

Send e-mail