ActionScript 2.0 - 通过 Flashvars 传递数字数据会导致丢失零
我正在修改某人的旧 AS 2 Flash 应用程序,我需要将数字数据作为字符串传递,或者最后有一个格式正确的美元货币字符串。
目前,我可能会
Data1=$34,000.00&Data2=$12,344.18&etc...
通过 FlashVars 传递类似的内容。假设我在动态输入字段中显示 Data1,我会得到类似“$34,0”的内容
关于如何处理这个问题有什么想法吗?老实说,我不太关心这是否是一个超级干净、正确的解决方案,还是这个应用程序的功能性黑客解决方案。这是需要的,但只是很短的时间。
I'm modifying someone's old AS 2 Flash application and I need to pass numeric data in as a string OR have a properly formatted USD currency string in the end.
Currently, I might pass something like
Data1=$34,000.00&Data2=$12,344.18&etc...
in via FlashVars. Assuming I show Data1 in a dynamic input field, I'd get something like "$34,0"
Any ideas about how to handle this? Honestly, I'm not too concerned whether this is a super clean, proper solution or a functional hack-like solution with this application. It's needed, but only for a short time.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
也许您可以尝试对值进行编码,因此
您可以将 FlashVars 设置为:
Maybe you could try encoding the values, so instead of:
... you would set the FlashVars to: