| |||||||
Du magst keine Werbung? Wir auch nicht!
Einfach registrieren und die Werbung ist weg. Diese Nachricht sehen nur nicht registrierte Nutzer.
![]() |
| | LinkBack | Themen-Optionen | Ansicht |
| | #1 (permalink) |
| flashdepp Registriert seit: Mar 2008
Beiträge: 29
| Problem XML Slideshow
Hallo Leute! ...bin am verzweifeln und bitte um Hilfe!! Habe 2 Slideshows über zwei XMLs laufen. Wenn ich die eine Slideshow starte und danach die zweite werden die selben Bilder angezeigt - UND umgekehrt! Das ganze ist im CS3 und AS 2.0 gemacht. Wenn sich jemand findet der sich mit xml und slideshow auskennt und ne Minute hat zum reingucken, bitte bescheid sagen, dann schicke ich es der/demjenigen per Mail als .rar <1 MB. (kann es leider momentan nicht als Link zur Verfügung stellen!!) Besten Dank schonmal, abraxas |
| | |
| | #2 (permalink) |
| brand new user Registriert seit: May 2002 Ort: Laimbach 6 1/2
Beiträge: 16.884
|
deine scripts würden auch schon helfen! die datei brauchts ned
__________________ Bitte keine Fragen, zu Flash per PM. Dazu ist das Forum da. Danke MFG_RustyCake! "Wer tanzen will, muß erst gehen lernen" |
| | |
| | #3 (permalink) |
| flashdepp Registriert seit: Mar 2008
Beiträge: 29
| script
Ok hier mein script: slideshow1: imageholder (Bild großformatig) Code: function setImage(inputimage) {
if(image_mc){
image_mc.removeMovieClip();
}
attachMovie("buffergraphic","buffergraphic", this.getNextHighestDepth(),{_x:canvas._width/2,_y:canvas._height/2,_xscale:200,_yscale:200});
this.createEmptyMovieClip("image_mc", this.getNextHighestDepth());
var mclListener:Object = new Object();
mclListener.onLoadInit = function(target_mc:MovieClip) {
buffergraphic.removeMovieClip();
target_mc._alpha=0;
if(canvas._width/canvas._height>target_mc._width/target_mc._height){
target_mc._height=canvas._height;
target_mc._xscale=target_mc._yscale;
target_mc._x=(canvas._width-target_mc._width)/2;
}else{
target_mc._width=canvas._width;
target_mc._yscale=target_mc._xscale;
target_mc._y=(canvas._height-target_mc._height)/2;
}
target_mc.onEnterFrame=function(){
if(target_mc._alpha<100){
target_mc._alpha+=4;
}else{
delete target_mc.onEnterFrame;
}
}
};
var image_mcl:MovieClipLoader = new MovieClipLoader();
image_mcl.addListener(mclListener);
image_mcl.loadClip(inputimage, image_mc);
} Code: var floatpos=bg2._height/2;
var sidegap=2;
var imagecount = 0;
if (_parent._root.xmlfile == undefined || _parent._root.xmlfile == "") {
_parent._root.xmlfile = "slide1.xml";
}
var myXml:XML = new XML();
myXml.ignoreWhite = true;
myXml.load(_parent._root.xmlfile);
myXml.onLoad = function() {
loadImages();
};
function loadImages() {
for (imageIndex=0; imageIndex<myXml.childNodes[0].childNodes.length; imageIndex++) {
attachMovie("videobox2", "vid"+imageIndex, this.getNextHighestDepth());
eval("vid"+imageIndex).picthumb = myXml.childNodes[0].childNodes[imageIndex].childNodes[0].childNodes[0].nodeValue;
eval("vid"+imageIndex).caption2 = myXml.childNodes[0].childNodes[imageIndex].childNodes[1].childNodes[0].nodeValue;
eval("vid"+imageIndex).picfull = myXml.childNodes[0].childNodes[imageIndex].childNodes[2].childNodes[0].nodeValue;
eval("vid"+imageIndex).index = imageIndex;
eval("vid"+imageIndex).swapDepths(_parent.caption2box2);
imagecount++;
}
}
onEnterFrame = function () {
if (imagecount != 0) {
floatpos=(floatpos*12+_ymouse)/13;
curmouseover = Math.max(0, Math.min(imagecount, imagecount*(floatpos-sidegap)/(bg2._height-sidegap*2)));
eval("vid"+Math.floor(curmouseover))._y = floatpos-(curmouseover-Math.floor(curmouseover))*eval("vid"+Math.floor(curmouseover))._height;
for (curpos=Math.floor(curmouseover); curpos<imagecount-1; curpos++) {
eval("vid"+Math.floor(curpos+1))._y = eval("vid"+Math.floor(curpos))._y+eval("vid"+Math.floor(curpos))._height+sidegap;
}
for (curpos=Math.floor(curmouseover); curpos>0; curpos--) {
eval("vid"+Math.floor(curpos-1))._y = eval("vid"+Math.floor(curpos))._y-eval("vid"+Math.floor(curpos-1))._height-sidegap;
}
}
}; imageholder Code: function setImage(inputimage) {
if(image_mc){
image_mc.removeMovieClip();
}
attachMovie("buffergraphic","buffergraphic", this.getNextHighestDepth(),{_x:canvas._width/2,_y:canvas._height/2,_xscale:200,_yscale:200});
this.createEmptyMovieClip("image_mc", this.getNextHighestDepth());
var mclListener:Object = new Object();
mclListener.onLoadInit = function(target_mc:MovieClip) {
buffergraphic.removeMovieClip();
target_mc._alpha=0;
if(canvas._width/canvas._height>target_mc._width/target_mc._height){
target_mc._height=canvas._height;
target_mc._xscale=target_mc._yscale;
target_mc._x=(canvas._width-target_mc._width)/2;
}else{
target_mc._width=canvas._width;
target_mc._yscale=target_mc._xscale;
target_mc._y=(canvas._height-target_mc._height)/2;
}
target_mc.onEnterFrame=function(){
if(target_mc._alpha<100){
target_mc._alpha+=4;
}else{
delete target_mc.onEnterFrame;
}
}
};
var image_mcl:MovieClipLoader = new MovieClipLoader();
image_mcl.addListener(mclListener);
image_mcl.loadClip(inputimage, image_mc);
} var floatpos=bg._height/2; var sidegap=2; var imagecount = 0; if (_parent._root.xmlfile == undefined || _parent._root.xmlfile == "") { _parent._root.xmlfile = "slide2.xml"; } var myXml:XML = new XML(); myXml.ignoreWhite = true; myXml.load(_parent._root.xmlfile); myXml.onLoad = function() { loadImages(); }; function loadImages() { for (imageIndex=0; imageIndex<myXml.childNodes[0].childNodes.length; imageIndex++) { attachMovie("videobox", "vid"+imageIndex, this.getNextHighestDepth()); eval("vid"+imageIndex).picthumb = myXml.childNodes[0].childNodes[imageIndex].childNodes[0].childNodes[0].nodeValue; eval("vid"+imageIndex).caption = myXml.childNodes[0].childNodes[imageIndex].childNodes[1].childNodes[0].nodeValue; eval("vid"+imageIndex).picfull = myXml.childNodes[0].childNodes[imageIndex].childNodes[2].childNodes[0].nodeValue; eval("vid"+imageIndex).index = imageIndex; eval("vid"+imageIndex).swapDepths(_parent.captionb ox); imagecount++; } } onEnterFrame = function () { if (imagecount != 0) { floatpos=(floatpos*12+_ymouse)/13; curmouseover = Math.max(0, Math.min(imagecount, imagecount*(floatpos-sidegap)/(bg._height-sidegap*2))); eval("vid"+Math.floor(curmouseover))._y = floatpos-(curmouseover-Math.floor(curmouseover))*eval("vid"+Math.floor(cu rmouseover))._height; for (curpos=Math.floor(curmouseover); curpos<imagecount-1; curpos++) { eval("vid"+Math.floor(curpos+1))._y = eval("vid"+Math.floor(curpos))._y+eval("vid"+Math. floor(curpos))._height+sidegap; } for (curpos=Math.floor(curmouseover); curpos>0; curpos--) { eval("vid"+Math.floor(curpos-1))._y = eval("vid"+Math.floor(curpos))._y-eval("vid"+Math.floor(curpos-1))._height-sidegap; } } }; Hier beide xml(nur 1 Bild pro xml, damit es übersichtlicher ist): slide1.xml Code: <?xml version="1.0"?> <images> <image><thumb>pic_slide1/pic_thumb_1.jpg</thumb><caption2>Bild1</caption2><pic>pic_slide1/pic_1.jpg</pic></image> </images> <?xml version="1.0"?> <images> <image><thumb>pic_slide2/pic_thumb_1.jpg</thumb><caption>Bild1</caption><pic>pic_slide2/pic_1.jpg</pic></image> </images> |
| | |
| | #5 (permalink) |
| ................ Registriert seit: Jun 2004
Beiträge: 15.890
|
Das hier: PHP-Code: Würde es mal so probieren: PHP-Code:
__________________ ternärer Konditionaloperator +++ Bitte keine Privat-Nachrichten bezüglich Flashfragen! +++ |
| | |
![]() |
| Lesezeichen |
| Themen-Optionen | |
| Ansicht | |
| |