I don't have a concrete answer for you off the top of my head, however, I
can give you some pointers.

flash.system.Capabilities should be enclosed within a COMPILE::AS3 { Š }
block since it should only appear in SWF output. That can either be an
entire class, function, or just a bunch of statements, however it suits
your needs.

For the JS side, there's probably a way via the browser or document or
something to determine device. You may have to go so far as using Cordova,
but as I said, I'm not 100% sure of the JS solution. However, when you do
find that solution you'll need to contain within a COMPILE::JS block so
that code only winds up in the translated JS output files.

Regards,
Peter Ent
Adobe Systems/Apache Flex Project

On 3/8/16, 6:37 AM, "kinjal patel" <[email protected]> wrote:

>Hello,
>
>  How to detect device using FlexJS.This works fine in swf ouput but throw
>error when i convert as/mxml to js/html using asjsc command.
>
>Could not find file for class: flash.system.Capabilities
>File not found: flash.system.Capabilities
>
>java.lang.RuntimeException: Unable to find JavaScript filePath for class:
>flash.
>system.Capabilities
>        at
>org.apache.flex.compiler.internal.graph.GoogDepsWriter.addDeps(GoogDe
>psWriter.java:176)
>        at
>org.apache.flex.compiler.internal.graph.GoogDepsWriter.addDeps(GoogDe
>psWriter.java:210)
>        at
>org.apache.flex.compiler.internal.graph.GoogDepsWriter.buildDB(GoogDe
>psWriter.java:128)
>        at
>org.apache.flex.compiler.internal.graph.GoogDepsWriter.getListOfFiles
>(GoogDepsWriter.java:80)
>        at
>org.apache.flex.compiler.internal.codegen.mxml.flexjs.MXMLFlexJSPubli
>sher.publish(MXMLFlexJSPublisher.java:330)
>        at
>org.apache.flex.compiler.clients.MXMLJSC.compile(MXMLJSC.java:467)
>        at
>org.apache.flex.compiler.clients.MXMLJSC._mainNoExit(MXMLJSC.java:346
>)
>        at
>org.apache.flex.compiler.clients.MXMLJSC.mainNoExit(MXMLJSC.java:271)
>
>        at
>org.apache.flex.compiler.clients.MXMLJSC.staticMainNoExit(MXMLJSC.jav
>a:230)
>        at org.apache.flex.compiler.clients.MXMLJSC.main(MXMLJSC.java:176)
>
>Thanks,
>Kinjal
>
>
>
>--
>View this message in context:
>http://apache-flex-users.2333346.n4.nabble.com/Detect-Device-using-FlexJS-
>tp12145.html
>Sent from the Apache Flex Users mailing list archive at Nabble.com.

Reply via email to