Zurück   Flashforum > Flash > ActionScript > ActionScript 2

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 26-05-2010, 17:05   #1 (permalink)
Neuer User
 
Registriert seit: Sep 2008
Beiträge: 54
Unhappy Gallery mit Downladfunktion der Bilder

Hi Leute ich habe hier eine tolle Gallery gefunden indem sich das
XML dokument die Bilder aus einem unterordner schnappt und sie anzeigt..
ich möchte gern die möglichkeit einbauen das angezeigte bild downloaden zu können... d.h. wenn ich ein bild anklicke wird es groß angezeigt..ein kleiner downloadbutton soll unten links zu sehn sein....

ich habe schon tage mit diesem problem verbracht..die datei sogar so
auseinander genommen das ich sie nicht mehr gebrauchen konnte..

ich habe auf eine schon bestehende datei aufgebaut...
die liegt hier:

http://www.echtzeit.de/downloads/thu..._629659178.zip

Bitte bitte das sich hier ein Profi finden lässt der dieses problem lösen kann...

Vielen dank im Voraus

der Jens
ciroco ist offline   Mit Zitat antworten
Alt 26-05-2010, 19:03   #2 (permalink)
.
 
Registriert seit: May 2003
Ort: bayern
Beiträge: 1.117
mit meinem tip vom 17.05.2010 scheintst du nicht wirklich weitzer gekommen zu sein (hier)

mach die mal ne neue ebene direkt unterhalb der as ebene und lege hierhin den button der das download managen soll, ich habe ihn im script "dld_btn" genannt,


die xml.as änderst du dann folgendermaßen
PHP-Code:
/**
    Classe XML per bottegartemetalli.com
    Versione 0.1
    16/10/2006
    Copyright http://tarodesign.t35.com/
*/

import flash.net.FileReference;
dld_btn._visible false;
var 
imgPath:String;
var 
fileRefListener:Object = new Object();
var 
fileRef:FileReference = new FileReference();
fileRefListener.onComplete = function(file:FileReference) {
    
//
};

fileRefListener.onProgress = function(file:FileReferencebytesLoaded:NumberbytesTotal:Number):Void  {
    
//text = "downloading "+bytesLoaded+" of "+bytesTotal;
};
fileRefListener.onIOError = function(file:FileReference):Void {
     
trace("IOError: " file.name);
}
fileRef.addListener(fileRefListener);
function 
downloadImage(){
var 
url:String ="http://www.yourDomain.de/"+imgPath;
var 
pic imgPath.split("/")[1];
if(!
fileRef.download(urlpic)) {
trace("dialog box failed to open.");
}
    }

focuspro._visible false;
colonne 7;
dati = new Array();
filexml = new XML();
filexml.ignoreWhite true;
filexml.onLoad = function(loaded) {
    if (
success) {
        
trace("Error loading XML.");
    } else {
        
trace("Hai caricato il file xml con successo...");
    }
    
// end else if
    
my_mc.cat._visible 0;
    
dati filexml.firstChild.childNodes[categoriasito].childNodes;
    for (
i=0i<dati.lengthi++) {
        
my_mc.cat.duplicateMovieClip("cat"+ii*1+5000);
        
my_mc["cat"+i].loader.loadMovie(dati[i].attributes.urlimage);
        
my_mc["cat"+i].input_txt.text dati[i].attributes.desc;
        if (
i<colonne) {
            
my_mc["cat"+i]._y 0;
            
my_mc["cat"+i]._x 105*i+20;
        } else {
            
my_mc["cat"+i]._y Number(my_mc["cat"+(i-colonne)]._y)+125;
            
my_mc["cat"+i]._x my_mc["cat"+(i-colonne)]._x;
        }
        
// end else if
        
my_mc["cat"+i].ttip dati[i].attributes.desc;
        
my_mc["cat"+i].fade._alpha 100;
        
my_mc["cat"+i].onRollOver = function() {
            
this.fade.alphaTo(01);
            
this.mover.ySlideTo(195.000000E-001);
            
this.input_txt.colorTo(rollcolor2);
            
trace("Sei sopra "+this._name);
        };
        
my_mc["cat"+i].onRollOut = function() {
            
this.fade.alphaTo(1002);
            
this.mover.ySlideTo(05.000000E-001);
            
this.input_txt.colorTo("0xFFFFFF"2);
            
trace("Hai abborrato "+this._name);
        };
        
my_mc["cat"+i].link dati[i].attributes.url;
        
my_mc["cat"+i].pdf dati[i].attributes.pdf;
        
my_mc["cat"+i].urlimagegrande dati[i].attributes.urlimagegrande;
        
my_mc["cat"+i].testo dati[i].attributes.testo;
        
my_mc["cat"+i].ttitlod dati[i].attributes.desc;
        
my_mc["cat"+i].onRelease = function() {
            
trace("clicked: "+this.urlimagegrande);
            
dld_btn._visible true;
            
imgPath this.urlimagegrande;
            
_global.linkPdf=this.pdf;
            
_global.linkPagina=this.link;
            
focuspro._visible true;
            
focuspro.alphaTo(1001"linear");
            
focuspro.tween("_x"321.5);
            
my_mc.alphaTo(01"linear"0, function () {
                
this._visible false;
            });
            
meuScroll.alphaTo(01"linear"0, function () {
                
this._visible false;
            });
            
focuspro.descri.text this.testo;
            
focuspro.titoloe.text this.ttitlod;
            
focuspro.fotogrande.loadMovie(this.urlimagegrande);
        };
        
focuspro.onRelease = function() {
            
my_mc._visible true;
            
my_mc.alphaTo(1001"linear");
            
meuScroll._visible true;
            
meuScroll.alphaTo(1002"linear");
            
focuspro.tween("_x"8221.5);
            
focuspro.alphaTo(01"linear"0, function () {
                
this._visible false;
            });
            
dld_btn._visible false;            
            
trace("Hai cliccato: "+this._name);
        };
        
        
focuspro.link_1.onRelease = function() {
            
//suonoclick.start();
            
getURL(_global.link1"_blank");
            
trace("Hai cliccato: "+this._name);
        };
        
focuspro.link_2.onRelease = function() {
            
suonoclick.start();
            
getURL(_global.link2"_blank");
            
trace("Hai cliccato: "+this._name);
        };
    }
};
filexml.load("xml/foto.xml");


dld_btn.onRelease = function(){
    
downloadImage();

__________________
[mooseMash]
mooseMash ist offline   Mit Zitat antworten
Alt 27-05-2010, 09:34   #3 (permalink)
Neuer User
 
Registriert seit: Sep 2008
Beiträge: 54
:)

Großartig ..habs genau so gemacht wie du gesagt hast..
Alles super... das mit "fileReference" hab ich ja auch gegoogelt aber ich bin halt echt noch Anfänger ...Irgendwann hat man dann auch echt keine Nerven mehr...

ich schaue mir jetzt mal in Ruhe dein Meisterwerk an und bedanke mich nochmal an dieser Stelle )

Gruß

der Jens
ciroco ist offline   Mit Zitat antworten
Antwort

Lesezeichen

Themen-Optionen
Ansicht

Forumregeln
Es ist Ihnen nicht erlaubt, neue Themen zu verfassen.
Es ist Ihnen nicht erlaubt, auf Beiträge zu antworten.
Es ist Ihnen nicht erlaubt, Anhänge hochzuladen.
Es ist Ihnen nicht erlaubt, Ihre Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks sind an
Pingbacks sind an
Refbacks sind an


Ähnliche Themen
Thema Autor Forum Antworten Letzter Beitrag
Bilder Gallery... robert Am Rande 8 30-01-2007 14:05
Bilder Gallery mottel.a Flash MX 2004 7 11-06-2006 13:59
dyn. Bilder gallery Fabian1990 Flash Einsteiger 4 09-04-2006 14:36
bilder gallery? lacosamia Gestaltungstheorien 4 03-03-2006 01:32
XML Bilder Gallery Spiritmonger Flash MX 2004 7 27-01-2006 07:52


Alle Zeitangaben in WEZ +1. Es ist jetzt 15:54 Uhr.

Domains, Webhosting & Vserver von Host Europe
Unterstützt das Flashforum!
Adobe User Group


Copyright ©1999 – 2012 Marc Thiele