Flash CS4 popup not showing when pasting

I have a Flash CS4 movie that uses the standard Flash combobox . This works great if I don't use the resulting SWF embedded in the HTML page. When I embed it, the combobox does not appear, does not send mouse events, it is exactly the same as if it did not exist. However, if I switch to full screen mode, a drop-down box appears and works fine even if I return from full screen mode.

I think this is a mistake in the component, Flash CS4, or the Flash player itself, since this also happens in an empty movie, only with this field. All that I found when I googled, someone with the same problem , but without a solution.

Can anyone suggest a fix or workaround?

+3
source share
1 answer

I found that setting the attribute wmodein the tag <embed>to be equal window( transparentbefore it was set to before) solves the problem. Why this causes problems with combobox (and only with the list, afaict), I have no idea, but I'm glad I solved this problem.

EDIT: I found a workaround in the code, so I can still use transparent wmode. Apparently, the problem is that Flash Player does not dispatch Event.RENDER events when it is transparent in wmode. The trick is sending this event manually at key moments. This is my decision:

private function renderStage(e:Event=null){
 stage.dispatchEvent(new Event(Event.RENDER));
}

myComboBox.addEventListener(ListEvent.ITEM_CLICK, renderStage);
myComboBox.addEventListener(ListEvent.ITEM_DOUBLE_CLICK, renderStage);
myComboBox.addEventListener(ListEvent.ITEM_ROLL_OUT, renderStage);
myComboBox.addEventListener(ListEvent.ITEM_ROLL_OVER, renderStage);
myComboBox.addEventListener(Event.CHANGE, renderStage);

It works.

+4

Source: https://habr.com/ru/post/1727226/


All Articles