Minecraft 皮肤预览问题
根据另一个问题,您可以使用以下代码查看您的皮肤:
<applet code="net.minecraft.skintest.ModelPreviewApplet"
archive="http://www.minecraft.net/skin/skintest.jar" codebase="."
width="320" height="320">
<param name="name" value="535" />
</applet>
Which Works!
但是有谁知道我如何制作一个文本框和一个按钮,将书面文本放入 value="535"
标记中(用文本框输入替换“535”)?
链接到另一个问题:是否有可嵌入网络的皮肤预览应用程序?
According to another question, you can view your skin with this code:
<applet code="net.minecraft.skintest.ModelPreviewApplet"
archive="http://www.minecraft.net/skin/skintest.jar" codebase="."
width="320" height="320">
<param name="name" value="535" />
</applet>
Which works!
But does anyone knows how i can make a textbox and a button which puts the written text in the value="535"
tag (replaces "535" with the text box input)?
Link to the other question: Is there a web-embeddable skin preview application?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以在运行时将小程序写入 DOM,如下所示:
奇怪的是,小程序似乎不喜欢“525”以外的值
You can write your applet into the DOM at run-time like this:
Strangely enough, the applet doen't seem to like values other than "525"
这应该很容易,但我认为它不会做你想做的事。
我假设您想要一个带有纹理预览的预览窗口,并允许用户输入新的纹理 ID,按下按钮,然后立即查看预览。
在页面加载后简单地更改
param
的值并不能实现这一点。当按钮被按下时,您需要删除
小程序
并使用新的参数值重新创建它,以使更改生效。这是您要求的代码:
如果您尝试这样做,但它没有实现您想要的效果,请告诉我,我可以编写可以实现此目的的代码。
That should be easy, but I don't think it will do what you want it to do.
I'm assuming you want to have a preview window with the texture preview, and allow users to type in new texture IDs, push the button, and see the preview right away.
Simply changing the value of the
param
after the page has loaded won't accomplish that.When the button gets pushed, you'll need to remove the
applet
and re-create it, with the new param value in order for the changes to take effect.Here's the code you asked for:
If you try that and it doesn't accomplish what you wanted, let me know and I can write the code that will do it.