Add the required classes
History Key
- New content
Removed content
Recent Versions
Choose two versions to compare, or click the link to view it.
For your project to do anything you need to include the Link Manager class and the Context Menu Manager class. I've included the Mouse Wheel Manager to add mouse wheel support (for Macs, other OS's work fine) and I've included some basic styles that I start out with in my projects:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute"
color="#333333"
backgroundColor="#ffffff"
backgroundGradientColors="[#eeeeee, #eeeeee]"
backgroundGradientAlphas="[.5, .5]"
themeColor="#CCCCCC"
xmlns:managers="com.flexcapacitor.managers.*">
<managers:LinkManager projectName="My Project">
</managers:LinkManager>
<managers:ContextMenuManager/>
<managers:MouseWheelManager />
</mx:Application>
Enter the project or site name in the projectName field.
Now if you try and run it you will likely get this error:
SecurityError: Error #2060: Security sandbox violation: ExternalInterface caller file:///C:/Documents and Settings/user/Adobe Flash Builder Beta/FlashSite/bin-debug/test.swf cannot access file:///C:/Documents and Settings/user/Adobe Flash Builder Beta/FlashSite/bin-debug/test.html.
This is because we need to publish the project to a server. Publish actuallyactuals meaningmeans to put the files onin to a directory available to be served up by the server.
For example, if your Apache server has the document root pointing to, "c:/myproject/web/", which contains a file, "test.html" then it should be accessable in the browser via, "http://localhost/test.html". Make sense? If you haven't yet setup a server on your computer follow the instructions here.
By default the document root is not pointing to your project output directory. To point your server to your project's output directory follow the instructions here.
After you have setup yourFlash server goBuilder to Flashlaunch Builderusing andthe "http://" instead of "file://" then select your new project and select Project > Properties > Flex Build Path.
In thesethe fieldsOutput folder URL enter "http://localhost/".
Then make sure your server is pointing to your bin-debug directory. Instructions for doing this are also here.