Flash中DX和DY坐标是如何计算的?

发布于 2024-10-12 01:20:44 字数 2314 浏览 5 评论 0原文

我正在尝试更新客户网站,而原始开发人员几乎没有留下任何说明。代码全部通过XML更新。

以下是与此页面相关的代码示例

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

http://meyerdavis.com/ 点击 Commercial >单击纽约拉康达维德。 xml 文件从 2 个位置提取 jpg,一个是全部 60 x 60 的缩略图,然后一个是更大尺寸的图像。我遇到的问题是我无法弄清楚如何为每个项目生成 DX 和 DY 坐标。任何帮助将不胜感激。

`

编辑:这是下面评论中的代码。

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();

I'm trying to update a clients site and the original developer left almost no instructions. The code is all updated through XML.

Here is a sample of the code

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

It relates to this page: http://meyerdavis.com/ Click Commercial > Click Laconda Verde New York.
The xml file pulls a jpg from 2 places, one is a thumb nail that are all 60 x 60 and then one is the bigger sized image. The issue that I'm having is that I can't figure out how the DX and DY coordinates are generated for each item. Any help would be much appreciated.

`

Edit: Here's the code from the comment below.

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();

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

转瞬即逝 2024-10-19 01:20:44

只要看一下页面,我猜 DX 和 DY 指的是当您单击缩略图时缩略图移动到的位置(从左上角开始),就在大图像显示之前。尝试更改一些值 - 您能看到任何东西移动或显示不同吗?

Just looking at the page, I would guess DX and DY refer to the position (from the top left) the thumbnail moves to when you click it, just before the large image is shown. Try changing some of the values - can you see anything move or appear differently?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文