Archive for August, 2004

Yeah!! I’m in Communication Arts!

Awesome….Communication Arts’ 2004 Interactive Design Annual has just come out. A site we created here at Heavenspot was chosen to appear in the issue…its a portfolio site for photographer Chris Mcpherson. If you happen to get a chance to check it out, it’s pages 174-175. Here’s the direct link on commarts.com.

One thing i dont think the article mentions is that the admin area for the site is all built in flash too.

So cool, my brain cant even comprehend it

found this via RocketBoots. It’s called Audio Pad, and its…um…ah, screw it man i cant even try to explain it. just watch the video.

Attaching properties to movieclips in AS2

Ok, I’m making the headfirst dive into AS2. So I have a question about creating new properties on movieclips.

ok…in AS1, if i wanted to assign id’s to some movie clips, i could just stick a new property onto the movie clip on the fly. So if i wanted to an an “id” property:

bc[as]. for (var i=0; i

Code Reviews

I was just reading this post on QLOD where he was talking about code reviews.

I think that would be a great idea if some person/group/web site/whatever would do do this. Forums are ok, and a great resource when you are trying to solve a problem, but trying to get a general code reviw on there doesnt always work out to well. Usually I find that the more advanced the topic the less replies a post will get anyway.

I find myself running into situations all the time where I’m thinking, “I know there has got to be a better way to do this…but I’ll just do it this way for now”, and never go back and fix it. Or I will go back and look at stuff I coded in the past and marvel at what crap it is…or at least how inefficient it was.

Granted there are as many different coding styles as there are people (I suppose thats where design patterns come in), it still would be such a great tool for the flash community in general if there were some code review resource.

I guess the first problem is finding people who want to (and have time to) do the reviewing.

Loading Images in Mac IE

I dont know if anyone has ever run into this problem, but it has hapeened to me on two different sites, and it has driven me crazy. Something about trying to load an image into Flash on IE for Mac acts a little funny. It seems that the code inside a preloader would not fire correctly once the image was fully loaded….so in the following code, the clip img_mc would not move into its new position, but the trace would execute:

bc[as]. picHolder.onEnterFrame = function(){
if (this.img_mc.getBytesLoaded() == this.img_mc.getBytesTotal()
&& this.img_mc.getBytesLoaded() > 5){
trace (“done”)
//right-align the clip
this._x = 785 – this._width;
delete this.onEnterFrame;
}
}

Now, this would only hapen occasionally, and randomly. Most of the time it would work fine exactly as it should, and for the life of me I could not figure out why this was happening. After trying many different angels to try and fix the problem and getting totally stressed out over it, I finally came up with the soltion:

Use setInterval to check the load progress instead of onEnterFrame.

Durr! I could kick myself.

Nearest I could tell is that the flash player for mac needs at least one frame to pass in the movie before checking the properties of the loaded clip.

OpenOffice on OS X

Marc Liyanage has posted a nice tutorial for running OpenOffice on Mac OS X.

I run open office here at work (on windows though) and it does the job just fine, for my needs anyway.

Advanced Flashers

Brajeshwar brings up a point on Advanced Flash devlopers that has been a topic on my my mind lately. It seems that it’s not just here in Los Angeles that there are more advanced flash jobs than there are advanced flashers to fill them.

Job Opening in Los Angeles

I’ll be leaving my position here at DNA Studio as Senior Flash Developer, so I’m helping them locate new candidates.

Here’s their ad:

bq.. DNA Studio, www.dnastudio.com, the premier interactive agency on the west coast, has an immediate opening for an experienced Flash Actionscriptor to work on some of the web’s most heavily visited sites. You must have experience designing and building highly interactive flash applications, as well as connecting those applications to back-end systems. Director experience a plus.

Please send your resume, portfolio, and salary requirements to jobs@dnastudio.com.

p. In addition to that ad, I’ll just say that you should be familiar with Object-Oriented Programming, transferring data into and out of flash (using XML, LoadVars and the like), and be comfortable working as part of a team development environment. You’ll be working on some pretty cool projects and sites for some majorly big name companies, so it will definitely be interesting.

Oh yeah, feel free to leave a comment letting me know you’ve applied as well.

A few more flash gotchas

Actually, i don’t know if these qualify as gothcas or just wierd stuff. For some reason I seem to be running into little wierd flash issues that I’ve never noticed before.

First, I was using LoadVars.sendAndLoad to send some data to a script. The script wasnt sending anything back to flash yet, it just executed it’s code and that was it. But, I had already defined an onLoad event for the LoadVars object, which looked like this:

bc[as]. myVars_lv.onLoad = function(success){
if (success){
display.tl.gotoAndPlay(“success”);
}else{
display.tl.gotoAndPlay(“error”);
}
}

Strange enough, the onLoad event fired and sent the playhead to the success” frame. Im not sure whats going on there, I was thinking maybe there was some sort of communication going on where the server was telling flash that the script executed successfully?

The other little tiny bit of wierdness had to do with text fields. When you have an input text field (this one was created in the authoring environment), and you dont assign a character limit to to it, when you enter too much text into the textfield’s visible area it will start to push the text at the beginning of the text field off to the left.

That’s pretty basic and expected behavior. The situation I ran into was having a button that checked the value of the text field onPress, and if it was not a valid string it would set the text of the text field to some text like “not valid” (or whatever error message). Since the text has been overflowed to the left of the text field, any reassignment of text using the TextField.text property leaves the newly assigned text off to the left and out of sight.

The solution I came up with was to use the Selection object to refocus the text field, then reassign text to the field using TextField.replaceSel():

bc[as]. btn_mc.onPress = function(){
 Selection.setFocus(this._parent.test_txt);
 this._parent.test_txt.replaceSel(“not valid”)
 
}

“I robot” absent from google — not exactly true

Derek franklin’s post on how the world just isn’t ready for all flash sites really irks me. We all know the limitations of flash and search engines, which there are available workarounds. In his post he mentions that the web site for the movi “I, Robot” is nowhere to be found on google if you search for “iRobot”, which is not the movie’s title. Nowhere in the post does he mention the movie does come up number one if you search for both “I, Robot”, “i robot” and just plain “robot” as well.