Flexbuilder won't launch...arrrgh! - actionscript-3

In a panic since I'm trying to meet a deadline so appreciate any feedback on this.
For some reason, Flexbuilder 3 on my mac won't launch, crashes on startup.
I've never experienced this before.
Checked the .log file and what seems to be the problem is the following
/Users/foo/Library/Preferences/Macromedia/Flash Player/#Security/FlashPlayerTrust/flexbuilder.fbr (No such file or directory)
WTF is the flexbuilder.fbr???
Googled but not much luck.
The only thing I've done that might have caused this is change flash player versions system wide using the official flash player uninstaller...but obviously this should not happen
Any feedback appreciated...

It's hard to know where it went, but this file just contains a number of paths of 'trusted' locations for the Flash Player. Normally when you create a new workspace in FlexBuilder it adds the workspace location to this file, or if you create a project outside of the workspace it adds the project path.
It's surprising the absence of that file would keep FlashBuilder from launching though.

Ok, my workaround was to simply create an empty text file called flexbuilder.fbr in the location of the missing file.
But still would like to know the purpose of this file and how it went MIA...

Related

Where does Help Viewer cache files? Mac Help Viewer does not display the newest version of HTML files. This was working for weeks. What is wrong?

Xcode 4.5.2 Mountain Lion , Mac App
I follow the documentation precisely. The Help Folder and its subfolders are added to the projects /Resources folder and appears blue in color.
Folder References were added by xcode if necessary.
Whether I view the HTML file in Xcode or externally in a text editor, I see the new version of the file.
Inside the app, the Help pages all display, the anchors work, but the pages are older versions.
A particular file that is not being shown with the latest version is DgxFiles.html
It is located in the scheme below as ../pgs/DgxFiles.html.
When I access Help inside the app, I see an older version of the HTML file. It seems the old help files are cached somewhere.
App's Info.plist has
<key>CFBundleHelpBookFolder</key>
<string>HungryMeHelp</string>
<key>CFBundleHelpBookName</key>
<string>com.DrummingGrouse.HungryMe.help</string>
The Landing page,HungryMe.html has:
<meta name="AppleTitle" CONTENT="com.DrummingGrouse.HungryMe.help"/>
The folder I drag into the project is named: HungryMeHelp
The Help Folder structure is:
HungryMeHelp/
Contents/
Info.plist
Resources/
shrd/ <shared artwork>
English.lproj/
HungryMe.html <title page>
HungryMe.helpindex
pgs/ <the rest of the content pages>
sty/ <style sheets, generated list template>
scrpt/ <scripts>
I have:
0. Deleted /HungryMeHelp and re-added it.
1. Cleaned the project.
2. Reloaded Xcode
3. Rebooted Mac
Trash the following files in your Home > Library > Preferences folder
com.apple.help.plist
com.apple.helpui.plist
com.apple.helpviewer.plist
Trash the following folders in your Home > Library > Caches folder
com.apple.helpui folder
com.apple.helpdata
com.apple.helpd
com.apple.helpviewer
What am I missing?
Thanks for reading. Mark
I found answers to my Apple Help Viewer Cache questions here:
http://www.cocoabuilder.com/archive/cocoa/312037-updating-an-app-help.html
http://macergun.blogspot.com/2011/06/dealing-with-help-viewer-cache.html
I found the posting below at cocoabuilder.com
As a result, I deleted existing copies of the app from my system.
The Help System updated immediately thereafter!
On Dec 13, 2011, at 5:17 PM, Graham Cox wrote:
With each update of our app, we typically change the help book. We're finding that the system is very poor at recognising this and caches old versions of the help which causes new stuff we add to be unavailable. While I can manually trash the help caches and force an update, this isn't something we can ask or expect of our users.
Search the archives, and you will discover that you are likely experiencing a well-known issue that has been around for a very long time. It typically only affects the developer, not your users. It is especially annoying to the developer if another, older version of the application is still on your computer, in the Applications folder or perhaps in the form of earlier build products that are still sitting around, because then trashing the help caches and forcing an update won't necessarily stop the system from using the old version of your Help folder in an older version of your application.
When I am working on my Help folders, I routinely compress all older versions of the application into zip files for the duration, and I trash the Help caches before every test.
The typical user trashes the old version of the application when they install the new version, and all is well.
--
Bill Cheeseman -
I just get mad about the helpd cache while developing a help book as anything I found on the web, including what is found here, about clearing the cache of 'helpd' turn to not work anymore (at list on MacOS 12 - Monterey).
I found what do clear looking at files opened by HelpViewer Networking process while my help (not updated) was opened using Apple 'Activity Monitor.app'.
It turns that the cache is now built in the Container directory within your Library Folder.
~/Library/Containers/com.apple.helpviewer/Data
In this directory you find your cache help files in the form of
.*
e.g.
com.johnsmith.johnapps.com.johnsmith.johnapps.help*1.0.help/
doing a rm -rf of this directory will clear the help cache used by HelpViewer for the help book you are developing
You still need to kill the helpd daemon for this to work.
e.g.
rm -rf com.johnsmith.johnapps.com.johnsmith.johnapps.help*1.0.help/
pkill helpd
Note that changing the version of your help book in the plist file does not help.
In my case even if I increase the version of the plist help book (see Authoring Apple Help) , the cache generated still have version 1.0 even if it has been regenerated after the version update.

LWJGL Sound manager issue

I have been working on the Asteroids Game example code that they give in the tutorials section of the wiki and I ran into a strange error.
The code works just fine in my development environment, Eclipse. The game runs without error and exits normally.
I go through the export process in the file menu and create an executable jar that when run with this batch file code
java -Djava.library.path=D:\Tools\lwjgl-2.8.4\lwjgl-2.8.4\native\windows -jar SpaceInvaders.jar
Starts the display and the fails when it trys to load a wav file. Giving this error.
Exception in thread "main" java.lang.NullPointerException
I traced to where in the code this is happening and it is at the location where the wavs are being loaded. Apprently outside of the environment it can't locate the files even though they are right next to the code? All my wav files and gif files are just in the same directory as the java class files right now so calling them from the code looks likes this:
http://i.imgur.com/2gnN1.png
Searching for stuff on google it tells me to zip them into a seperate file and then import to the class folder and refrence from there. I was wondering if there was a way to keep the files inside my main jar file instead of having to create a seperate entity.
Thanks for the replys! Let me know if more information is needed.
You may want to consider using a higher-level API, such as the 3d soundsystem from paulscode. SoundSystem can read from inside the jar(like you are asking), and automatically switch to java sound if LWJGL sound isn't supported on the current hardware.

How to set up MonsterDebugger and FlashDevelop?

I'm trying to follow directions given by MonsterDebugger I've linked the SWC, added the code. Then built the project.
The last thing they say: "Publish your project and watch the magic happen."
What I got is a SWF that is built to an http directory where my PHP file picks it up and displays it in browser.
What I'm expecting/want is to interact with my SWF application through browser and debug it with MonsterDebugger.
I'm obviously missing something since there it looks like there is no way for Monster tool to attach itself to the SWF? I'm not sure how does Monster will know about my published SWF?
I'm using FlashDevelop/FlashCS5 and Actionscript 3.
Sorry if this is a stupid question, but did you actually started Monster Debugger.exe after publishing and opening your project in browser? Also MonsterDebugger.initialize(); has second argument which is an address if you publishing and accessing your project on the server I suppose. Did you try to change it?
My bad. I had MonsterDebugger.initialize() statement to execute last in constructor of my document file. I moved initialize statement to be the very first line in my constructor. Now it attaches. Apparently there was some code that executed before initialize that caused issue. All is well now that it is the first line in the document file.

Pass file from AS3 into embedded AS2 wrapper to load

I have a Flash AS3 application that uses FileReference.browse() to request a SWF from the user. If the chosen SWF is AS3, I'm good to go. However, if it's AS2, I need to load it into an AS2 wrapper first (so my app can alter it). All of these files (including my app and wrapper) are intended to exist locally on the user's machine, but the file they select can exist in any directory. So to be clear: Main application (AS3) -> Wrapper (AS2) -> User's file (AS2)
I know how to get the uploaded file's ActionScript version from the Loader's loaderInfo.actionScriptVersion variable, and that's working correctly. My issue is how to pass the file from the AS3 application to the AS2 wrapper so it can load it.
My first thought was to dump the ByteArray from the FileReference's load() function into a SharedObject "cookie". This method seemed pretty bad from a user-experience point of view, but it seemed most likely to work. However, I've been unable to find any method within AS2 to load the ByteArray as a movie (in fact, AS2 doesn't even seem to have a ByteArray class). So the first potential solution to my problem would be if anyone knew of a method for loading a movie from a ByteArray in AS2.
My second thought was to pass the uploaded file's path to my wrapper via the already-setup LocalConnection bridge, and then just have it load the file from that. However, I can't find any way to get the file's path, and my Googling suggests the security model intentionally prevents it. Not to mention, I'm not sure I can load an arbitrary file from the user's machine.
My "hands up in the air; I give up" solution was to just create separate buttons for loading AS3 and AS2 files (leaving it up to the users to guess which it is!) and have the AS2 button actually within the AS2 wrapper. However, it looks like AS2 doesn't have a file browsing uploading API, and the PHP-hybrid solutions I've found aren't an option (because this is meant to be run locally).
So, I would be eternally grateful if anyone could point me in the right direction for solving any of these three roadblocks. Alternative workarounds are of course welcome.
(Edit)
Ok, I found the documentation for AS2's version of the FileReference class. It supports the same file-browsing capability, but does not support directly loading the selected file into the SWF.
However, the security sandbox doesn't seem as strict for local files as I expected, and it looks like I can load any SWF on the user's machine once I have a path to it. So I should be able use JavaScript and an HTML form with a file input to get and pass the file path to my application. It's not ideal having to do all of this from within a web browser, but it should work. If it turns out satisfactorily I'll submit it as an answer.
(Edit 2)
Scratch the HTML-form idea. Looks like the path is hidden from JavaScript for the same reasons Flash hides it. The only option I can think of now is to have the user copy and paste the path to the file...
After reading over your post, you may be able to retry one of your previous attemps with some new information. Actionscript 2 DOES have a method for looking up files from a browser, same as AS3 does. AS2 also has a FileReference class. Check out the documentation here:
http://help.adobe.com/en_US/AS2LCR/Flash_10.0/help.html?content=00001040.html
Also, here is a tutorial:
http://markshu.ca/imm/flash/tutorial/fileReference.html
Well, all of my other leads have dried up, so I'm submitting the two answers that will actually work, although neither is ideal:
A) Use Adobe AIR, which will give more access to the filesystem (such as for getting path info) at the cost of requiring the separate AIR runtime to be installed.
B) Have the user enter the path to the file themselves (cumbersome for the user)

associated folder when saving an html file

When you save an html file "completely"(as opposite to "just html"), the html file and an associated resource folder will be saved. The interesting thing is that when you delete the html file, the folder will be deleted automatically.
The folder must not be some ordinary folder. What is it called and is it possible to do this programmatically?
I googled a bit but cannot find the answer because I don't even know what keywords should I type as I haev no idea what this is called.
I believe that the Microsoft term for this special folder is a 'Connected File', and I think it was introduced in Windows 2000 — in other words, it's a Windows/Explorer feature rather than an Internet Explorer feature. I haven't seen much about it, but this MSDN document could be a good starting point:
http://msdn.microsoft.com/en-us/library/bb776887(VS.85).aspx#connected
Are you deleting this from Windows Explorer? I think it is a feature of that program, and not operating system. Try to delete it with any other file manager: FAR, Total Commander, etc