Flash CS3 - Flash CS4

Free tutorials and scripts for all.
Actionscript 3.0

Event.MOUSE_LEAVE

This is a discussion on Event.MOUSE_LEAVE within the Articoli e tutorials forums, part of the Flash CS3 e Actionscript 3.0 category; Salve, non mi ero proprio accorto di un evento messo a disposizione di Actionscript 3.0, e cioè dell' evento ...


Go Back   Forum Flash CS3 Flash CS4 > Flash CS3 e Actionscript 3.0 > Articoli e tutorials

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  1 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 25-10-07, 06:38
Administrator
 
Join Date: Jul 2007
Location: Cesena
Posts: 4,486
Rep Power: 6
Flep is on a distinguished road
Event.MOUSE_LEAVE

Salve,

non mi ero proprio accorto di un evento messo a disposizione di Actionscript 3.0, e cioè dell' evento MOUSE_LEAVE.
Questo utile evento permette di intercettare il momento in cui il mouse dell' utente esce dall' area dell' SWF.
E' sicuramente importante e utile soprattuto in fase di realizzazione di animazioni basate sulla posizione del mouse ma trova anche applicazione in altri svariati campi.

Facile da utilizzare, vediamo come funziona...

Creo un FLA che salvo con nome ' main.fla '.
Al suo interno creo una campo di testo dinamico al quale assegno nome istanza ' test_txt '.

Il codice per utilizzare l' evento MOUSE_EVENT:
Code:
stage.addEventListener(Event.MOUSE_LEAVE,go);
function go(evt:Event):void
{
	test_txt.appendText('gone  ');
}
Questo evento è applicabile solo allo stage.

Risultato:






Se proviamo a spostare il mouse dall' area dell' SWF, ecco che Flash ci avvisa.

Alla prossima !
__________________

 


I recommend: Essential Actionscript 3.0

- Non rispondo ai messaggi privati con domande tecniche. Apri una discussione sul forum !
- I do not reply technicians pvt messages. Open a thread !
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #2 (permalink)  
Old 26-10-07, 15:59
Junior Member
 
Join Date: Jul 2007
Posts: 26
Rep Power: 0
cyberwolf4ever is on a distinguished road
Riferimento: Event.MOUSE_LEAVE

domanda: non c'è una cosa simile per il mouse che entra?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #3 (permalink)  
Old 26-10-07, 16:04
Administrator
 
Join Date: Jul 2007
Location: Cesena
Posts: 4,486
Rep Power: 6
Flep is on a distinguished road
Re: Event.MOUSE_LEAVE

Sì,
dovresti utilizzare MouseEvent.MOUSE_MOVE
__________________

 


I recommend: Essential Actionscript 3.0

- Non rispondo ai messaggi privati con domande tecniche. Apri una discussione sul forum !
- I do not reply technicians pvt messages. Open a thread !
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #4 (permalink)  
Old 26-10-07, 16:43
Junior Member
 
Join Date: Jul 2007
Posts: 26
Rep Power: 0
cyberwolf4ever is on a distinguished road
Riferimento: Event.MOUSE_LEAVE

grazie :)

quindi dovrei fare...

Code:
stage.addEventListener(Event.MOUSE_LEAVE,go);
function go(evt:Event):void
{
    
}

stage.addEventListener(Event.MOUSE_MOVE,vai);
function vai(evt:Event):void
{
    
}
giusto?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #5 (permalink)  
Old 26-10-07, 16:51
Administrator
 
Join Date: Jul 2007
Location: Cesena
Posts: 4,486
Rep Power: 6
Flep is on a distinguished road
Re: Event.MOUSE_LEAVE

è MouseEvent.MOUSE_MOVE non Event.MOUSE_MOVE.

Poi stai attento perchè l' evento MOUSE_MOVE viene dispacciato ogni volta che muovi il mouse, fai dei trace('qualcosa'); dentro alla funzione vai e vedi.
__________________

 


I recommend: Essential Actionscript 3.0

- Non rispondo ai messaggi privati con domande tecniche. Apri una discussione sul forum !
- I do not reply technicians pvt messages. Open a thread !
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Flash Multi Gallery
  #6 (permalink)  
Old 26-10-07, 18:59
Junior Member
 
Join Date: Jul 2007
Posts: 26
Rep Power: 0
cyberwolf4ever is on a distinguished road
Riferimento: Event.MOUSE_LEAVE

ok, grazie
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Reply

Bookmarks

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads

Thread Thread Starter Forum Replies Last Post
DOUBLE_CLICK event Flep Tutorials 1 01-12-08 03:18
Event.MOUSE_LEAVE Flep Tutorials 5 19-11-08 17:34
dipatch event nootropic.kint Actionscript 3.0 avanzato 9 04-12-07 11:16
event lmarkus Flash CS3 generale 1 31-10-07 16:39
mouse event in as 3 nootropic.kint Actionscript 3.0 base 11 03-08-07 10:18


All times are GMT. The time now is 10:51.


Powered by vBulletin versione 3.7.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC4
Forum SiteMap


FlepStudio
by Filippo Lughi
P.IVA 03605860406