I want to do some development on a Flex project开发者_如何学编程 that uses Ant: http://svn.openstreetmap.org/applications/editors/potlatch2/ . I can build it from the command line but now want to use Flex Builder 3.0.2 to build, debug, etc.
I can see a few different paths to follow, but nothing that screams out "this is the right way":
- create new project, SVN checkout in there (but then the directory structures won't match, and not sure how to tell FB to build using the existing build.xml)
- create new project, create external source links to another directory with the files in it
Surely people do this all the time? (Never done Flash development before...)
Ok, here's what ended up working for me. It turns out I didn't need to use ant to build the project after all. This is for the specific project (Potlatch2) but lots of the principles are probably common.
- File | New Flex Project (no server), save it somewhere, eg "c:\pot"
- SVN checkout the potlatch2 files inside, so you have c:\pot\potlatch2\potlatch2.mxml etc...
- Rename version.as.template to version.as and make up some stuff inside
- Remove the "..." line from potlatch2-config.xml. Don't ask me why.
- Set Flex SDK version - configure it to point to SDK 3.5
- Project | Properties | Flex Build Path:
- set source folder to potlatch2
- set output folder to potlatch2\resources
- set library path to potlatch2\lib
- Update Flash global security settings to allow access to c:\pot\potlatch2\resources (otherwise you get 1. SWF security errors)[1]
- Update browser settings (Window | Preferences...) to use a browser that has Flash Debug Player installed (ie, not Chrome).
- Under debug settings (click the bug drop down, Other...): Turn off "Use defaults", make debug (and possibly run and profile) point to an HTML host file that passes the right settings to potlatch2.swf, passing lat/long coordinates of a place you want to edit.
精彩评论