Hello Ali,
If you'll have the color images ahead of time, simply create a grayscale version of the image as well (using Fireworks or Photoshop, etc). Then import the two images into two members. Then, in a mouseEnter script, change the member of the sprite to the grayscale member, and on a mouseLeave script, change the member of the sprite to the color member.
For example:
Import the two members and name them "image1" and "image1 grayscale". Drag the color member (image1) to the score and position it on the stage. Then create the following behavior and drag it onto the newly created sprite.
The behavior is a script member of type behavior (control-0 (zero) to get a new script member; control-i to get info on that script member and set its type to behavior):
property p_mySprite property p_colorMember property p_grayscaleMember
on beginSprite me p_mySprite = sprite(_player.currentSpriteNum) p_colorMember = mySprite.member p_grayscaleMember = member(p_colorMember.name && "grayscale") end beginSprite
on mouseEnter me p_mySprite.member = p_grayscaleMember end mouseEnter
on mouseLeave me p_mySprite.member = p_colorMember end mouseLeave
Regards,
Daniel
Ali Aghighi wrote:
Hi
I want create mouseOver function on my pictures and
make my Color pictures to grayscale effect, How i can
do it, please help me step by step about this issue,
thanks in advance,
[To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!]
