Flash CS3 - Flash CS4

Free tutorials and scripts for all.
Actionscript 3.0

event

This is a discussion on event within the Flash CS3 generale forums, part of the Flash CS3 e Actionscript 3.0 category; Ciao Flep.. e ciao a tutti. Sto seguendo con molta attenzione i tutorial e mentre provavo un esercizio mi sono ...


Go Back   Forum Flash CS3 Flash CS4 > Flash CS3 e Actionscript 3.0 > Flash CS3 generale

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 31-10-07, 14:49
Junior Member
 
Join Date: Jul 2007
Posts: 4
Rep Power: 0
lmarkus is on a distinguished road
event

Ciao Flep.. e ciao a tutti.

Sto seguendo con molta attenzione i tutorial e mentre provavo un esercizio mi sono accorto che qualcosa nn va..
Vorrei semplicemente esercitarmi sugi eventi, e stavo provando un semplice clik
ho creato un eventi.fla ed un Eventi.as
la document class è così implementata:

PHP Code:
package {
    
import flash.display.MovieClip;
    
import flash.events;
    public class 
Eventi extends MovieClip {
        public function 
Eventi() {

            
clip_mc.addEventListener(MouseEvent.CLICK,cli);
        }
        private function 
cli(event:Event);
        {
            
clip_mc._alpha=0;
        }
    }
}; 
nel fla ho un mc che si chiama clip_mc

la funziona alpha = 0 nn va.. e il player mi dice la funzione nn ha corpo..
credo che l'errore sta nella (event:Event)

sai indicarmi dove sbaglio.. e sopratutto nn mi è chiaro il concetto (event:Event)

Grazie Marco
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #2 (permalink)  
Old 31-10-07, 16:39
Administrator
 
Join Date: Jul 2007
Location: Cesena
Posts: 4,486
Rep Power: 6
Flep is on a distinguished road
Re: event

Ciao Marco,
_alpha è diventato .alpha

oppure, meglio ancora se lavori in questo modo:
event.target.alpha=0;

Con event.target ti viene restituita l' istanza a cui è associato il listener in ascolto.
__________________

 


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

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 Off
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
Event.ADDED_TO_STAGE Flep Tutorials 3 14-06-08 14:53
dipatch event nootropic.kint Actionscript 3.0 avanzato 9 04-12-07 11:16
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 13:40.


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