Ich versuche, eine Client-Site zu aktualisieren, und der ursprüngliche Entwickler hat fast keine Anweisungen hinterlassen. Der Code wird durch XML aktualisiert.Wie werden DX- und DY-Koordinaten im Flash berechnet?
Hier ist ein Beispiel des Codes
enter code here<FOLDER NAME="COMMERCIAL">
<GALLERY NAME="LOCANDA VERDE: New York">
<IMG HEIGHT="500" CAPTION="Some photo" WIDTH="393" SRC="locanda1.jpg" DX="60" DY="40" LINKTEXT="" LINKURL="" INFOTEXT="SOHO, NEW YORK"/>
<IMG HEIGHT="300" CAPTION="Some photo" WIDTH="450" SRC="locanda2.jpg" DX="160" DY="80" LINKTEXT="" LINKURL="" INFOTEXT="SOHO, NEW YORK"/>
<IMG HEIGHT="500" CAPTION="Some photo" WIDTH="393" SRC="locanda3.jpg" DX="80" DY="260" LINKTEXT="" LINKURL="" INFOTEXT="SOHO, NEW YORK"/>
<IMG HEIGHT="500" CAPTION="Some photo" WIDTH="393" SRC="locanda4.jpg" DX="120" DY="60" LINKTEXT="" LINKURL="" INFOTEXT="SOHO, NEW YORK"/>
<IMG HEIGHT="393" CAPTION="Some photo" WIDTH="500" SRC="locanda5.jpg" DX="180" DY="100" LINKTEXT="" LINKURL="" INFOTEXT="SOHO, NEW YORK"/>
<IMG HEIGHT="500" CAPTION="Some photo" WIDTH="433" SRC="locanda6.jpg" DX="60" DY="140" LINKTEXT="" LINKURL="" INFOTEXT="SOHO, NEW YORK"/>
<IMG HEIGHT="500" CAPTION="Some photo" WIDTH="393" SRC="locanda7.jpg" DX="100" DY="200" LINKTEXT="" LINKURL="" INFOTEXT="SOHO, NEW YORK"/>
</GALLERY>`enter code here
Es auf diese Seite bezieht: http://meyerdavis.com/ Handels Klicken> Klicken Sie Laconda Verde New York. Die XML-Datei zieht ein JPG von 2 Stellen, eines ist ein Daumennagel, die alle 60 x 60 sind, und dann ist eins das größere Bild. Das Problem, das ich habe, ist, dass ich nicht herausfinden kann, wie die DX- und DY-Koordinaten für jeden Gegenstand erzeugt werden. Jede Hilfe würde sehr geschätzt werden.
`
bearbeiten: Hier ist der Code aus dem unten Kommentar.
platformblock.expandspeed = 0.02;
platformblock.h = 450 - platformblock.dy1;
//platformblock.h = 402;
platformblock.dy2 = 0;
platformblock.onResize();
/**/
platformblock.onEnterFrame = function() {
this.dy1 += (48 - this.dy1)*this.expandspeed;
this.h = 450 - this.dy1;
if(this.expandspeed<0.3) {
this.expandspeed += 0.02;
}
if(Math.abs(this.dy1-48)<0.2) {
this.dy1 = 48;
}
if(this.platform._height==402 && this.dy1==48){
this.h = null;
this.onResize();
this.onEnterFrame = null;
}
}
platformblock._resizeto(800, 402, _root.play, _root, 0.08);
titleblockcontainer.play();
/**/
stop();
Es wird in Ihrem Code-Mate sein, aber ohne den Code zu sehen, können wir Ihnen nicht helfen: D – robertp
Hallo Herzcode, tut mir leid, bedeutet das, dass es in der Flash-Datei wäre? Die XML-Datei enthält nur das, was ich oben gepostet habe. – MLS1984
platformblock.expandespeed = 0,02; platformblock.h = 450 - platformblock.dy1; //platformblock.h = 402; platformblock.dy2 = 0; platformblock.onResize(); /**/ platformblock.onEnterFrame = Funktion() { \t this.dy1 + = (48 - this.dy1) * this.expandspeed; \t this.h = 450 - this.dy1; \t wenn (this.expandespeed <0.3) { \t \t this.expandspeed + = 0.02; } \t \t if (Math.abs (this.dy1-48) <0,2) { \t \t this.dy1 = 48; \t } \t if (this.platform._height == 402 && this.dy1 == 48) { \t \t this.h = null; \t \t this.onResize(); \t \t this.onEnterFrame = null; \t} } platformblock._resizeto (800, 402, _root.play, _root, 0.08); Titleblockcontainer.play(); /**/ stop(); – MLS1984