Antworten auf deine Fragen:
Neues Thema erstellen

Antworten zum Thema „Text stat Bilder laden“

G

Garfield_kk

Guest

hi

ich hab mir eine Bildergallery organisiert und möchte die aber gern als normale weiterleitung machen, in der xml datei der Gallery werden die Bilder so verlinkt:
<gallery>
<images>
<title><![CDATA[TEXT 1]]></title>
<description><![CDATA[Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Phasellus id lectus. Duis turpis dui, pellentesque id, rutrum sed.]]></description>
<tmb>photoGallery/tmb1.jpg</tmb>
<img>photoGallery/img1.jpg</img>
</images>
<images>
<title><![CDATA[TEXT 2]]></title>
<description><![CDATA[Sed hendrerit, est sed congue luctus, arcu mauris tincidunt elit, vestibulum accumsan quam risus nec turpis.]]></description>
<tmb>photoGallery/tmb2.jpg</tmb>
<img>photoGallery/img2.jpg</img>
</images>

wie gesagt da sollten jetzt jeweils beim Klick texte geladen werden
 

oxygen

PS Azubine

AW: Text stat Bilder laden

könntest du dein problem genauer erklären ?

.. da ich momentan als antwort "was soll diese sinnfreie aktion" hätte

ergo
kam deine fragestellung nicht bei mir an
 

oxygen

PS Azubine

AW: Text stat Bilder laden

also die einfachste variante

du nimmst deine texte - speicherst sie als bild ab (gleicher name wie das zu überschreibende original)
und packst sie in den galerieordner (quasi überschreibst du die alte bilddatei mit der neuen)

fertig :)



denk dran - text in jpg sieht immer matschig aus - gif und png vertragen das eher ...
... wobei ich den sinn der aktion noch immer nicht sehe
 

sokie

Mod | Web

AW: Text stat Bilder laden

diese Seite ist leider nicht verfügbar...

spielt auch eigentlich keine Rolle, die veränderungen, die nötig wären, sind ja im Actionscript Code vorzunehmen.
Poste doch mal den code.
 
G

Garfield_kk

Guest

AW: Text stat Bilder laden

des muss ja auch noch scroll bar sein

hier die scripts:
comfig:
Stage.scaleMode = "noScale";
Stage.align = "TL";

//import do engine fuse
import com.mosesSupposes.fuse.*;
ZigoEngine.simpleSetup(Shortcuts, ******Easing, Fuse, FuseFMP);

vars:
var upBottombar:Boolean = undefined
var controlFloat:Boolean = false

var imagesArr:Array = new Array();
var cursorArr:Number = 0;

toStage:
mainmenu._x = Math.floor (Stage.width + 425);
mainmenu._y = Math.floor (Stage.height / 2);

mainmenu.menuBars._height = Stage.height;

imageContainer._x = 0;
imageContainer._y = 0;

bgContainer._x = 0
bgContainer._y = 0

onRezise:
var stageListener:Object = new Object ();
stageListener.onResize = function () {

bgContainer._x = 0;
bgContainer._y = 0;

if (mainmenuOpen == false) {
mainmenu._x = Stage.width + 400;
mainmenu._y = Math.floor (Stage.height / 2);
hitUp._x = Stage.width;
hitUp._y = 0;
hitUp._width = 25;
hitUp._height = Stage.height;
}
else if (mainmenuOpen == undefined) {
mainmenu._x = Stage.width + 425;
mainmenu._y = Math.floor (Stage.height / 2);
}
else {
mainmenu._x = Stage.width;
mainmenu._y = Math.floor (Stage.height / 2);
hitDown._x = 0;
hitDown._y = 0;
hitDown._width = Stage.width - 425;
hitDown._height = Stage.height;
}
mainmenu.menuBars._height = Stage.height;

imageContainer._x = 0;
imageContainer._y = 0;

ZigoEngine.doTween (loaderMC,'_x,_y',[Stage.width / 2, Stage.height / 2],1,"easeOutExpo");

setPositions ();
};
Stage.addListener (stageListener);

functions:
import flash.display.*;
//If you are using this photoGallery as a module of
//Full XML Website delete this line of code to disable the background.
// This module will assume the template background.
//loadMovie("backgrounds/background.swf",bgContainer);
//--------------------------------------------------------------------

loadTmbs ();

function setPositions () {
if (imageContainer._height > Stage.height) {
imageContainer._width = Stage.width;
imageContainer._yscale = imageContainer._xscale;
}
if (imageContainer._height <= Stage.height) {
imageContainer._height = Stage.height;
imageContainer._xscale = imageContainer._yscale;
}
if (imageContainer._width < Stage.width) {
imageContainer._width = Stage.width;
imageContainer._yscale = imageContainer._xscale;
}
imageContainer._x = (-(imageContainer._width - Stage.width) / 2);
imageContainer._y = Stage.height - imageContainer._height;
}


function intro () {
ZigoEngine.doTween (mainmenu,'_x',Stage.width,1,"easeInOutExpo",0,function () {
mainmenuOpen = true;
controlMainmenu ();
});
}

function controlMainmenu () {
if (mainmenuOpen == false) {
attachMovie ("hitUp","hitUp",0);
hitUp._x = Stage.width;
hitUp._y = 0;
hitUp._width = 25;
hitUp._height = Stage.height;
hitUp.useHandCursor = false;
hitUp.onRollOver = function () {
mainmenuOpen = true;
ZigoEngine.doTween (mainmenu,'_x',Stage.width,1,"easeOutExpo");
controlMainmenu ();
};
}
else if (mainmenuOpen == true) {
attachMovie ("hitDown","hitDown",0);
hitDown._x = 0;
hitDown._y = 0;
hitDown._width = Stage.width - 425;
hitDown._height = Stage.height;
hitDown.useHandCursor = false;
initFloat (mainmenu.containerTmbs);
hitDown.onRollOver = function () {
mainmenuOpen = false;
ZigoEngine.doTween (mainmenu,'_x',Stage.width + 400,0.5,"easeOutExpo");
controlMainmenu ();
};
}
}

function loadTmbs () {
var tmbs:XML = new XML ();
tmbs.ignoreWhite = true;
tmbs.onLoad = function (success) {
if (success) {
var root:XMLNode = this.firstChild;
for (i = 0; i < root.childNodes.length; i++) {
var titleTxt:String = root.childNodes.childNodes[0].childNodes[0].nodeValue;
var descTxt:String = root.childNodes.childNodes[1].childNodes[0].nodeValue;
var thumbs:String = root.childNodes.childNodes[2].childNodes[0].nodeValue;
var images:String = root.childNodes.childNodes[3].childNodes[0].nodeValue;
imagesArr.push (images);
mainmenu.containerTmbs.attachMovie ("tmb","tmb" + i,i);
mainmenu.containerTmbs["tmb" + i]._y = i * 80;
loadMovieClip (thumbs,mainmenu.containerTmbs["tmb" + i].containerTmb);
mainmenu.containerTmbs["tmb" + i].titleLabel.titleText.htmlText = titleTxt
mainmenu.containerTmbs["tmb" + i].descLabel.descText.htmlText = descTxt
mainmenu.containerTmbs["tmb" + i].bt.idInstance = i;
mainmenu.containerTmbs["tmb" + i].bt.onRelease = function () {
cursorArr = this.idInstance;
ZigoEngine.doTween (imageContainer,'_alpha',0,1,"easeOutExpo",0,function () {
loadBitmapSmoothed (imagesArr[cursorArr],imageContainer);
});
};
}
}
loadBitmapSmoothed (imagesArr[cursorArr],imageContainer);
intro ();
mainmenu.containerTmbs._y = 0 - mainmenu.containerTmbs.height / 2;
};
tmbs.load ("photoGallery.xml");
}

function updateMovies () {
d = 10;
mov = _root._ymouse;
coef = (Stage.height - (mainmenu.containerTmbs._height + 180)) / Stage.height;
mainmenu.containerTmbs._y -= (((mainmenu.containerTmbs._y-35) + Stage.height/2) - coef * mov) / d;
}

function initFloat (mc:MovieClip) {
temp = mc;
temp.onEnterFrame = this.updateMovies;
}

function loadBitmapSmoothed (url:String, target:MovieClip) {

var bmc:MovieClip = target.createEmptyMovieClip ("bmc", target.getNextHighestDepth ());
var listener:Object = new Object ();
listener.tmc = target;

listener.onLoadStart = function () {
attachMovie ("loaderMC","loaderMC",1);
loaderMC._x = Stage.width / 2;
loaderMC._y = Stage.height / 2;
};
listener.onLoadProgress = function (mc:MovieClip, bytesLoaded:Number, bytesTotal:Number) {
//percent = Math.round (bytesLoaded / bytesTotal * 100);
//trace (percent);
};

listener.onLoadInit = function (mc:MovieClip) {
imageContainer._alpha = 0;

var bitmap:BitmapData = new BitmapData(mc._width, mc._height, true, 0);
this.tmc.attachBitmap(bitmap,1,"auto",true);
bitmap.draw(mc);

attachMovie ("clock","clock",1);
setPositions ();
};

var loader:MovieClipLoader = new MovieClipLoader ();
loader.addListener (listener);
loader.loadClip (url,bmc);
}

function loadMovieClip (externalTarget:String, targetRoot:MovieClip, action:String) {
var mcLoader:MovieClipLoader = new MovieClipLoader ();
var listenerLoad:Object = new Object ();
listenerLoad.onLoadStart = function (target:MovieClip) {
//trace("Thumbnails Load Start")
};
listenerLoad.onLoadProgress = function (target:MovieClip, bytesLoaded:Number, bytesTotal:Number):Void {
//*percent = Math.round(bytesLoaded/bytesTotal*100);
//trace("Thumbnails Load Progress")
};
listenerLoad.onLoadComplete = function (target:MovieClip):Void {
//trace("Thumbnails Load Complete")
};
mcLoader.addListener (listenerLoad);
mcLoader.loadClip (externalTarget,targetRoot);
}
 

sokie

Mod | Web

AW: Text stat Bilder laden

Code:
var root:XMLNode = this.firstChild;
            for (i = 0; i < root.childNodes.length; i++) {
                   var titleTxt:String = root.childNodes[i].childNodes[0].childNodes[0].nodeValue;
                   var descTxt:String = root.childNodes[i].childNodes[1].childNodes[0].nodeValue;
                   var thumbs:String = root.childNodes[i].childNodes[2].childNodes[0].nodeValue;
                   var images:String = root.childNodes[i].childNodes[3].childNodes[0].nodeValue;
                imagesArr.push (images);
                [B]descTxtArr.push(descTxt);[/B]
genauso wie du die images in ein Array push()st, kannst du auch die descTxt in ein Array legen und dann jeweils per textfeld_txt.text in ein Textfield schreiben.

(bitte für den Code die Codebereiche benutzen - sonst ist das schwer zu lesen.)
 
G

Garfield_kk

Guest

AW: Text stat Bilder laden

k hab ich drin, wie verbind ich des jetzt noch mit der xml datei:



Code:
<gallery>
    <images>
        <title><![CDATA[TEXT 1]]></title>
<description><![CDATA[Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Phasellus id lectus. Duis turpis dui, pellentesque id, rutrum sed.]]></description>
        <tmb>photoGallery/tmb1.jpg</tmb>
        <img>photoGallery/img1.jpg</img>
    </images>
    <images>
        <title><![CDATA[TEXT 2]]></title>
<description><![CDATA[Sed hendrerit, est sed congue luctus, arcu mauris tincidunt elit, vestibulum accumsan quam risus nec turpis.]]></description>
        <tmb>photoGallery/tmb2.jpg</tmb>
        <img>photoGallery/img2.jpg</img>
    </images>
 
Bilder bitte hier hochladen und danach über das Bild-Icon (Direktlink vorher kopieren) platzieren.
Antworten auf deine Fragen:
Neues Thema erstellen

Willkommen auf PSD-Tutorials.de

In unseren Foren vernetzt du dich mit anderen Personen, um dich rund um die Themen Fotografie, Grafik, Gestaltung, Bildbearbeitung und 3D auszutauschen. Außerdem schalten wir für dich regelmäßig kostenlose Inhalte frei. Liebe Grüße senden dir die PSD-Gründer Stefan und Matthias Petri aus Waren an der Müritz. Hier erfährst du mehr über uns.

Stefan und Matthias Petri von PSD-Tutorials.de

Nächster neuer Gratisinhalt

03
Stunden
:
:
25
Minuten
:
:
19
Sekunden

Neueste Themen & Antworten

Flatrate für Tutorials, Assets, Vorlagen

Zurzeit aktive Besucher

Statistik des Forums

Themen
175.182
Beiträge
2.582.054
Mitglieder
67.254
Neuestes Mitglied
MKP
Oben