all groups > flash (macromedia) > january 2004 >
You're in the

flash (macromedia)

group:

Can't get rollover state to stay when loading image?


Can't get rollover state to stay when loading image? tsweet
1/31/2004 9:43:33 PM
flash (macromedia):
Can someone help me out, with some button issues? I know Im missing something really simple but its kicking my a$$. Anyways I've created a photo gallery of sorts and I can't seem to get the rollover to stay after clicked.

I want people to be able to see what images they have already clicked, make sense. Here's the script I wrote and the url for referrence. Note:: I have only put one button on my swf so that its easy to start over if need be.

Oh yeah my button is a movie clip. And the action script is in its own layer on the main timeline.



pic1_mc.onPress = function (){

load_mc.loadMovie("1.jpg");
this.gotoAndStop(3); <<this is after they have clicked - button is red

}

pic1_mc.onRollOver = function (){

this.gotoAndStop(2) <<this is when they rollover - button is white

}

pic1_mc.onRollOut = function (){

this.gotoAndStop(1) <<this is when they rollout - button is green (original)

}


So basically Im looking to simplfy this as well as make it work. Im more of a designer and I'll admit this does'nt come easy to me, thanks in advance for the help.





Referring URLs
http://onedosedesign.com/temp/pic_project.swf



Re: Can't get rollover state to stay when loading image? PierreAlain
2/1/2004 12:14:50 AM
why use a button property ? Just use a clip with the frame you want, and you
drive it from script.

suppose your clip (set as clip, not as button) <myBtn>

lets frame 1 normal, frame 2 your "rollOver",....

on( rollOver ){ gotoAndStop(2); }
just don't use on(rollOut).... but find a way to sent the clip back to frame
1 when no more in use.

--

Pierre Alain

pie@lifnet.com


"tsweet" <webforumsuser@macromedia.com> a écrit dans le message de
news:bvh7i5$l79$1@forums.macromedia.com...
[quoted text, click to view]
something really simple but its kicking my a$$. Anyways I've created a photo
gallery of sorts and I can't seem to get the rollover to stay after clicked.
[quoted text, click to view]
make sense. Here's the script I wrote and the url for referrence. Note:: I
have only put one button on my swf so that its easy to start over if need
be.
[quoted text, click to view]
of a designer and I'll admit this does'nt come easy to me, thanks in advance
for the help.
[quoted text, click to view]

AddThis Social Bookmark Button