开发者

Running Flex 4.5.1 mobile application in Internet browser?

开发者 https://www.devze.com 2023-03-22 06:09 出处:网络
I read that using Flash Builder 4.5.1 you can create one application and run it on a mobile device, in Internet browser and in Desktop AIR. However, I created a mobile application and the only option

I read that using Flash Builder 4.5.1 you can create one application and run it on a mobile device, in Internet browser and in Desktop AIR. However, I created a mobile application and the only option to开发者_运维问答 run it is 'Run as mobile application'. Is it really possible to run the same Flex application in browser and on mobile?

Thanks, Michal


Is it really possible to run the same Flex application in browser and on mobile?

You probably misunderstood what you read. I think the Adobe marketing is purposely ambiguous on this point.

What people would normally do is encapsulate the shared functionality into a library project and share it between multiple different projects, each with a different publishing target. It is unlikely you'll want the applications to be the same.

Your layout on a phone will most likely need to be different than a layout on a tablet, which will most likely be different than the layout on the larger screen of a desktop / laptop.

That said, I do believe what you want is possible, but not a workflow supported via Flash Builder. You can easily use the command line compiler to compile the same code for different purposes. There are some classes available in Mobile projects which are not available in web based applications; so you have to add those SWCs back into the classpath; most likely the mobile theme and the mobile component set. These files should both be SWCS in your SDK directory somewhere.

You could also create different ANT scripts or something to do the different builds for you.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号