Xanders opened a new issue, #1261:
URL: https://github.com/apache/royale-asjs/issues/1261

   Hello! Sorry if it was discussed already, I did my best to find something 
with a search, with no luck. Also, I saw recommendations to use mailinglists 
for questions, but I have no idea what mailinglist is and how to use it. I hope 
the GitHub issue is okay for my question.
   
   I just came to Apache Royale, because I have a HUGE game written with Adobe 
Flex about 15 years ago, with MX components. We had a lot of fans of this game 
who are still using old Firefox with Flash to run it. I wonder, is it possible 
to compile the game into html/css/js with Apache Royale?
   
   I just followed the VSCode tutorial as well as installed the NPM package and 
Java JDK. I have no idea what Ant or Maven are, do I need them or not, so I 
didn't install them. My Hello World was up and running.
   
   My next step was to add some MX component, so I added `<mx:Label text="Hello 
World" x="20" y="20" />` into the main component body, and 
`xmlns:mx="library://ns.apache.org/royale/mx"` attribute to the root. However, 
I was stuck because I could not compile it with `This tag is unexpected. It 
will be ignored.` message. I also tried to change `js:Application` to 
`mx:Application`, or even copy and paste this MXRoyale hello world file:
   
https://github.com/apache/royale-asjs/blob/develop/examples/mxroyale/HelloWorld/src/main/royale/HelloWorld.mxml
   
   But this hello world does not work with same error, and I am totally 
confused with 
[HelloWorld.as3proj](https://github.com/apache/royale-asjs/blob/develop/examples/mxroyale/HelloWorld/HelloWorld.as3proj),
 
[build.xml](https://github.com/apache/royale-asjs/blob/develop/examples/mxroyale/HelloWorld/build.xml)
 and 
[pom.xml](https://github.com/apache/royale-asjs/blob/develop/examples/mxroyale/HelloWorld/pom.xml)
 files, because what I have is `asconfig.json` from tutorial, and I cannot find 
any docs about this config file.
   
   Later, I read third time the migration docs here:
   
https://apache.github.io/royale-docs/migrate-an-existing-app/migrate-from-flex
   BTW, there is a broken 
"[emulation](https://apache.github.io/migrate-an-existing-app/emulation)" link 
in the text (`royale-docs` part is missed).
   I noticed it asks me to add some `+configname=flex` option, however, it does 
not mention where to add it since I'm not running the compiler myself, VSCode 
does. I guessed I should add it to `asconfig.json`, just randomly put this 
everywhere in the file, and bingo, it is `config` property, not 
`compilerOptions` map! Wow, and my Label was compiled!
   
   But trying to put my old project in the folder causes thousands of errors. 
For example, there are no variable components (mx:String, mx:Object, etc.), 
there are mx:State, but no mx:SetProperty, no mx:Style, no mx:Script, and lot 
of properties are missing like relativeTo/creationPolicy for mx:AddChild or 
backgroundImage for mx:HBox (which my UI relies heavily on).
   
   I also have tons of warnings like `Data binding will not be able to detect 
assignments to '...'.` which looks like a serious error since I really need the 
data binding. And I have tons of "no type declarations" warnings, which I want 
to disable but do not know how to.
   
   Docs also states `Some popular Flash APIs have been added to the Royale 
emulation of UIComponent`, but I do not understand how to use it. For example, 
I have `import flash.utils.ByteArray;` - how should I change it?
   
   I'm trying to figure out replacements with myself (even Cursor's AI cannot 
help 😅), but maybe there is some step-by-step tutorial for converting old Flex 
projects into Royale? Or any documentation to figure it out? I guess my case is 
not the first one, maybe someone who did something like this already can point 
to some articles or anything, or maybe can share a timespan estimation for 
converting a 90+ components project? If it will take months, maybe it's not a 
good idea to start, it might be easier to start from scratch with Unity or 
something like this... For example, if mx:Style is not supported at all, and I 
have a lot of Flex-CSS rules, it might be heavy work to rewrite them.
   
   Sorry if my issue is not structured enough, I still hope it might be a 
useful use case for your project. Thank you!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to