Not Found issue

I wonder why I get this error when I chose html5 in debug options for Haxe/openfl project.

import flash.accessibility.AccessibilityProperties;

When I import this I get Not found error. But when I change to Flash for debug or build options errors are gone. But I dont want swf output I need html 5 output. Who can help ? Anybody in this forum knows about it or not ? Thanks in advance

What does AccessibilityProperties do? What are you using it for?

It seems that it is only a thing that flash player understands and that might be why only swf can support it.
https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/accessibility/AccessibilityProperties.html

to be honest I am not sure why it is used in the file but it is something related to action script 3. I started to convert action script 3 to html 5 and as you said it was used in as files.

The case is that, if we are able to import flash.* components then why program does not see inside of the flash folder?

I realized that inside of the classes Path (Openfl) there is not anything related accessibility package. And what I did is :

I opened the class path folder ( in my case : C:\HaxeToolkit\haxe\lib\openfl\8,9,5\src\openfl) and added Accessibility folder from Flash (copied here). Then IDE occured Invalid Error, and I edited the AccessibilityProperties.hx and changed first line from package flash.accessibility; into package openfl.accessibility;

and wolaa :slight_smile: who has this kind of issue try to do this. I am not sure if this will work at the end but at least I stopped to get an errors so far. anyone who has advanced level can suggest me if I did right or not.

Where did you get AccessibilityProperties.hx? I can’t find it on OpenFL github :expressionless:

And again, I think that class only works with the Flash Player and it is meaningless in any other target

Hi, It is not under openfl directory it is under Flash directory. wen you use import.flash. it should appear in that list. if you copy and paste that folder under openfl it works as expected even it is html 5 project :wink:

Here’s the steps:

import openfl.accessibility.AccessibilityProperties;

You get an error – type not found. This means OpenFL has no implementation but you can use the following if you must use it on the Flash target only:

#if flash
import flash.accessibility.AccessibilityProperties;
#end

However we would be glad to accept pull requests to implement missing classes from the Flash API. You can use code (that’s MIT that you can contribute) in the OpenFL “src-draft” directoy and add <define name="draft" /> to your project. When it looks good for you, send us a pull request and we can add it to the project, and as we polish things we’ll help promote things to standard source.