
Welcome Guest
|
|
|
#1
|
|||
|
|||
|
on RollOver, on RollOut, on release
ok i have a button that then you rollover it it displays text.. and when you rollout it makes the text disappear.. and if you were to press then realase the button it shows an image... but the problem is after you release the button and then rollout it gets rid of the image and shows the text disappearing... how do i go about fixing that?
Code:
on (rollOver) {
tellTarget ("/screen_mask"){
gotoAndPlay ("wallpaper");
}
}
on (rollOut){
tellTarget ("/screen_mask"){
wallpaper.gotoAndPlay ("wallpaperout");
}
}
on (release){
tellTarget ("/screen_mask"){
wallpaper.gotoAndPlay ("playwallpaper");
}
}
__________________
![]() -hank D |
|
#2
|
|||
|
|||
|
The problem is, that the button does not record whether or not you have rolled over, out, or released and tell it to the other functions.
So basically, even though you have pushed and released, it still will do the rollout animation regardless of the release animation. I am also confused as to why you are using tell target and a mask? I think these may be redundant components. Depending how complicated you want it, i would just make two buttons that are identicle, exepcept that one has the roll out, over script and the other doesn't. But the one that doesn't underneath the one that does have it, so you can't see it. This way, on release, still use the image script but also use buttonwithscripts._visible = false so to the user it will look like the image appeared an nothing else, but what really happened is the button dissappeared and an identicle one is behind it without the rollour script! I also have another way to do it, if you want to get more complicated. |
|
#3
|
|||
|
|||
|
Like sketchbookjack said you whould need a variable to store whether the button was pressed or not, and depending on the variable you can play the rollOut animation:
Actionscript:
on (rollOver) {
tellTarget ("/screen_mask"){
gotoAndPlay ("wallpaper");
}
}
on (rollOut){
if (pressed != true) {
tellTarget ("/screen_mask"){
wallpaper.gotoAndPlay ("wallpaperout");
}
}
}
on (release){
pressed = true;
tellTarget ("/screen_mask"){
wallpaper.gotoAndPlay ("playwallpaper");
}
}
__________________
... take me to your coder. |
«
Previous Thread
|
Next Thread
»
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Multiple rollout 'if' state options required | sampad | Flash CS3 / Flash 9 |
0 | 06-20-2009 03:42 PM |
| Rollover - Rollout problem | fgenois | Newbies |
0 | 01-08-2008 05:21 AM |
| RollOver RollOut Problem | Rachael | Newbies |
11 | 09-06-2004 02:42 PM |
| rollOver + rollOut movement | macroila | Flash MX ActionScript |
1 | 04-23-2004 05:23 PM |
| more colour - rollover & stay on release | hpw | Flash 5 Actionscript |
2 | 04-05-2001 05:44 PM |





