Be a Supporter!

disappear when rollover

  • 359 Views
  • 7 Replies
New Topic Respond to this Topic
Cristo
Cristo
  • Member since: Aug. 10, 2008
  • Offline.
Forum Stats
Member
Level 13
Blank Slate
disappear when rollover 2009-12-21 19:23:35 Reply

Connecting to the game with the ship and the score, I figured out how to collect and get a score, but i need to know how to make it to when you roll over the coin or whatever it is, it disappears. can anyone help?


BBS Signature
Cristo
Cristo
  • Member since: Aug. 10, 2008
  • Offline.
Forum Stats
Member
Level 13
Blank Slate
Response to disappear when rollover 2009-12-21 19:49:12 Reply

by the way i am using the mouse.


BBS Signature
the1manwiththeplan
the1manwiththeplan
  • Member since: Jun. 10, 2008
  • Offline.
Forum Stats
Member
Level 17
Blank Slate
Response to disappear when rollover 2009-12-21 20:07:42 Reply

At 12/21/09 07:49 PM, Cristo wrote: by the way i am using the mouse.
on (rollOver) {
	this._alpha = 0;
}

...

HonterGames
HonterGames
  • Member since: Jun. 18, 2009
  • Offline.
Forum Stats
Member
Level 08
Blank Slate
Response to disappear when rollover 2009-12-21 20:17:37 Reply

on(rollover){
_visible = false
// or
_alpha = 0
// or
unloadMovie(this)
}

BBS Signature
Cristo
Cristo
  • Member since: Aug. 10, 2008
  • Offline.
Forum Stats
Member
Level 13
Blank Slate
Response to disappear when rollover 2009-12-21 20:43:40 Reply

thanks alot!!!


BBS Signature
Archawn
Archawn
  • Member since: Sep. 9, 2007
  • Offline.
Forum Stats
Member
Level 27
Game Developer
Response to disappear when rollover 2009-12-22 08:02:13 Reply

Don't use either of their methods. For one, it's a really bad habit to code on Buttons/MovieClips, and the "unloadMovie();" command is very flawed. Use the following code (put it on a frame).

It's also a bad idea to simply "hide" the coin. Removing it is best, especially if it can only be collected once.

myButton.onRollOver = function(){
  this.removeMovieClip();
}
Cristo
Cristo
  • Member since: Aug. 10, 2008
  • Offline.
Forum Stats
Member
Level 13
Blank Slate
Response to disappear when rollover 2009-12-22 10:47:40 Reply

sorry to burst your bubble and all. but it does not work.


BBS Signature
Dugh
Dugh
  • Member since: Dec. 6, 2005
  • Offline.
Forum Stats
Member
Level 20
Blank Slate
Response to disappear when rollover 2009-12-22 10:53:10 Reply

At 12/22/09 10:47 AM, Cristo wrote: sorry to burst your bubble and all. but it does not work.

Sorry to burst YOUR bubble, but yes it does work.
Name the instance your your button: myButton.


BBS Signature