Error #2037: Functions called in incorrect sequence, or earlier call was unsuccessful.

April 11, 2008 by richardhart

While working with the Sound object in AS3, I recieved the following error.

Error #2037: Functions called in incorrect sequence, or earlier call was unsuccessful.

I was trying to reuse my Sound object by loading a different external mp3 into it, which I used to be able to do no prob in AS2. We’ll like many things I have discovered with AS3, things have changed. After doing a bit of research I found the answer here on TroyWorks blog. Basically, Sound objects  now appear to be single use items, which means you have to create one for each sound you want to use, or recreate it if you want to reuse it, so in my case I needed to new my Sound object inside your function, instead of trying to do it in my class constructor and trying to reuse it. Hope this helps.

Flash CS3 and Soundbooth – Audio Only FLV’s with Embedded Cue Points

April 10, 2008 by richardhart

I set of this morning to accomplish what I initially thought would be a 20 minute job. I just wanted to create an FLV file with no video, just audio. Why would I want to do this you may ask? Well, FLV’s support cue points and cue points can be used to trigger things in your application. After messing about with Premiere, After Effects and Soundbooth, I found quite a few ways that don’t work and at least 1 way that did.

By the way, when it comes to cue points, you might be interested to know that they are not supported if you decide to use use H.264 and neither are alpha channels. VP6 is the way to go for if you need cue points and alpha in your video or in my case my video that contains only audio.

So what did I do?  Well, here goes…

1. I pulled my audio file into Soundbooth.

2. I set my markers in the markers tab. You can add them, give them a name and even add extra parameters if you want.

3. I exported to a Quicktime Movie. Why not just export to FLV? Well, my cuepoints never seemed to get embedded properly internally when I tried and I always wound up with ans external xml file with the cue points in it. Now I did also got an external file with cue points when I published the Quicktime, which led me to step 4.

4. So I now had a Quicktime movie and an external cue point file. I fired up the Flash Video encoder and added the Quicktime movie to the queue.

5. You’ll want to make a few setting changes before you turn it loose. Under the video tab, uncheck the encode video box. Make sure the encode Audio is checked under the Audio tab and under the Cue Points tab, load in your external cue points file.

6. Finally, click on the start queue.

Rejoice, you should now have an audio only FLV with embedded cue points.

Kid Proofing My Imac – Parental Controls in Leopard

March 9, 2008 by richardhart

I recenty bought a new IMAC for the family and I have two little ones at home who are keen to start using the computer. My son is almost 4 and my daughter is 2. I mainly let them play games that only require pressing keys on the keyboard and I didn’t want them messing about with my files and other import info and settings.

Using the new parental controls in Leopard I was able to create a simple account for the kids that require no login and then strip out pretty much all the functionality except for a few programs I want them to be able to run and a web browser. Not only that but I was able to disable most of the shortcut keys on the keyboard so that I can pretty much let them pound away on the keyboard and there is not much they can do to harm the computer.

If you are intesting in learning more about how to do this, here is an article that got me started. If you have older kids you can even restrict internet usage and control times and durations that the kids can use the computer. Pretty slick!

http://www.macworld.com/article/61132/2007/11/tco_parentcontrols.html

Adobe Air 1.0 and Full Screen –> With Full Keyboard Support (Use FULL_SCREEN_INTERACTIVE)

March 5, 2008 by richardhart

So it turns out that Full screen Air apps are a go after all with full keyboard support. This is great news. What you need to make sure you do is use FULL_SCREEN_INTERACTIVE instead of FULL_SCREEN when you set the stage displayState.

Thanks Tim!

Adobe Air 1.0 – Positioning the Main Application Window on the Desktop

March 3, 2008 by richardhart

So you’ve built an AIR app, but want to position it on the desktop. Positioning a new window is pretty easy, but It may not be intuitively obvious how to position the main window of the application. After trying to set all manner of stage properties and x,y coordinates, it turns out that all you do is go into the Air Application and Installer Settings and then click on the settings button located next to advanced. In the window that comes up, look for initial window settings, and in my case, I choose zero for X and zero for Y to place my window in the top left of the desktop. You can also set widow heights and widths here and check up a whole host of other options.

Adobe Air 1.0 – Full Screen –> No Keyboard Input

March 3, 2008 by richardhart

So, you’ve downloaded and installed the official release of Adobe Air 1.0 and are really excited about the new “full screen” feature. We’ll I was really excited too. I wanted to build some games for my kids that I could run fullscreen and disable most of the keys on the keyboard. Sounded great in theory, and so I went off and learned how to full screen an app, which was pretty easy. I then popped in some code to trap the all the keys since so my little onces can’t get into too much trouble pounding on the keyboard.

When the app runs and is not in full screen, the keys get trapped no problem, but when I switched to fullscreen, suddenly, no keyboard access. Combing through the tech notes and blogs at Adobe I was shocked to find that this a known issue or rather decision made by adobe to “protect” naive users. Personally, fullscreen without keyboard access is like throwing the baby out with the bathwater. I hope this decision get reconsidered at some point. Until then, I switched over to making my app go as large as it can without going full screen, which still gives me my keyboard.

Hello Blog!

March 3, 2008 by richardhart

I’ve decided to go with a little bit more personal blog that takes into account the many aspects of my life. Although I’ll often be discussing technology and game development, I will also be adding in little tidbits from other areas of my life to balance things out. I hope this will allow me to be more frequent in my postings … which kinda lost steam on my previous blog. Hope you’ll find my journey interesting and informative.

Cheers,

Richard