Copy link to clipboard
Copied
Hi,
I am at really at a loss on this. If I manually place an image component on the stage, I can apply CSS styles to it no problem.
myImage.style.WebkitFilter = "invert(1)";
This works fine!
HOWEVER
if I add the image from the library via script, e.g., stage.addChild(myImage), the style doesn't apply to the same image. Any ideas on how to apply styles to images added to the stage from the library via script? This is driving me absolutely nuts. Thanks in advance.
Components create browser DOM elements floated over the stage. That's why they can take CSS styles. Library items rendered to the the stage canvas element are just pixels on a bitmap. You can't style pixels.
Copy link to clipboard
Copied
In the time that an expert gets to your question, can you have a look at the following articles to see if there is anything here that can help?
Adobe Flash Professional CS5 * Setting styles
Thanks,
Preran
Copy link to clipboard
Copied
Components create browser DOM elements floated over the stage. That's why they can take CSS styles. Library items rendered to the the stage canvas element are just pixels on a bitmap. You can't style pixels.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now