Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/powershell/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Actionscript 3 变量中的标点符号都到哪里去了?_Actionscript 3 - Fatal编程技术网

Actionscript 3 变量中的标点符号都到哪里去了?

Actionscript 3 变量中的标点符号都到哪里去了?,actionscript-3,Actionscript 3,作为Flash/AS3的新手,我很困惑。 我的困境是:我有一个变量,它包含一个填充文本字段的字符串。文本包括逗号、句号、问号等。当我运行我的电影时,一切都很好,一切都显示得恰到好处。酷! 我创建了一个包含多个提示的工具提示,这些提示保存在一个数组中。我在事件处理程序中传递一个变量param,让它知道要显示哪个工具提示文本。但是,当我运行电影并将鼠标悬停在图标上以显示工具提示时,除了标点符号之外,所有内容都在那里。糊涂了 var somevar = " Here's my text, just a

作为Flash/AS3的新手,我很困惑。 我的困境是:我有一个变量,它包含一个填充文本字段的字符串。文本包括逗号、句号、问号等。当我运行我的电影时,一切都很好,一切都显示得恰到好处。酷! 我创建了一个包含多个提示的工具提示,这些提示保存在一个数组中。我在事件处理程序中传递一个变量param,让它知道要显示哪个工具提示文本。但是,当我运行电影并将鼠标悬停在图标上以显示工具提示时,除了标点符号之外,所有内容都在那里。糊涂了

var somevar = " Here's my text, just as I want it to display. Cool!" works like a charm.

var tipArray:Array = new Array();
    tipArray[0] = "By providing some text, especially here, there is no chance the punction displays! what's happening?"


function getToolTip(i:int):Function {
        return function(e:MouseEvent):void {
                //creating a new tooltip instance
                var tooltip:Tooltip = new Tooltip();
                //we tell the holder to hold our tooltip
                holder = tooltip;
                holder.tip.background = true;
                holder.tip.backgroundColor = 0xFFFFCD;
                holder.tip.border = true;
                holder.tip.borderColor = 0x000000;
                holder.tip.textColor = 0x333333;

                holder.tipHeading.background = true;
                holder.tipHeading.backgroundColor = 0x999999;
                holder.tipHeading.border = true;
                holder.tipHeading.borderColor = 0x000000;
                holder.tipHeading.textColor = 0x333333;
                holder.tipHeading.text = tipTitleArray[i];
                holder.tipHeading.setTextFormat(headingOne);

                holder.tip.autoSize = "right";
                holder.tip.width = 180;
                holder.tipHeading.width = 180;
                holder.tip.multiline = true;
                holder.tip.wordWrap = true;
                holder.tip.text = tipArray[i];
                trace(holder.tip.text);
                Vpadding = holder.height;
                holder.tipHeading.y = holder.tip.y-holder.tipHeading.height;

                //positioning the tooltip on the stage
                holder.x = stage.mouseX- Hpadding;
                holder.y = stage.mouseY - Vpadding;
                trace ("holder Y after setting: " + holder.y);

                //adding the tooltip to the stage 
                addChild(tooltip);
                };
        }
我在工具提示中得到的输出是 通过提供一些文本,特别是在这里,穿刺不可能显示发生了什么


有人能解释一下为什么一个有效,而另一个无效吗?

可能是字体问题。你用的是什么字体?如果不是_sans,则应嵌入。谢谢您的建议。我检查过了,字体在两个方面都是一样的,它的Calibri是一个非常标准的字体。嵌入它。Add.embeddeFonts=true;在textfield实例和textformat中,指定textformat.font时传递新的Calibri.fontName。//->Calibri将是链接名疯狂的是,当我追踪文本框中的内容时,它会给我所有的标点符号。又一次太奇怪了-你嵌入字体了吗?您需要嵌入除SAN以外的所有字体。