Can I use Native Extensions in HTML/JS applications?


digging through docs, looks pretty easy if want import custom actionscript code using script tag so...

 

<script src="lib/myclasses.swf" type="application/x-shockwave-flash"></script>

 

can use native extensions in similar manner, or @ in html app?

it should technichly possile swf library use code relies on native extension, can include swf add extension application descriptor , debug / package appropriately?

i tried use native extension in html air app , told me...

 

error #2113: provided parameter loadercontext.securitydomain dissallowed domain

 

how did far ask?  well...

  • first decided try , load opencv native extension, it's compiled , i'm on os x, seemed perfect test.
  • in flash builder have project using generate modules html app, added opencvextension.ane clicking on `add swc...` button under actionscript build path properties menu, put file filter on `*.ane` , selected opencvextension.ane
  • i built quick class called opencvservice , added few lines of code in hopes catch useful info...
  • back in html app, added opencvservice.swf script tag available on window.runtime property js
  • next, modified application descriptor changing supportedprofiles extendeddesktop, , added extensions tag, extensionid set be.aboutme.nativeextensions.opencv.opencv
  • i jumped terminal , ran unzip command on opencvextension.ane sitting in folder same name, did ofcourse because adl needs extension in directory format
  • finally, ran adl in terminal command looks this: /applications/adobe\ flash\ builder\ 4.6/sdks/4.6.0/bin/adl -extdir ext application.xml .

 

and there have it, broken.  so, wasn't satisfied broken, , dug bug attempting create extensioncontext javascript-based app causes securitydomain error. sounds exact issue! downloaded recommended attachment, aneloadtest2.zip , tried verify work, bug suggested in notes.  , well... native extension bundled test, windows, not mac, , bug filed against mac version of runtime.  so, still not fixed.



More discussions in Archived Spaces


adobe

Comments

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

After Effect warning: A problem occurred when processing OpenGL commands

Preconditions Failed. - Joomla! Forum - community, help and support