Skip to main content
February 14, 2013
Answered

In Air iOS, what is the path for the included folder which is above .fla file folder?

  • February 14, 2013
  • 1 reply
  • 1258 views

I have "assets" folder above "src" folder where .fla file is. The assets folder is included via Air iOS publish setting in Adobe Flash CS6 Professional but I'm having trouble accessing it.

the directory structure looks like this. Main.as is the document class for my project.

c: 
  /project
    /assets
    /bin
    /lib
    /src
      /Main.as
      /Main.fla

Now if the project was an action script project, I can normally access the assets folder by using a path like "../assets". But in Air for iOS project, it says the folder isn't there.

In the Air iOS publish setting window, it says the included folder path is "c:\project\assets" whereas when I move the assets folder under src folder it just says "assets" and then it can be accessed simply by using a path like "\assets".

Does anyone have an idea where the included folder is placed?

This topic has been closed for replies.
Correct answer

I'm still trying but with no luck. I can access the assets directory by using path like "c:/project/assets" but obviously it only works when testing locally on my pc. I have no idea where Air isl importing a directory which is above document root directory.

Is there anyway to define the path for an included directory? I tried looking at project-app-.xml but it doesn't define included directories.


It was that I simply needed to put "/" infront of the path. I was able to access the directory from iOS by using "/assets" rather than just "assets".. I still need to use "c:/project/assets" to access the directory from my local pc since my document root directory is "c:/project/assets/src" but I guess it's no big deal. Thanks for your advice.

1 reply

February 14, 2013

On iOS, after packaging, the included folders shall be copied to the ApplicationDirectory of the app, which can be accessed using something like File.applicationDirectory.resolvePath("assets")

February 14, 2013

Thanks for the reply. I've tried these with nativePath property but it doesn't seem to work. I've also tried passing different path like "project/assets", "../project/assets", etc.

Normally, I'd just move "assets" folder to "src" folder but the problem is the assets folder contains like 10k files and it would slow down the Flash compiler. as it seems like Flash is scanning every file under its directory.

February 22, 2013

I'm still trying but with no luck. I can access the assets directory by using path like "c:/project/assets" but obviously it only works when testing locally on my pc. I have no idea where Air isl importing a directory which is above document root directory.

Is there anyway to define the path for an included directory? I tried looking at project-app-.xml but it doesn't define included directories.