Date Archives

September 2011

Using fl.controls.* with FDT (and Flash CS5.5)

by troy on January 4, 2008

I Recently upgraded to FDT 3.0 Professional…I highly recommend if you’re doing heavy actionscript projects. It’s pricey, but will pay for itself quickly.

Using fl.controls with the syntax checking took a bit of research. Turns out you have to follow the steps as

  • Create a new FLA, name it CS3Controls
  • drag all the components you need into the Library
  • In File> Publish Settings > Flash > checkmark “Export SWC”
  • publish it
  • copy the CS3Controls.swc to someplace you’ll remember (e.g. a common classpath or whatever app that uses them’s lib folder)
  • – Now in FDT, add your SWC to your project, and in the Flash Explorer panel, right-click and add that SWC file to your classpath
  • once that swc is visible in the FDT Flash Explorer, right click over it. “Source Folder”>“Add to Classpath”
  • after a moment you will see it above the packages, if successful, clicking the plus will show you all the classes inside it…very cool FDT team!
  • in your AS class just proceed as normal eg.: <code> import fl.controls.*</code>

found this cool little tip and it worked great

Attention please

There’s something even more limited than time. It’s your attention. Attention is a subset of time, therefore it’s more limited. How you spend your attention is more important than how you spend your time.

Clear mongodb in 3 lines of code using Mongoid

As always I am learning more and more about ruby and rails. Recently I choose to take a stab at using Mongodb as my database and move away from using more traditional DBs such as Sqlite and Postgres.

It has been a little strange not having to run rake tasks such a migrate to setup new database tables and such. If you find yourself needing to clear out all the data in the database and you are using the Mongoid gem such as I am in your rails project then you can run the rails console and do the following to clear everything out. I find this useful if you have been developing and need to clear out all your test data.

Mongoid.database.collections.each do |collection|
      unless =~ /^system./