AIR supports filters and Adobe Animate SWFs, and actual Rust doesn't

AIR supports filters:

AIR supports SWFs created from Adobe Animate, which you can embed in ActionScript via:

import flash.display.MovieClip;

[Embed(source = "./some.swf")]
public class SomeSWF extends MovieClip {}

const movieClip: MovieClip = new SomeSWF;

And actual Rust frameworks don't support these things properly yet?

Are all your posts going to be about AIR?

I'm sure if there was an AIR clone in Rust somebody would have mentioned it by now.

I thought the world had moved on from all that FLASH stuff?

8 Likes

Yeah, there is no solution. Pixi.js is buggy and they don't care about the bug's issue, ... the web build tools are buggy and there's nothing that can be done either when you build your own solution using other dependencies and combine local file: dependencies in NPM. Crazy.

If AIR existed for Rust:

How to create an application

Cargo.toml

[air]
application-descriptor = "app.xml"

[dependencies]
air = "1.0.0"

app.xml

<?xml version="1.0" encoding="UTF-8"?> 
<application xmlns="http://ns.adobe.com/air/application/50.0"> 
    <id>org.fu</id> 
    <versionNumber>1.0.0</versionNumber> 
    <filename>Fu</filename> 
    <initialWindow>
        <title>Fu</title>
        <content>target/debug/app.swf</content> 
        <visible>true</visible> 
        <width>750</width> 
        <height>750</height> 
    </initialWindow> 
</application>

src/main.rs

use air::display::*;

fn main() {
    let text_field = TextField::new();
    text_field.set_text("Hello, world!");
    stage().root().add_child(&text_field);
}

How to luanch:

  • Run:
cargo run

For more information on how to build, launch and package applications, refer to https://airsdk.dev/docs.

Forgot to say AIR also supports:

  • displayObject.width, displayObject.height — Measure the display object's bounds (not necessarily the user set width or height), which is important for rotations and positions around a registration point

AIR doesn't natively support:

  • Tweens
  • User interface controls (or component sets)
  • WebSocket (but does support TCP and UDP sockets)
  • Physics engine

AIR may have fixed anything you've said, duh?

And more, fu' it! I need AIR support now to develop my game. I'm waiting since 2018 for Rust to have this framework...

If anyone promised to develop it back then, it's probably time to realize they stopped. If no one promised, then waiting and complaining won't change that.

8 Likes

I was incentivating

I guess it's a problem that nobody with the skills and time to solve wants to solve.

Even that nobody wants Flash anymore is there nothing else you can use?

I have done 3d animations using Three.js. In Rust there is https://crates.io/crates/three-d which looks like it does something similar.

4 Likes

I was aiming for a 2D game though... It'd benefit from using in-depth settings of display objects...

I see no reason three-d could not be used for 2D things. As the examples show: https://github.com/asny/three-d/tree/master/examples

1 Like

The problem is that it still does not include color transform, bitmap filters and hierarchy in the display model.

This is an internet forum, not a chat platform. When writing answers that are supposed to result in a productive discussion, and a discussion that can be useful for others to read, too, avoid overly quick responses and one-liners.

Take some time for a response; when responding to multiple sentences, or even multiple people, feel free to combine multiple statements in a single response. You can always address different things by inserting quotations.

11 Likes

I've never experienced Flash from the developer side, and I suspect most others here haven't. Maybe you could describe it? Maybe starting with this?

This sounds similar to the SVG model, but I suspect there's more to it.

1 Like

Indeed, SVG can actually work as an rendering format for 2D games. I used that for GitHub - mattfbacon/elm-tetris: Tetris in Elm

2 Likes

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.