Ciao a tutti.
Ho un problema col passaggio di una variabile da php a flash 8.
Nel file php leggo da DB MYSQL dei dati e li salvo tutti all'interno di una variabile che chiamo "testo".
Una volta eseguita la query e salvato il contenuto nella variabile "testo" faccio l'echo in maniera tale che flash legga il suo contenuto.
Sapendo che la variabile contiene delle ancor del tipo: "<a href=view.php?id=2&us=4&lan=it>cliccaqui</a>", vorrei sapere come si può fare per far leggere a flash questa variabile in maniera corretta.
Di seguito riporto il codice php e poi quello flash.
PHP:
FLASH:codice:<embed src=fileflash.swf width=289 wmode="transparent"> <? $testo = ""; $i=1; while ($row = mysql_fetch_array($UltimiReportage)) { $DirReportage = $row["nome"]; $cod = $row["cod"]; $testo .= "&testo$i=<a class=\"linkrep\" target=\"_top\" href=\"visual_rep.php?DirReportage=".$DirReportage."&cod=".$cod."\">"; $i++; $paeseingl = Maiuscolo($row["paeseingl"]); $testo .= $paeseingl." - ".$row["nomeingl"]; $testo .= "</a> "; } $testo=urlencode($testo); echo $testo." &";?>
Qualcuno sa dirmi come posso fare per vedere il testo in un frame flash??codice:stop(); System.useCodepage = true; Stage.showMenu = false; Stage.scaleMode = 'noScale'; var caricadati = new LoadVars(); caricadati.onLoad = function(success) { if (success) { // se il caricamento avviene con successo // carica nella casella testo il contenuto di testo trace("caricato"); if (this.ok) { j = 1; _root.testo.htmlText = ""; while (this["testo"+j] != undefined) { _root.testo.htmlText += this["testo"+j]; j++; } _root.output.text = "ok"; } else { _root.testo.htmlText = ""; _root.output.text = "error"; } } else { // se il caricamento non avviene con successo trace("non ho caricato"); } }; caricadati.load("filephp.php"); fscommand("allowscale", false); su_btn.onPress = function(){ _root.onEnterFrame = function(){ caricadati.scroll--; } }; su_btn.onRelease = function(){ _root.onEnterFrame = undefined; } giu_btn.onPress = function(){ _root.onEnterFrame = function(){ caricadati.scroll++; } }; giu_btn.onRelease = function(){ _root.onEnterFrame = undefined; } t = new Object() t.onKeyDown = function(){ if(Key.isDown(Key.UP)){ caricadati.scroll--; }else if(Key.isDown(Key.DOWN)){ caricadati.scroll++; } }; Key.addListener(t);
Grazie

Rispondi quotando