Pagina 1 di 3 1 2 3 ultimoultimo
Visualizzazione dei risultati da 1 a 10 su 23

Discussione: [2004] css - xml

  1. #1

    [2004] css - xml

    salve
    sarò breve..
    non trovo i percorsi/path per caricare il tutto con loadMovie("file.swf", "_level0.carico.dentro_css"); posto il codeAS
    codice:
    ApriXML();
    function ApriXML() {
    	textArea_mc.text = "Caricamento dell'XML...";
    	mioxml = new XML();
    	myarray = new Array();
    	myarray2 = new Array();
    	myarray3 = new Array();
    	myarray4 = new Array();
    	titleitem = new Array();
    	description = new Array();
    	image = new Array();
    	link = new Array();
    	filexml = "xml_rss.xml";
    	mioxml.load(filexml);
    	mioxml.ignoreWhite = true;
    	mioxml.onLoad = ElaboraXMLvideo;
    	function ElaboraXMLvideo(success) {
    		if (mioxml.loaded) {
    			myarray = mioxml.childNodes;
    			for (j=0; j<=myarray.length; j++) {
    				if (myarray[j].nodeName == "rss") {
    					myarray2 = myarray[j].childNodes;
    					for (i=0; i<=myarray2.length; i++) {
    						if (myarray2[i].nodeName == "channel") {
    							myarray3 = myarray2[i].childNodes;
    							for (k=0; k<=myarray3.length; k++) {
    								if (myarray3[k].nodeName == "title") {
    									loading = myarray3[k].childNodes.toString();
    								}
    								if (myarray3[k].nodeName == "description") {
    									loading = loading+" - "+myarray3[k].childNodes.toString();
    								}
    								if (myarray3[k].nodeName == "item") {
    									myarray4 = myarray3[k].childNodes;
    									for (n=0; n<=myarray4.length; n++) {
    										if (myarray4[n].nodeName == "title") {
    											titleitem.push(myarray4[n].childNodes.toString());
    										} else if (myarray4[n].nodeName == "description") {
    											description.push(myarray4[n].childNodes.toString());
    											image.push("[img]"+myarray4[n].attributes.src+"[/img]");
    										} else if (myarray4[n].nodeName == "link") {
    											link.push(myarray4[n].childNodes.toString());
    										}
    									}
    								}
    							}
    						}
    					}
    				}
    			}
    			textArea_mc.text=""
    			populateTextArea();
    		} else {
    			textArea_mc.text="Errore nell'apertura del file XML."
    		}
    		// Libero risorse
    		delete myarray;
    		delete myarray2;
    		delete myarray3;
    		delete myarray4;
    		delete mioxml;
    		
    	}
    }
    --------
    codice:
    function populateTextArea() {
    	//inizializzo il componente TextArea 
    	textArea_mc.html = true;
    	textArea_mc.wordWrap = true;
    	textArea_mc.multiline = true;
    	/******************************/
    	//Carico il CSS
    	stileCSS = new TextField.StyleSheet();
    	stileCSS.load("foglio_stile.css");
    	stileCSS.onLoad = function(success) {
    		if (success) {
    			textArea_mc.styleSheet = stileCSS;
    			maxn = link.length-1;
    			for (i=0; i<=maxn; i++) {
    				// Inserisco i dati nella textArea aggiungendo i Tag HTML per la formattazione
    				textArea_mc.text += ""+titleitem[i]+"";
    				textArea_mc.text += "
    <body>"+image[i]+description[i]+"</body>
    
    ";
    			}
    		} else {
    			textArea_mc.text = "Errore nel caricamento del CSS";
    		}
    	};
    	//trace(textArea_mc.text)
    }
    stop();
    Interactive Html/CSS/JS Playground | @webbeloz ( cip..cip! )
    Mechanics & Expert Tuning Fix Z3 Roadster Community

  2. #2
    «UP»
    Interactive Html/CSS/JS Playground | @webbeloz ( cip..cip! )
    Mechanics & Expert Tuning Fix Z3 Roadster Community

  3. #3



    ehm...cos'è che non funziona?

  4. #4
    in pratica quando richiami il file nel loadìmovie la textarea non restituisce alcun risultato giusto?
    -Raia Riccardo-
    Un forumello gnocco
    La vita è strana per questo bella

    non ero moderatore quando zork era un alcolizzato

  5. #5
    Originariamente inviato da Veleno-CG



    ehm...cos'è che non funziona?
    ciao Vele..
    funziona, ma non quando caricato nelle "istanze" che vedi nel loadMovie("ecc.. che sono appunto "_level0.carico.dentro_css"
    Interactive Html/CSS/JS Playground | @webbeloz ( cip..cip! )
    Mechanics & Expert Tuning Fix Z3 Roadster Community

  6. #6
    Originariamente inviato da chisono
    in pratica quando richiami il file nel loadìmovie la textarea non restituisce alcun risultato giusto?
    esatto, rimane solo l'errore che proviene appunto da:
    codice:
    textArea_mc.text = "Errore nel caricamento del CSS";
    Interactive Html/CSS/JS Playground | @webbeloz ( cip..cip! )
    Mechanics & Expert Tuning Fix Z3 Roadster Community

  7. #7
    Originariamente inviato da webbeloz
    esatto, rimane solo l'errore che proviene appunto da:
    codice:
    textArea_mc.text = "Errore nel caricamento del CSS";
    :master:

    questa riga ti esce?

    textArea_mc.text = "Caricamento dell'XML...";
    -Raia Riccardo-
    Un forumello gnocco
    La vita è strana per questo bella

    non ero moderatore quando zork era un alcolizzato

  8. #8
    ecco il file.xml :

    codice:
    <?xml version="1.0" encoding="UTF-8"?>
    <rss version="0.91">
    	<channel>
    		<title>FLA Download</title>
    		<description>Programmazione Flash Action Script </description>
    		<link>http://www.tuo_sito.com</link>
    		<item>
    			<title><![CDATA[applicazioni dinamiche utilizzando Flash e XML.]]></title>
    			<description src="image/image1.jpg" width="65" height="65">Realizzare applicazioni dinamiche ...</description>
    			<link><![CDATA[http://www.tuo_sito.com/default.asp?...0&PageNumber=1]]></link>
    		</item>
    		<item>
    			<title><![CDATA[bla bla bla]]></title>
    			<description src="image/image2.jpg" width="65" height="65">applicazione web.</description>
    			<link><![CDATA[http://www.tuo_sito.com/default.asp?...3&PageNumber=1]]></link>
    		</item>
    		<item>
    			<title><![CDATA[Guida ]]></title>
    			<description src="image/image3.jpg" width="65" height="65">disposizione tutta la guida </description>
    			<link><![CDATA[http://www.tuo_sito.com/default.asp?...lingua=1&id=64]]></link>
    		</item>
    	</channel>
    </rss>
    Interactive Html/CSS/JS Playground | @webbeloz ( cip..cip! )
    Mechanics & Expert Tuning Fix Z3 Roadster Community

  9. #9
    Originariamente inviato da chisono
    :master:

    questa riga ti esce?

    textArea_mc.text = "Caricamento dell'XML...";
    si esce..
    per ora sto solo testando in locale
    Interactive Html/CSS/JS Playground | @webbeloz ( cip..cip! )
    Mechanics & Expert Tuning Fix Z3 Roadster Community

  10. #10
    ho fatto un test!
    ho crato un file principale..
    dove invece di passare attraverso n°2 istanze come prima..
    solo una.. loadMovie("file.swf", "_level0.carico");

    è così funziona.. :master:
    Interactive Html/CSS/JS Playground | @webbeloz ( cip..cip! )
    Mechanics & Expert Tuning Fix Z3 Roadster Community

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.