FLARManager v0.61 (augmented reality in Flash)
ericsoco | 2009/11/07 | 3:03 pmv0.5 introduced some issues with automatic camera selection (in FLARCameraSource) that went fairly unnoticed until v0.6. this primarily affected users with USB cameras on Windows, as well as a couple of other edge cases.
v0.61 corrects those issues, thanks to some help from jim alliban. download it here:
http://words.transmote.com/wp/flarmanager/
what is this?
FLARManager is a lightweight framework that makes it easier to build FLARToolkit augmented reality applications for Flash. it is compatible with a variety of 3D engines, and provides a more robust event-based system for managing marker addition, update, and removal. it supports detection and management of multiple patterns, and multiple markers of a given pattern.




Hi Eric, Thanks for sharing this great toolkit with us! I'm
Max | 2009/11/22 | 7:50 amHi Eric,
Thanks for sharing this great toolkit with us! I’m diving into (Flash based) AR right now and I’m trying to get things up and running. Your toolkit is definitely one of the tools that I’ll keep in my toolbox!
Anyway, I was just wondering what the file FLARManagerProfiler.as is all about. Apparently FLARManager can be used without it (I just tried removing it and recompiled my app). Can you give me some hints?
BTW If this is a really stupid question, then please excuse me, although I have some coding skills, I’m quite new to the flash/flex/as3 environment.
Thanks again, cheers,
Max
@max -- not a stupid question at all. FLARManagerProfiler
ericsoco | 2009/11/22 | 1:34 pm@max — not a stupid question at all. FLARManagerProfiler is an application class that i use to run the flex builder profiler on FLARManager, to ensure there are no memory leaks. i considered svn:ignoring it so it wouldn’t end up in the repo, as it’s really just for my use, but figured i’d leave it anyway in case other devs want to profile their apps. sorry for the confusion,
Killer stuff, this is working like a dream now...
axiom | 2009/11/25 | 5:18 amKiller stuff, this is working like a dream now… I’ve had my share of stumbles along the way but your FLARManager has made this possible for me in a relatively short period of time. It took me longer to figure out how to beat Flex into submission.
Someday when my coding is better I hope I can help contribute to this project.
Thank you very much for this. I had some initial
Asi Epshtain | 2009/12/16 | 6:14 amThank you very much for this. I had some initial problems with compiling this in flash CS4 and found the problem is due to CS4 bug with singleton class that also have interfaces. ( caused by FLARLabeling_BitmapData )
The solution can be found here:
http://blog.webdeely.com/2009/02/cs4-doesnt-like-the-combo-of-internal-classes-and-interfaces-in-as3/
Works great now, and I’m off to my experiments.
Hi, Sorry for my stupidity, but after I've upgraded to .61
Therion | 2009/12/18 | 8:27 amHi,
Sorry for my stupidity, but after I’ve upgraded to .61 any of my markers are not being detected anymore, even the ones in the sample. I wonder what could be wrong?
Thanks for all the great work!
@therion -- not sure what the problem could be.
ericsoco | 2009/12/18 | 2:59 pm@therion — not sure what the problem could be. have you tried creating a completely new project, and importing FM0.61 into it, and testing that? it should work without trouble.
@ericsoco - Hi, sorry for the late reply. No I
Therion | 2009/12/20 | 7:40 pm@ericsoco – Hi, sorry for the late reply. No I haven’t yet. But I did try compiling the sample I got from the svn and it didn’t work as well. Could there have been any changes to FlarToolkit’s marker detection?
@therion -- i just tried that myself, and it works
ericsoco | 2009/12/20 | 9:03 pm@therion — i just tried that myself, and it works fine. re: FLARToolkit changes, that’s irrelevant, because i bundle FLARToolkit with FLARManager, so if there were any changes you would have those.
is your flarConfig.xml pointing at the correct pattern files?
@ericsoco - Yeah it is. This is really weird man...
Therion | 2009/12/20 | 9:08 pm@ericsoco – Yeah it is. This is really weird man… Anyways I’ll try it again and tell you if anything comes up.
Thanks for the help!
Hey, Eric, great stuff! Finally got tired of trying
Michael | 2010/01/06 | 10:49 amHey, Eric, great stuff! Finally got tired of trying to figure out why my project (seemingly randomly) is unable to detect my camera, and came across the posts here and on the v06 page. I updated to the current version in SVN, also updated the toolkit, but I still seem to be having the same problem. =/
I did 5 compiles while writing this post. Not changing any code, just re-publishing over and over.
2 out of the 5 publishes, I get: Error #2044: Unhandled error:. text=Camera not found. Please check your connections and ensure that your camera is not in use by another application.
But even on a successful compile, if I run the .swf outside of flash, I will get a debug error pop-up dialogue that says the same thing… so I guess it doesn’t really matter if it compiles correctly or not…
Any ideas?
@michael -- what kind of camera are you using, and
ericsoco | 2010/01/06 | 12:31 pm@michael — what kind of camera are you using, and what’s your hardware/OS setup? i set the timeout for camera activation to 3 seconds (FLARCameraSource.CAMERA_VALIDATION_TIME) — try increasing that value. it’s a bit of a crapshoot trying to get camera detection to work for all cameras on all platforms without making the user wait forever for the app to init, so i tried to keep that value as low as reasonably possible. apparently it’s too low for your setup.
Wow, that was easy. =P Went ahead and doubled it to
Michael | 2010/01/06 | 12:41 pmWow, that was easy. =P
Went ahead and doubled it to 6 and so far, no problems at all.
I’m on Windows XP SP3, with a Microsoft LifeCam VX-6000 (USB).
It was also doing it for the built-in webcam on a Macbook Pro. I’ll have him test it out a few times, too, to see if he gets the error anymore.
Thanks for the quick reply, greatly appreciate it! And great work on the Manager!
Hi Eric, Great work! I have used the FlarToolkit before with
Joe | 2010/01/07 | 9:18 amHi Eric,
Great work! I have used the FlarToolkit before with success and I am trying to use FLARManager but I am running into a problem. I am using .61 from the repository as well as FLARToolkit from their repository. ( I have also tried .6)
I am editing with FlashDevelop and compiling with CS4. I am running Windows XP on a MacBook Pro.
My issue is with marker detection. The confidence level being returned in never greater than .000*. Everything else works fine, no errors. If I set the confidence level to 0.0 in the flarConfig.xml or if I comment out the code in FLARManager.as where it checks the confidence, I get flickering markers popping up all over the place.
Any ideas?
Thanks,
-Joe
OK, downloaded the zip and ran examples fine using the
Joe | 2010/01/07 | 10:55 amOK, downloaded the zip and ran examples fine using the FLARToolkit and FLARManager in the zip, still not working with my updated files from the FLARToolkit and FLARManger repositories. I guess I am good for now to test.
@Asi Epshtain - thanks for that pointer about the CS4
Adrian | 2010/01/14 | 7:47 pm@Asi Epshtain – thanks for that pointer about the CS4 compiler Bug. I was about to throw the whole damn thing out the window. I fixed mine (also in FLARLabeling_BitmapData) with a new class called BugFix:
package org.libspark.flartoolkit.core.labeling {//fix for CS4 compile bug...
public interface BugFix{ }
}
then change the line in FLARLabeling_BitmapData to:
public class FLARLabeling_BitmapData implements IFLARLabeling, BugFix {However, now I have a new issue where I think its complaining that I don’t have a camera hooked up? The error is:
TypeError: Error #1009:Cannot access a property or method of a null object reference.
at com.transmote.flar.source::FLARCameraSource/initCamera()
...
...
If this is what’s causing the error, is there a way to use an image instead or a live video?
Check that, I found the line in the config xml
Adrian | 2010/01/14 | 7:50 pmCheck that, I found the line in the config xml regarding FLARLoaderSource…
FLARCameraSource.CAMERA_VALIDATION_TIME where shld i update this value to 6??? for me
abby | 2010/01/17 | 10:48 amFLARCameraSource.CAMERA_VALIDATION_TIME
where shld i update this value to 6???
for me also dat error 2044 came….
Hi Eric! How do I for setup the place of
Daniel Delgado | 2010/01/22 | 9:05 pmHi Eric!
How do I for setup the place of webcam video input? I mean, I want to do some kind of flash interface, with buttons and other stuff. But I need to move the webcam video input to other place than the right top corner. How do I that?
Waiting for some help here,
thanks in advanced
Daniel
@daniel -- the webcam input is displayed inside of the
ericsoco | 2010/01/23 | 4:34 pm@daniel — the webcam input is displayed inside of the FLARCameraSource instance created by FLARManager. you can access it via flarManager.flarSource.
Hi Eric, It says "Secondary camera validation failed". I tried to
Noel | 2010/02/07 | 2:02 pmHi Eric,
It says “Secondary camera validation failed”. I tried to increase CAMERA_VALIDATION_TIME to 6 seconds or even to 30 seconds but it keeps failing. The LED on the cam turns on after the first validation and stays on until I’ll close the flash player. My cam is a Logitech QuickCam Fusion, Windows XP SP3, Logitech drivers. The cam works, as I was able to create a marker using this cam and the app on tarotaro.org.
Any other suggestions how to fix this? Is this perhaps an OS/driver problem?
My problem with the "Secondary camera validation failed" has been
Noel | 2010/02/07 | 2:17 pmMy problem with the “Secondary camera validation failed” has been fixed. It had nothing to do with timeouts, driver, or as Flash reported the cam is busy by another application.
The reason was a mistake in the flarConfig.xml file, my mistake. cameraParamsFile was set to the wrong path. Doh! As it seems, if it cannot find FLARCameraParams.dat file then the second camera validation fails. Don’t ask me why.