il fatto è che va bene per le altre sezioni ma non per quella dei servizi dove mi serve il commento sotto il video.
Tuttavia questo è l'actionscript del file in flash:
Codice PHP:
/**********---------- Config Part ----------**********/
import cn.com.webstudio.util.*;
Stage.scaleMode = "noscale";
Stage.align = "TL";
//Stage.showMenu = false;
stop();
/**********---------- Variable Part ----------**********/
var dataArr:Array = [];
var curItem:Number = 0;
//sound volume setting
var volume:Number = 50;
//buffer time setting
var bufferTime:Number = 10;
var locked:Boolean = false;
//please set these fellowing value from external xml file.
var autoPlayFirst:Boolean = false;
var autoPlayAll:Boolean = false;
var autoNext:Boolean = false;
var mainStyleColor:Number = 0x090909;
//
var titleItem, videoItem, thumbList, controlItem, scrollItem;
/**********---------- Function Part ----------**********/
// Load the xml file.
function loadXML(url:String, callback:Function) {
var myxml:XML = new XML();
myxml.ignoreWhite = true;
myxml.onLoad = function(success) {
if (success) {
if (callback != null) {
callback(this);
}
}
};
myxml.load(url);
}
loadXML("xml/services.xml", parseXML);
// parse xml data
function parseXML(xml:XML) {
curItem = -1;
dataArr = [];
var i, j, temp1, temp2, temp3;
temp1 = xml.firstChild.firstChild.childNodes;
// config part
autoPlayFirst = temp1[0].firstChild.nodeValue=="true";
autoPlayAll = temp1[1].firstChild.nodeValue=="true";
autoNext = temp1[2].firstChild.nodeValue=="true";
mainStyleColor = int(temp1[3].firstChild.nodeValue);
// item data
temp2 = xml.firstChild.childNodes[1].childNodes;
for (i in temp2) {
dataArr[i] = {};
temp3 = temp2[i].childNodes;
for (j in temp3) {
dataArr[i][temp3[j].nodeName] = temp3[j].firstChild.nodeValue;
}
}
init();
}
function init() {
// title item
titleItem = this.attachMovie("titleItem", "titleItem", 1);
titleItem._x = 270;
titleItem._y = 540;
// video list
videoItem = this.attachMovie("videoItem", "videoItem", 2);
videoItem._x = 270;
videoItem._y = 202;
videoItem.posX = videoItem._x;
videoItem.posY = videoItem._y;
videoItem.posW = videoItem._width;
videoItem.posH = videoItem._height;
// thumb list
thumbList = this.attachMovie("thumbList", "thumbList", 3);
thumbList._x = 1;
thumbList._y = 396;
// control item
controlItem = this.attachMovie("controlItem", "controlItem", 4);
controlItem._x = videoItem._x;
controlItem._y = videoItem._y+videoItem._height;
controlItem.posX = controlItem._x;
controlItem.posY = controlItem._y;
//controlItem.volBut.onPress();
setStyle();
}
function setStyle() {
wEffect.setRGB(thumbList.back, mainStyleColor);
wEffect.setRGB(infoItem.back, mainStyleColor);
}
mentre
questo è xml:
codice:
<?xml version="1.0" encoding="utf-8"?>
<data>
<config>
<autoPlayFirst>true</autoPlayFirst>
<autoPlayAll>true</autoPlayAll>
<autoNext>false</autoNext>
<mainStyleColor>0x000000</mainStyleColor>
</config>
<video>
<item>
<title>show production</title>
<description><![CDATA[]]></description>
<url>video/servizi/show_production.flv</url>
<thumb></thumb>
</item>
</video>
</data>
grazie ancora