javascript - Send decimal number with ExternalInterface between JS and AS3 -


मुझे बाह्य संख्या में दशमलव संख्याओं में समस्या है AS3 कोड:

  var पूर्वावलोकन: बिटमैप (लोडर कंटेंट); var w: संख्या = पूर्वावलोकन.वेदथ; var h: संख्या = पूर्वावलोकन.हाइट; ट्रेस (डब्ल्यू, एच) // इसमें मुझे मूल्य मिलते हैं: 887.9 और 665.95 ExternalInterface.call ('परीक्षण', डब्ल्यू, एच);   

जेएस कोड:

  फ़ंक्शन परीक्षण (w, h) {console.log (w, h); // और मेरे पास मूल्य 0.95 और 0.7}   

क्यों? सभी उत्तरों के लिए धन्यवाद।

मैंने एडोब उदाहरण के साथ परीक्षण किया है ()। मैं एएस में एक आकार (887.9, 665.95) बनाएँ, और एक फ़ंक्शन को अपनी तरह जोड़ता हूं। यह अच्छी तरह से काम करता है।

इसलिए, यह कुछ और से प्रभावित हो सकता है।

उदाहरण के लिए, आप आकार या अन्य DisplayObject बिटमैप को बदलें।

Comments

Popular posts from this blog

asp.net - Procedure or function "Procedure name" expects a parameter "Param name" which was not supplied occurs rarely -

c# - The item with identity 'Id' already exists in the metadata collection. Parameter name: item -

c++ - Redefined variable in the other module -