Creació un espai web dinàmic en un fotograma
 
 
     
  Estructura de l'aplicació  
     
 
L'estructura de l'aplicació és la mateixa que als capítols anteriors amb petites diferencies que surten a la següent imatge:
 
     
     
 
     
  Tota la programació la posareu al primer fotograma de la línia de temps.  
     
 
 
     
     
  Programació de l'aplicació  
     
  Poseu al primer fotograma de la línia de temps el següent codi que ja ha estat explicat al llarg del mòdul 6.  
     

System.useCodepage = true;
//////////////////////////////////////////////////////////////////////////////
carrega_estils = new TextField.StyleSheet();
//agafem el full d'stils de la carpeta estils_css
carrega_estils.load("estils_css/full_estils.css");
//////////////////////////////////////////////////////////////////////////////
carrega_imatges = new MovieClipLoader();
carrega_imatges.loadClip("imatges/pagina1.jpg", "contenidor_mc");
//////////////////////////////////////////////////////////////////////////////
carrega_textos = new LoadVars();
carrega_textos.load("text/les_meves_variables_css.txt");
carrega_textos.onLoad = function() {
camp_de_text.styleSheet = carrega_estils;
camp_de_text.border = true;
camp_de_text.borderColor = "0xcccccc";
camp_de_text.background = true;
camp_de_text.backgroundColor = "0xcccccc";
camp_de_text.htmlText = "<estil_web>"+carrega_textos.pagina1+"</estil_web>";
//////////////////////////////////////////////////////////////////////////////
nom_txt.styleSheet = carrega_estils;
nom_txt.htmlText = "<estil_web>"+carrega_textos.nom+"</estil_web>";
//////////////////////////////////////////////////////////////////////////////
curs_txt.styleSheet = carrega_estils;
curs_txt.htmlText = "<estil_web>"+carrega_textos.curs+"</estil_web>";
};

//programació als botons. Ara tindrem un sol quadre de text
modul1_btn.onRelease = function() {
carrega_imatges.loadClip("imatges/pagina1.jpg", "contenidor_mc");
camp_de_text.htmlText = "<estil_web>"+carrega_textos.pagina1+"</estil_web>";
};
modul2_btn.onRelease = function() {
carrega_imatges.loadClip("imatges/pagina2.jpg", "contenidor_mc");
camp_de_text.htmlText = "<estil_web>"+carrega_textos.pagina2+"</estil_web>";
};
modul3_btn.onRelease = function() {
carrega_imatges.loadClip("imatges/pagina3.jpg", "contenidor_mc");
camp_de_text.htmlText = "<estil_web>"+carrega_textos.pagina3+"</estil_web>";
};
modul4_btn.onRelease = function() {
carrega_imatges.loadClip("imatges/pagina4.jpg", "contenidor_mc");
camp_de_text.htmlText = "<estil_web>"+carrega_textos.pagina4+"</estil_web>";
};
modul5_btn.onRelease = function() {
carrega_imatges.loadClip("imatges/pagina5.jpg", "contenidor_mc");
camp_de_text.htmlText = "<estil_web>"+carrega_textos.pagina5+"</estil_web>";
};
modul6_btn.onRelease = function() {
carrega_imatges.loadClip("imatges/pagina6.jpg", "contenidor_mc");
camp_de_text.htmlText = "<estil_web>"+carrega_textos.pagina6+"</estil_web>";
};
modul7_btn.onRelease = function() {
carrega_imatges.loadClip("imatges/pagina7.jpg", "contenidor_mc");
camp_de_text.htmlText = "<estil_web>"+carrega_textos.pagina7+"</estil_web>";
};
modul8_btn.onRelease = function() {
carrega_imatges.loadClip("imatges/pagina8.jpg", "contenidor_mc");
camp_de_text.htmlText = "<estil_web>"+carrega_textos.pagina8+"</estil_web>";
};
dalt_btn.onPress = function() {
camp_de_text.scroll = camp_de_text.scroll+1;
};
baix_btn.onPress = function() {
camp_de_text.scroll = camp_de_text.scroll-1;
};

 
     
  Resultat que heu d'obtenir