Hjælp med actionscript 2.0 FLV dynamic load isteden for jpg
Hej, er der nogen kan hjælpe mig!!??Jeg har et projekt som er lavet i flash og actionscript 2. Jeg har linket det med xml. Projektet omhandler en flvplayback movies som er linket med knapper i en scrollbar. Hver gang man trykker på en af disse knapper (steps) kommer der en ny flvmovie frem. Jeg har allerede lavet hele projektet og det kører nu med jpg foto gallery, men jeg kan ikke finde ud af hvordan jeg linker forskellige FLV i stedet for billeder. Jeg mangler noget i koden (actionscript og xml) således jeg kan linke FLV istedet for jpg.
Hermed er en kopi af min AS og XML
På forhånd.... mange tak.
descriptions = true;
// box frame invisibile
alert._visible = false;
// effect ease
var ease = 5;
//impression scale of foto dimens.
_root.scala_x = 100;
_root.scala_y = 100;
//impression barra is visibile
_root.barra_stato = "true";
_root.box.useHandCursor = false;
//This is an XML for (data)
thumbs = new XML();
thumbs.ignoreWhite = true;
thumbs.load("data.xml");
// Scroll dimensions .XML
thumbs.onLoad = function() {
root = this.firstChild;
total = root.childNodes.length;
displayNum = Number(root.childNodes[0].attributes.displayNum);
separation = Number(root.childNodes[0].attributes.separation);
//scroll settings
w = 60;
h = 30;
mask._width = displayNum*(w+separation);
mask._height = h+20;
forward._x = mask._width+30;
forward._y = back._y=h/2;
mcs = [];
for (i=0; i<total; i++) {
mcs.push(i);
newThumb = thumbnailer.container.duplicateMovieClip("container"+i, i);
with (newThumb) {
_x = (w+separation)*i;
preloader._x = w/2;
preloader._y = h/2;
shape._width = w;
shape._height = h;
}
var image = root.childNodes[i].childNodes[0].firstChild.nodeValue;
var image1 = root.childNodes[0].childNodes[0].firstChild.nodeValue;
newThumb.image = root.childNodes[i].childNodes[0].firstChild.nodeValue;
newThumb.desc = root.childNodes[i].childNodes[1].firstChild.nodeValue;
newThumb.link = root.childNodes[i].childNodes[2].firstChild.nodeValue;
loadMovie(image1, _root.box.foto_effetto);
_root.box._xscale = _root.scala_x;
// scale to large
_root.box._yscale = _root.scala_y;
// scale to release where to change to load the movies
newThumb.onRelease();
newThumb.cont.loadMovie(image);
//courser of thumbs thumbs
newThumb.cont2.loadMovie(image);
//courser of thumbs and scales
newThumb.cont._xscale = 8.2;
// courser of enlarge
newThumb.cont._yscale = 12.2;
// scale of thumb and over all images
newThumb.cont2._xscale = newThumb.cont._xscale;
newThumb.cont2._yscale = newThumb.cont._yscale;
newThumb.onRelease = function() {
loadMovie(this.image, _root.box.foto_effetto);
// courser of images with clip effect
_root.box.play();
// action for the box
_root.box._xscale = _root.scala_x;
// scale to enlarge
_root.box._yscale = _root.scala_y;
// scale after release
};
if (descriptions) {
newThumb.onRollOver = function() {
alert.desc = this.desc;
alert._visible = true;
this._xscale = 100;
this._yscale = 110;
this._y = this._y-10;
this._x = this._x-2;
this.swapDepths(9);
};
newThumb.onRollOut = function() {
alert._visible = false;
this._xscale = 100;
this._yscale = 100;
this._y = this._y+10;
this._x = this._x+5;
};
}
}
//
var offset = total-1;
var dest = 0;
var increment = w+separation;
var ending = (total-displayNum)*(w+separation);
var lastmc = total-1;
var firstmc = 0;
back.onRelease = function() {
if (dest<0) {
dest += increment;
} else {
first = mcs[0];
for (k=0; k<total; k++) {
mcs[k] = mcs[k+1];
}
mcs[total-1] = first;
thumbnailer["container"+lastmc]._x = -(w+separation);
firstmc = lastmc;
//check whos new lastmc
for (k=0; k<total; k++) {
if (mcs[k] == (total-1)) {
lastmc = k;
}
}
}
};
forward.onRelease = function() {
if (dest>-ending) {
dest -= increment;
} else {
last = mcs[total-1];
for (k=1; k<total; k++) {
mcs[total-k] = mcs[total-k-1];
}
mcs[0] = last;
thumbnailer["container"+firstmc]._x = (displayNum)*(w+separation);
lastmc = firstmc;
//check whos new firstmc
for (k=0; k<total; k++) {
if (mcs[k] == 0) {
firstmc = k;
}
}
}
};
//movement
onEnterFrame = function () {
for (j=0; j<total; j++) {
thumbnailer["container"+j]._x += (dest+(mcs[j])*(w+separation)-thumbnailer["container"+j]._x)/ease;
}
alert._x = _xmouse;
alert._y = _ymouse;
};
};
----------------------
XML
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<images>
<thumb displayNum="6" separation="5">
<image>images/photo1.jpg</image>
<description>Step 1 Chain tightener Description 1445-0500-0001</description>
</thumb>
<thumb>
<image>images/photo2.jpg</image>
<description>Step 2 Chain tightener Description 1445-0500-0001</description>
</thumb>
<thumb>
<image>images/photo3.jpg</image>
<description>Step 3 Chain tightener Description 1445-0500-0001</description>
</thumb>
<thumb>
<image>images/photo4.jpg</image>
<description>Step 4 Chain tightener Description 1445-0500-0001</description>
</thumb>
<thumb>
<image>images/photo5.jpg</image>
<description>Step 5 Chain tightener Description 1445-0500-0001</description>
</thumb>
<thumb>
<image>images/photo6.jpg</image>
<description>Step 6 Chain tightener Description 1445-0500-0001</description>
</thumb>
<thumb>
<image>images/photo7.jpg</image>
<description>Step 7 Chain tightener Description 1445-0500-0001</description>
</thumb>
</images>
