ruffle-rs / ruffle

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

Ruffle does not support htmlText with <img> tags (including with an SWF src) #16618

Open danielhjacobs opened 5 months ago

danielhjacobs commented 5 months ago

Describe the bug

According to Dinnerbone on Discord, Ruffle does not support this. He suggested "I guess we internally just make a display object of whatever it is and magically align it to wherever the element in the html is"

You can find an example at the below content location. When you skip the video by clicking the x or let it play through to the end, and then click the first object on the right desk that says "Lab Results" on hover, it loads into a TextField the content of https://labcenter.dnalc.org/labs/transformation/text%20files/results.txt as htmlText, and that file has two img tags with an SWF src and one with a JPG src.

Expected behavior

The \ tag lets you embed external image files (JPEG, GIF, PNG), SWF files, and movie clips inside text fields. Text automatically flows around images you embed in text fields. You must set the text field to be multiline to wrap text around an image.

This seems to work in AS2 and according to the docs works in AS3 as well.

Content Location

https://labcenter.dnalc.org/labs/transformation/transformation_d.html

Affected platform

Browser's extension

Operating system

Fedora Linux 39

Browser

Mozilla Firefox 126

Additional information

https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/text/TextField.html#htmlText

Molisson commented 5 months ago

textfield movieclips.zip I made a test for movie clips inside text fields just in case for AS3.0, it seems to work in flash but not in ruffle