Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy does Flex Viewstack "blink" when switching between views?
    primarykey
    data
    text
    <p>I'm working on an app in which I want the viewstack to switch views on certain events. I have them switching correctly but there appears to be a slight "blink" when the change between views occurs. I've tried <strong>creationPolicy="all"</strong> but that doesn't fix the problem. The reason the "blink" is so noticeable is the fact that the views in the viewstack are different width/heights. Is there a way to stop this "blinking" effect on viewstack view switch?</p> <p>Here is the code in which the view switch happens:</p> <pre><code> function show(value:String):void { switch(value) { case "ShapeObject": viewstack.selectedIndex = 2; break; case "AssetObject": viewstack.selectedIndex = 0; break; } } </code></pre> <p>Here is the mxml for the viewstack:</p> <pre><code> &lt;mx:ViewStack id="viewstack" resizeToContent="true" clipContent="false" creationPolicy="all" mouseDown="stopPropagationClick(event)" click="stopPropagationClick(event)"&gt; &lt;mx:HBox id="shapeMenu" width="250" height="44" verticalAlign="middle" horizontalAlign="center" horizontalGap="0"&gt; &lt;mx:Image source="@Embed(source='assets/objectTools_greyBack_left.png')" height="100%" width="10"/&gt; &lt;mx:HBox verticalAlign="middle" horizontalAlign="center" backgroundSize="100%" height="100%" width="100%" styleName="contextualCenterBkg"&gt; &lt;ui:HTMLLabelButton id="ConstrainShape" name="{_appData.textXML.designer.toolbars.shapeControlEditor.proportionalResize.@tooltip}" styleName="btnContextualConstrain" click="{btnClick(event)}" mouseOver="_tips.tip(event);" mouseOut="_tips.tip(event);"/&gt; &lt;mx:ColorPicker name="{_appData.textXML.designer.toolbars.shapeControlEditor.shapeColorPicker.@tooltip}" close="onColorPickerClose(event)" change="{onShapeColorPickerChange(event)}" open="onColorPickerOpen(event)" click="stopPropagationClick(event)" mouseDown="stopPropagationClick(event)" focusEnabled="false" mouseOver="_tips.tip(event);" mouseOut="_tips.tip(event);"/&gt; &lt;ui:HTMLLabelButton name="{_appData.textXML.designer.toolbars.shapeControlEditor.bringForward.@tooltip}" styleName="btnContextualSendForward" click="{onSendToFrontClick(event)}" mouseOver="_tips.tip(event);" mouseOut="_tips.tip(event);"/&gt; &lt;ui:HTMLLabelButton name="{_appData.textXML.designer.toolbars.shapeControlEditor.sendBackward.@tooltip}" styleName="btnContextualSendBack" click="{onSendToBackClick(event)}" mouseOver="_tips.tip(event);" mouseOut="_tips.tip(event);"/&gt; &lt;ui:HTMLLabelButton name="{_appData.textXML.designer.toolbars.shapeControlEditor.deleteControl.@tooltip}" id="DeleteShape" styleName="btnContextualDelete" click="{btnClick(event)}" mouseOver="_tips.tip(event);" mouseOut="_tips.tip(event);"/&gt; &lt;/mx:HBox&gt; &lt;mx:Image source="@Embed(source='assets/objectTools_greyBack_right.png')" height="100%" width="10"/&gt; &lt;/mx:HBox&gt; &lt;mx:HBox id="multiMenu" width="250" height="44" verticalAlign="middle" horizontalAlign="center" horizontalGap="0"&gt; &lt;mx:Image source="@Embed(source='assets/objectTools_greyBack_left.png')" height="100%" width="10"/&gt; &lt;mx:HBox verticalAlign="middle" horizontalAlign="center" backgroundSize="100%" height="100%" width="100%" styleName="contextualCenterBkg"&gt; &lt;ui:HTMLLabelButton id="ConstrainShapeMulti" name="{_appData.textXML.designer.toolbars.shapeControlEditor.proportionalResize.@tooltip}" styleName="btnContextualConstrain" click="{btnClick(event)}" mouseOver="_tips.tip(event);" mouseOut="_tips.tip(event);"/&gt; &lt;ui:HTMLLabelButton name="{_appData.textXML.designer.toolbars.shapeControlEditor.bringForward.@tooltip}" styleName="btnContextualSendForward" click="{onSendToFrontClick(event)}" mouseOver="_tips.tip(event);" mouseOut="_tips.tip(event);"/&gt; &lt;ui:HTMLLabelButton name="{_appData.textXML.designer.toolbars.shapeControlEditor.sendBackward.@tooltip}" styleName="btnContextualSendBack" click="{onSendToBackClick(event)}" mouseOver="_tips.tip(event);" mouseOut="_tips.tip(event);"/&gt; &lt;ui:HTMLLabelButton name="{_appData.textXML.designer.toolbars.shapeControlEditor.deleteControl.@tooltip}" id="DeleteShapeMulti" styleName="btnContextualDelete" click="{btnClick(event)}" mouseOver="_tips.tip(event);" mouseOut="_tips.tip(event);"/&gt; &lt;/mx:HBox&gt; &lt;mx:Image source="@Embed(source='assets/objectTools_greyBack_right.png')" height="100%" width="10"/&gt; &lt;/mx:HBox&gt; &lt;/mx:ViewStack&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload