LOADING
Loading
Hi , welcome back.
LogoutLOGOUT
 
  Lost password?  
Hi
 




ReplyREPLY THREAD
 
Thread Tools Display Modes
  #1  
Old 11-18-2004, 10:10 PM
hankd hankd is offline
Registered User
 
Join Date: Aug 2004
Posts: 19
Rep Power: 0
hankd is on a distinguished road
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
Reply With Quote
  #2  
Old 11-30-2004, 02:59 PM
sketchbookjack sketchbookjack is offline
Registered User
 
Join Date: Nov 2004
Posts: 32
Rep Power: 0
sketchbookjack is on a distinguished road
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.
Reply With Quote
  #3  
Old 11-30-2004, 04:51 PM
prisma prisma is offline

Super Moderator
 
Join Date: May 2001
Location: Munich, Germany
Posts: 1,668
Rep Power: 14
prisma is on a distinguished road
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.
Reply With Quote


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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




All times are GMT. The time now is 07:58 PM.