| |||||||
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) |
| Neuer User Registriert seit: Jul 2006
Beiträge: 4
|
Ich habe bereits nach diesem Problem gesucht, konnte aber nichts passendes finden. Ich hoffe mal, dass ich nix übersehen habe, aber nun zum Problem: Ich habe einen Flashslider auf meine Bedürfnisse angepasst, solange ich die swf lokal anschaue, passt alles. Lade ich sie auf den Server und rufe sie direkt auf, passt alles. Eingebunden in der HTML Datei funktioniert leider garnichtsmehr. Es wird kein Bild geladen. Die Pfade zu den Bildern sind in einer *.txt hinterlegt, ich habe auch spasseshalber 2 bilder mit voller URL eingegeben - bringt nichts. Die Seite zum anschauen: http://tinko-theater.de/NewOne_index.html Die SWF zum anschauen: http://tinko-theater.de/cms/upload/f...ilderreihe.swf Anbei mal alles Codemäßige: Die Einbindung in der HTML Seite: Code: <div id="FlashReferenzen">
<div style="top:6px, width:366px; height:70px;">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="366" height="70"
title="Bilderleiste">
<param name="movie" value="upload/flash/NewOne_TinkoBilderreihe.swf" />
<param name="quality" value="high" />
<embed src="upload/flash/NewOne_TinkoBilderreihe.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer"
type="application/x-shockwave-flash" width="366" height="70"></embed>
</object>
</div> Code: loadMovie("weichekante.png", 10);
var lv = new LoadVars();
var pictures = new Array(); // Array für die Bild-MCs
var amt = 0; // Anzahl der Bilder
var distance = 72; // horizontaler Abstand der Bilder
var width = 52; // Neue Breite der Bilder
var height = 70; // Neue Höhe der Bilder
var spd = 1; // Bewegungsgeschwindigkeit (Pixel/Frame)
var dispwidth = 418; // Breite des "Fensters"
lv.load("slideshow.txt");
lv.onLoad = function() {
loadPics(this);
}
function loadPics(obj) {
display.container._visible = false;
var c = 0;
for (var i in obj) {
// MovieClip erstellen:
if (obj[i].indexOf(".jpg") > 0) {
pictures[c] = display.container.createEmptyMovieClip("pic" + c, c);
pictures[c].pic = pictures[c].createEmptyMovieClip("pic", 1);
// Bilddatei einladen
pictures[c].pic.loadMovie(obj[i]);
trace(obj[i]);
// Rahmen zeichnen:
pictures[c].frame = pictures[c].createEmptyMovieClip("frame", 2);
pictures[c].frame.lineStyle(1, 0, 100),
pictures[c].frame.moveTo(0, 0);
pictures[c].frame.lineTo(width, 0);
pictures[c].frame.lineTo(width, height);
pictures[c].frame.lineTo(0, height);
pictures[c].frame.lineTo(0, 0);
c++;
}
}
amt = c;
trace("AMT: "+c);
startLoad();
}
function startLoad() {
// Alle Bilder vorladen
var cur = 0;
var max = 0;
this.onEnterFrame = function() {
cur = 0;
max = 0;
all = true;
for (var i=0; i < amt; i++) {
cur += pictures[i].pic.getBytesLoaded();
max += pictures[i].pic.getBytesTotal();
if (pictures[i].pic.getBytesLoaded() == 0 || pictures[i].pic.getBytesTotal() == 0) {
all = false;
}
}
if (cur >= max && all == true) {
startSlide(); // Slideshow beginnen
}
}
}
function startSlide() {
for (var i=0; i < amt; i++) {
pictures[i]._x = i * distance - distance;
pictures[i]._y = 0;
pictures[i].pic._width = width;
pictures[i].pic._height = height;
}
display.container._visible = true;
this.onEnterFrame = function() {
for (var i=0; i < amt; i++) {
pictures[i]._x += spd;
if (pictures[i]._x > dispwidth) {
pictures[i]._x = pictures[getPrevPic(i)]._x - distance;
}
}
}
}
function getPrevPic(n) {
if (n < amt - 1) {
return n + 1
} else {
return 0;
}
} Code: bild1=http://tinko-theater.de/cms/upload/flash/logo_klein_1.jpg&bild2=http://tinko-theater.de/cms/upload/flash/logo_klein_2.jpg&bild3=logo_klein_3.jpg&bild4=logo_klein_4.jpg&bild5=logo_klein_5.jpg&bild6=logo_klein_6.jpg&bild7=logo_klein_7.jpg&bild8=logo_klein_8.jpg&bild9=logo_klein_9.jpg Vielen Dank im vorraus, der perfekte Kreis |
| | |
| | #2 (permalink) |
| CodeGecko Registriert seit: Aug 2007 Ort: Hagen
Beiträge: 1.242
|
Die Pfade gehen immer von der HTML-Datei aus und nicht von der swf. Somit kann Deine txt nicht geladen werden, weil sie an der falschen Stelle gesucht wird: lv.load("upload/flash/slideshow.txt"); oder ggf. auch lv.load("cms/upload/flash/slideshow.txt");
__________________ Grütze Reinhart XING || Simple Flash-Filter-Generator || DateChooser (AS3) MovieClipLoader-Example (AS2) || PreloaderClass (AS2) || Framechecker-Component (AS2) Bitte keine Flashfragen per PN oder ICQ. Dafür ist das Forum da. Geändert von hellslawyer (14-06-2008 um 16:50 Uhr) |
| | |
| | #3 (permalink) |
| Neuer User Registriert seit: Jul 2006
Beiträge: 4
|
mh, schonmal gut zu wissen. wenn ich mit Code: loadMovie("upload/flash/logo_klein_1.jpg", 30); weiterhin ists aber so, dass eingebunden in die html datei nichts angezeigt wird! Rufe ich die swf direkt auf, zeigt er (logischerweise) auch nichtsmehr an. Nochmal der Link http://tinko-theater.de/NewOne_index.html hier nochmal das neue ActionScript: Code: // loadMovie("upload/flash/weichekante.png", 10);
// loadMovie("upload/flash/logo_klein_1.jpg", 30);
var lv = new LoadVars();
var pictures = new Array(); // Array für die Bild-MCs
var amt = 0; // Anzahl der Bilder
var distance = 72; // horizontaler Abstand der Bilder
var width = 52; // Neue Breite der Bilder
var height = 70; // Neue Höhe der Bilder
var spd = 1; // Bewegungsgeschwindigkeit (Pixel/Frame)
var dispwidth = 418; // Breite des "Fensters"
lv.load("upload/flash/slideshow.txt");
lv.onLoad = function() {
loadPics(this);
}
function loadPics(obj) {
display.container._visible = false;
var c = 0;
for (var i in obj) {
// MovieClip erstellen:
if (obj[i].indexOf(".jpg") > 0) {
pictures[c] = display.container.createEmptyMovieClip("pic" + c, c);
pictures[c].pic = pictures[c].createEmptyMovieClip("pic", 1);
// Bilddatei einladen
pictures[c].pic.loadMovie(obj[i]);
trace(obj[i]);
// Rahmen zeichnen:
pictures[c].frame = pictures[c].createEmptyMovieClip("frame", 2);
pictures[c].frame.lineStyle(1, 0, 100),
pictures[c].frame.moveTo(0, 0);
pictures[c].frame.lineTo(width, 0);
pictures[c].frame.lineTo(width, height);
pictures[c].frame.lineTo(0, height);
pictures[c].frame.lineTo(0, 0);
c++;
}
}
amt = c;
trace("AMT: "+c);
startLoad();
}
function startLoad() {
// Alle Bilder vorladen
var cur = 0;
var max = 0;
this.onEnterFrame = function() {
cur = 0;
max = 0;
all = true;
for (var i=0; i < amt; i++) {
cur += pictures[i].pic.getBytesLoaded();
max += pictures[i].pic.getBytesTotal();
if (pictures[i].pic.getBytesLoaded() == 0 || pictures[i].pic.getBytesTotal() == 0) {
all = false;
}
}
if (cur >= max && all == true) {
startSlide(); // Slideshow beginnen
}
}
}
function startSlide() {
for (var i=0; i < amt; i++) {
pictures[i]._x = i * distance - distance;
pictures[i]._y = 0;
pictures[i].pic._width = width;
pictures[i].pic._height = height;
}
display.container._visible = true;
this.onEnterFrame = function() {
for (var i=0; i < amt; i++) {
pictures[i]._x += spd;
if (pictures[i]._x > dispwidth) {
pictures[i]._x = pictures[getPrevPic(i)]._x - distance;
}
}
}
}
function getPrevPic(n) {
if (n < amt - 1) {
return n + 1
} else {
return 0;
}
} |
| | |
![]() |
| Lesezeichen |
| Themen-Optionen | |
| Ansicht | |
| |