Posto comunque il codice modificato:
PHP:
Codice PHP:
<embed src=fileflash.swf width=289 wmode="transparent"></embed>
<?php $testo = "";
$i=1;
while ($row = mysql_fetch_array($UltimiReportage))
{
$testox .= "&testo$i=";
$testotemp = "<a class=\"linkrep\" target=\"_top\" href=\"visual_rep.php?DirReportage=".$DirReportage."&cod=".$cod."\">";
$i++;
....
$testotemp = "</a>
&";
$testotemp = urlencode($testotemp);
$testox .= $testotemp;
}
$testo = $testox;
echo $testo;?>
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");
j = 1;
_root.testo.htmlText = "";
while (this["testo"+j] != undefined) {
_root.testo.htmlText += this["testo"+j];
j++;
}
} else {
// se il caricamento non avviene con successo
trace("non ho caricato");
}
};
caricadati.load("frameultimireportage3.php",this);
fscommand("allowscale", false);
su_btn.onPress = function(){
_root.onEnterFrame = function(){
_root.testo.scroll--;
}
};
su_btn.onRelease = function(){
_root.onEnterFrame = undefined;
}
giu_btn.onPress = function(){
_root.onEnterFrame = function(){
_root.testo.scroll++;
}
};
giu_btn.onRelease = function(){
_root.onEnterFrame = undefined;
}
t = new Object()
t.onKeyDown = function(){
if(Key.isDown(Key.UP)){
_root.testo.scroll--;
}else if(Key.isDown(Key.DOWN)){
_root.testo.scroll++;
}
};
Key.addListener(t);