ruffle-rs / ruffle

A Flash Player emulator written in Rust
https://ruffle.rs
Other
15.65k stars 811 forks source link

Button component icon disappear on rollout #7221

Open ROBERT-MCDOWELL opened 2 years ago

ROBERT-MCDOWELL commented 2 years ago

Describe the bug

added icon on button component like this: btn.setStyle("falseUpIcon","iconUp"); btn.setStyle("falseDownIcon","iconDown"); btn.setStyle("falseDisabledIcon","iconDisabled"); on load the swf appears ok with icon on buttons, but if I rollover and rollout the icon disappear. if I rollover again the icon appears.

Expected behavior

icon must not disappear on rollout

Affected platform

Self-hosted version

Operating system

ALL

Browser

ALL

Additional information

you can test it at boophone.com

n0samu commented 2 years ago

How did you create this SWF? I tried opening https://secure.boophone.com/fawes/module/BooPhone.swf in Flash Player and my Flash-enabled browser, and it does not work at all. (I see that you serve a different SWF by default for visitors with Flash Player.) BooPhone.swf seems to be a targeting Flash Player 32, but its metadata indicates that it does not use ActionScript 3. The Adobe Flash authoring software has not supported ActionScript 2 for a long time, so I don't understand how you created this SWF.

n0samu commented 2 years ago

The reason I'm asking is that without being able to compare the behavior between Ruffle and Adobe Flash Player, it is difficult to confirm the existence of the bug.

n0samu commented 2 years ago

If this is indeed a bug, it is probably occurring because StyleSheet.setStyle is unimplemented, see #281.

ROBERT-MCDOWELL commented 2 years ago

@n0samu first of all, you should test it within the original web page (https://secure.boophone.com), otherwise it won't run. secondly, the limit of Flash Player version acceptable must be below 32.0.465 as the last version had a time bomb. so when you reach the web page with Flash plugin enabled, the first SWF is AS3, loading an AS2 swf. However, when you load the page with Ruffle, only the AS2 swf is directly loaded.

ROBERT-MCDOWELL commented 2 years ago

@n0samu mmhm how can it be possible that despite of setStyle is not implemented I can see the icons in the buttons?

n0samu commented 2 years ago

Here's a tutorial: https://edutechwiki.unige.ch/en/Flash_button_tutorial_-_AS2 You can define the frames of the button symbol, which will be shown on mousedown, mouseover, etc.

n0samu commented 2 years ago

Oops, it looks like I read your question wrong. But as I stated before, it's impossible to confirm the issue because I cannot open the SWF in Adobe Flash Player, nor can I decompile the scripts with JPEXS. Could you please create a standalone SWF that opens properly in Ruffle and Adobe Flash Player, and demonstrates your issue?

ROBERT-MCDOWELL commented 2 years ago

to be more clear I'm talking about the Button Class component. https://www.scribd.com/document/46509391/Flash-As2-Components-Reference attached the swf you can read out of the web page BooPhone.zip

n0samu commented 2 years ago

Thank you, this SWF opens in Ruffle and Adobe Flash Player, so I am able to confirm that the button's icon disappears on mouse rollout in Ruffle, while it does not in Adobe Flash Player. However, I am still unable to decompile the code - it crashes JPEXS Flash Decompiler. So I can't really begin to figure out why this difference in behavior is occurring.

ROBERT-MCDOWELL commented 2 years ago

would you like the sources?

Aaron1011 commented 2 years ago

@ROBERT-MCDOWELL That would be great, thanks

ROBERT-MCDOWELL commented 2 years ago

it's an FLA CS6 with 3 class files, an PM or email I can send to you directly?

Aaron1011 commented 2 years ago

@ROBERT-MCDOWELL Could you share it on the Ruffle discord?

ROBERT-MCDOWELL commented 2 years ago

yup