Ask a Question related to Macromedia Director Lingo, Design and Development.
-
Shane #1
change a word's color & highlight on mouseUp
I have a list of names going into a field. I want a line to change color if
I click on it. Then change back if I click on another name. Can I also have
the line hightlight as I rollover it?
Can this be done on a text sprite as well?
Thanks SHane
Shane Guest
-
Selected Text - highlight color is invisible
I'm having some trouble with Illustrator 10 .. the document in question has a white background and black text. Normally when I select text with the... -
Direct To Stage ON/OFF - highlight property change
Hi, sorry for my very very poor english. I need grabbing 3D scene to image. If use alternative "3D member to image" highlight property on... -
Word's Acrobat icons are gone
Recently I was converting a large Word document (400+ pages) to PDF, and Word went brain-dead, eventually forcing me to kill it. Afterwards, the... -
tab highlight color
In Flash MX 2004 Pro, is there a way to change the tab highlight on components such as textInput? I can set the tab order, but I've been unable... -
Highlight Color of Text
How do I change the color that text is highlighted with when a Text Sprite is selected or tabbed to. At the moment I get a really ugly green and I'd... -
Word of Mouth Productions #2
Re: change a word's color & highlight on mouseUp
It's fairly easy on a field an a bit more complicated but doable on a text
member
For a field:
But the idea is to use two properties in a behavior. One remembers the line
rolled over and one remembers the clicked line.
When you rollover a line you set the old line back to the original color
(unless it equals the last clicked line, then you do nothing) and set the
new line equal to the color you've chosen for the rollover.
When you click on a line, you set the last clicked line back to the original
color and set the new line that was clicked to the color you've chosen for
the selected state. Use the mouseLine in both cases to determine what line
is under the mouse at any point in time.
Use the same concept for a text member but you would use locVtoLinePos () to
determine the line under the mouse.
Craig Wollman
Word of Mouth Productions
phone 212 724 8302
fax 212 724 8151
[url]www.wordofmouthpros.com[/url]
"Shane" <shoffa@firstgencom.com> wrote in message
news:bnpb4m$c68$1@forums.macromedia.com...if> I have a list of names going into a field. I want a line to change colorhave> I click on it. Then change back if I click on another name. Can I also> the line hightlight as I rollover it?
>
> Can this be done on a text sprite as well?
>
> Thanks SHane
>
>
Word of Mouth Productions Guest
-
Word of Mouth Productions #3
Re: change a word's color & highlight on mouseUp
Here's the code for a field. Of course, you'd put whatever other code you
want executed in the on mouseDown handler. You could also change the
mouseDown to a mouseUp but you'd then have to add the mouseUpOutside handler
and reset things back to the lastclicked state if the user lets go outside
the field. I used black as the normal state, red as rollover and yellow as
down. Change the color numbers as you wish
property pS, spriteNum, pName, pLastRoll, pLastClick
on beginSprite me
pS = sprite (spriteNum)
pName = pS.member.name
pLastRoll = 0
pLastClick = 0
end
on mouseDown me
if the mouseLine <> pLastClick then
the foreColor of line pLastClick of field (pName) = 255
pLastClick = the mouseline
the foreColor of line pLastClick of field (pName) = 4
end if
end
on mouseEnter me
cursor 280
if the mouseLine <> pLastClick then
if pLastRoll <> pLastClick then
the foreColor of line pLastRoll of field (pName) = 255
end if
pLastRoll = the mouseline
the foreColor of line pLastRoll of field (pName) = 6
end if
end
on mouseWithin me
if the mouseLine <> pLastRoll then
if pLastRoll <> pLastClick then
the foreColor of line pLastRoll of field (pName) = 255
end if
pLastRoll = the mouseline
if pLastRoll <> pLastClick then
the foreColor of line pLastRoll of field (pName) = 6
end if
end if
end
on mouseLeave me
cursor -1
if pLastRoll <> pLastClick then
the foreColor of line pLastRoll of field (pName) = 255
end if
end
--
Craig Wollman
Word of Mouth Productions
phone 212 724 8302
fax 212 724 8151
[url]www.wordofmouthpros.com[/url]
"Shane" <shoffa@firstgencom.com> wrote in message
news:bnpb4m$c68$1@forums.macromedia.com...if> I have a list of names going into a field. I want a line to change colorhave> I click on it. Then change back if I click on another name. Can I also> the line hightlight as I rollover it?
>
> Can this be done on a text sprite as well?
>
> Thanks SHane
>
>
Word of Mouth Productions Guest



Reply With Quote

