Ciao e benvenuto :)
Primo problema:
il tuo errore è dato dal fatto che hai due funzioni con lo stesso nome. Non va bene ! :)
Se hai più di un bottone, fai in questo modo:
- assegni un listener ad ogni bottone che chiamerà al CLICK la stessa funzione, nella stessa funzione controlli chi è stato clickato e in base a quello assegni l' url corrispettivo:
Se noti, evt.target.name mi dice il nome del bottone cliccato ( ricordati che si riferisce ai nomi istanza dei bottoni ).Code:home.addEventListener(MouseEvent.CLICK,onClick); azienda.addEventListener(MouseEvent.CLICK,onClick); galleria.addEventListener(MouseEvent.CLICK,onClick); cheneso.addEventListener(MouseEvent.CLICK,onClick); uffa.addEventListener(MouseEvent.CLICK,onClick); ciao.addEventListener(MouseEvent.CLICK,onClick); function onClick(evt:MouseEvent):void { if(evt.target.name=='home') { var url:URLRequest=new URLRequest('main.htm'); navigateToURL(url,'_self'); } if(evt.target.name=='azienda') { var url:URLRequest=new URLRequest('azienda.htm'); navigateToURL(url,'_self'); } if(evt.target.name=='galleria') { var url:URLRequest=new URLRequest('galleria.htm'); navigateToURL(url,'_self'); } // eccetera eccetera }
Riguardo ai frames, non ci lavoro mai e farò delle ricerche.
Comunque ormai lavorare coi frames è sconsigliato sia da Adobe che da diversi CSS guru :)


LinkBack URL
About LinkBacks

Reply With Quote




Bookmarks