Flash CS3 - Flash CS4

Free tutorials and scripts for all.
Actionscript 3.0

Creare un menu di navigazione

This is a discussion on Creare un menu di navigazione within the PhotoShop forums, part of the Flash Italiano category; Prova e fai sapere // create an array and put the buttons in it var buttons_array:Array=new Array(menu_mc.flep_mc,...


Go Back   Forum Flash CS3 Flash CS4 > Flash CS3 Flash CS4 > Flash Italiano > PhotoShop

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #11 (permalink)  
Old 17-09-08, 13:08
Onsitus's Avatar
CSS.FlepStudio.org
 
Join Date: Jul 2007
Location: Nettuno Beach
Posts: 1,060
Rep Power: 3
Onsitus is on a distinguished road
Re: Creare un menu di navigazione

Prova e fai sapere



// create an array and put the buttons in it
var buttons_array:Array=new Array(menu_mc.flep_mc,menu_mc.flash_mc,menu_mc.ps_ mc,menu_mc.news_mc,menu_mc.blog_mc);
//array che contiene tutti gli url associati ai pulsanti
var url_array:Array = ["http://www.onsitus.it", "http://www.flepstudio.org", "http://www.google.it", "http://www.yahoo.it", "http://www.libero.it"];
/* add listeners to buttons. Add an id for each button.
At MOUSE_DOWN calls "callSelectionButton" function*/
for(var i:int=0;i
{
buttons_array[i].mouseChildren=false;
buttons_array[i].buttonMode=true;
buttons_array[i].id=i;
buttons_array[i].addEventListener(MouseEvent.MOUSE_DOWN,callSelect ionButton);
}

/* This function calls another funtion ( selectionButton )
passing the id of the button that has been clicked*/
function callSelectionButton(evt:MouseEvent):void
{
selectionButton(evt.target.id);
//URLRequest
var url:URLRequest = new URLRequest(url_array[evt.target.id]);
navigateToURL(url, "_self");

}
/* create the function that handle the states of buttons.
This function requires one paremeter ( int type ) that is the id of the selected button*/
function selectionButton(id:int):void
{
// open a loop through the buttons array
for(var i:int=0;i
{
if(i==id)
buttons_array[i].gotoAndStop(1);
else
buttons_array[i].gotoAndStop(2);
}
}

// Enable the first button
selectionButton(0);

Last edited by Onsitus; 17-09-08 at 13:10..
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #12 (permalink)  
Old 20-09-08, 20:19
frabis67's Avatar
Junior Member
 
Join Date: Sep 2008
Location: roma
Posts: 5
Rep Power: 0
frabis67 is on a distinguished road
Riferimento: Creare un menu di navigazione

GRAZIE PER LA RISPOSTA,GENTILISSIMA! FUNZIONA
E' proprio quello di cui avevo bisogno....
P.S.:
nell'esempio che mi hai postato dei pezzi di codice non si leggono....ho provato a riscriverli per postarli ma in anteprima li fa sparire anche a me.... volevo avvertirvi
grazie ancora e buon lavoro
frabis67
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #13 (permalink)  
Old 28-11-08, 09:41
Junior Member
 
Join Date: Feb 2008
Posts: 4
Rep Power: 0
Mavb52 is on a distinguished road
Re: Creare un menu di navigazione

Ciao a tutti, avrei bisogno di qualche consiglio in quanto in flash sono veramente scarsino. Ho visto i file di esempio della creazione del menu, ma ad un certo punto mi sono bloccato e mi sono detto: "Ok e ora dove posizioni il link di destinazione su ogni tab?"
Chi mi sa dire in quale punto si mette l'evento e sopratutto qual'è la sintassi corretta?

Grazie mille
Christian
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #14 (permalink)  
Old 28-11-08, 17:12
Onsitus's Avatar
CSS.FlepStudio.org
 
Join Date: Jul 2007
Location: Nettuno Beach
Posts: 1,060
Rep Power: 3
Onsitus is on a distinguished road
Re: Creare un menu di navigazione

Ciao Christian,

Usi actionscript 3.0, giusto?
Tutte le azione vengono aggiunte nel primo fotogramma del fla, come da esempio allegato.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #15 (permalink)  
Old 01-12-08, 07:34
Junior Member
 
Join Date: Feb 2008
Posts: 4
Rep Power: 0
Mavb52 is on a distinguished road
Re: Creare un menu di navigazione

Grazie per la risposta,
si uso actionscript 3.0.
Le poche volte che mi sono cimentato con flash usavo ancora actionscript 2.0.
Quindi tutte le istruzioni vanno nel primo fotogramma.
E la sintassi per linkare i tab rimane la medesima giusto?

Grazie ancora
Christian
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #16 (permalink)  
Old 01-12-08, 07:50
Junior Member
 
Join Date: Feb 2008
Posts: 4
Rep Power: 0
Mavb52 is on a distinguished road
Re: Creare un menu di navigazione

Ciao sono sempre io, mi ero dimenticati di cheiderti un'altra cosa.
Ho notato che il menu viene creato tramite array.
I link a questo punto come faccio ad assegnarli ad ogni tab essendo link uno diverso dall'altro?

Grazie
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #17 (permalink)  
Old 01-12-08, 10:49
Onsitus's Avatar
CSS.FlepStudio.org
 
Join Date: Jul 2007
Location: Nettuno Beach
Posts: 1,060
Rep Power: 3
Onsitus is on a distinguished road
Re: Creare un menu di navigazione

Guarda l'as che ho postato prima per un altro utente (qualche posti sopra il tuo).
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #18 (permalink)  
Old 01-12-08, 10:50
Junior Member
 
Join Date: Feb 2008
Posts: 4
Rep Power: 0
Mavb52 is on a distinguished road
Re: Creare un menu di navigazione

Perfetto,
scusami ma non mi ero reso conto che avevi scritto qualcosa nei post precendenti.

Sorry
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
Creare un menu e gestire le sezioni con Flash CS3 Flep Articoli e tutorials 29 07-01-09 17:10
Flash CS3 Creare barra menu con sottomenu flash cs3 capitano23 Flash Italiano 1 16-09-08 09:10
creare un menu e gestire sezioni esterne salvo AIUTO utilità free 5 04-06-08 21:23
Aiuto Per Creare Un Menu Con Testo Scorrevole gino Flash Italiano 1 10-01-08 14:09
leggere dell'xml e creare menu on the fly nootropic.kint Actionscript 3.0 base 4 17-10-07 06:59


All times are GMT. The time now is 03:05.

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