We have a project created in FlashDevelop outputting to flash and html5, which after moving from the Flash IDE and lots of head scratching finally works
It includes a few fonts and an swf symbol library which for the flash output is all in one directory, so no problem, the html5 output apart from the js file in the top directory it also creates a few sub directories, fonts, lib and libraries also with a subdirectory \bin.
However the end client is looking to run on an Asp.net server which defines bin directories as protected so I’m being told to change the directory name so \bin isn’t used. Unfortunately I’m probably being dim but I can see how to do this.
I’ve tried editing the ApplicationMain.hx and DefaultAssetLibrary.hx files, but they simply get rewritten to bin when compiled.
I suspect this is defined in a Template somewhere, but can’t find where, or maybe I have the wrong idea.
I’m guessing I’m not the first person to encounter this so any guidance would be great.
Yes, I’m copying the files from the bin directory to the server, unfortunately the compile is creating a directory under libraries also called bin?
I think it’s being output to the bin/html5/bin/libraries/bin/ashLib directory because I’m using an swf symbol library, as the directory is full of png’s from the swf. It works fine on an apache server and would work on ASP apart from the path issue.
Oh, gotcha. Sorry, I was looking at a project without images. That’s currently set within the “tools/Tools.hx” (I think is the path) file in the SWF library, which is then compiled with “haxe compile.hxml” in the same directory. Thinking about what might be a better convention
If we did that, we might consider putting the .dat file in the directory as well, so you get “mylib.json”, and a “mylib” directory with all the data for it
Hi I need an additional clarification on this one, because I encountered a similar , bigger issue. The game provider I work for runs a platform in which a *.js file is not kept in the same directory as asset files … So the regular build does not do the job for me.
I have to change the path of lib from
from
lib/swfpack/swfpack.bin
to
swf/gameid/lib/swfpack/swfpack.bin
along with all image paths inside a pack
So I guess my question is where can I change it ? What is a Tools.hx file and where can it be found ? Some additional instructions I suppose …
I I am to load all assets rather then embed them, that would kinda lose the purpose of a library, wich is a big thing. Actually the only thing that separates you platform from other platforms - like Pixi.js …
So, my goal is not to load assets and than wait for them … I wan’t to use the Flash approach.
var assetPack:MovieClip = cast(new AssetPack(), MovieClip);
assetPack.getChildByName(“button”);
the problem is, this works but the path of assets embedded in lib always remains the same lib/AssetPack/AssetPack.bin
I want to change this path into
gameid/assets/lib/AssetPack/AssetPack.bin
Is there a way I can do this, or this all generate=“true” (embed) is no use at all to me, and I have to change my entire code of the platform and game ?
There are a number of “lib/” strings in the file, in the current OpenFL dev I think it may be possible to write this to a new value and have it still work. You must openfl rebuild tools in order to compile any changes this file. I think that if changing these values do work, then we may be able to add some kind of targetPath value to the <library /> tag (similar to the asset tag) in order to make this configurable