Archive for September, 2007

How to define your own global function in as3

It is very easy. However, I’ve found no info on this topic in the web. I wonder why? First answer: everyone knows how to define the top-level function in AS3 so no-one even drops a line about such obvious thing. Second answer: my search strategy is wrong. Anyway, the approach to your own global functions in Flash9 is really simple, just two steps for those who still miss this feature.

To define your own top-level function (for example, “myTrace“) in AS3:

1. Create the file named “myTrace.as” in the root of your classpath directory.
2. Add the following code and save it:

package {
	public static function myTrace(strToTrace:String)
	{
		trace("myTrace says: " + strToTrace);
	}
}

3. That’s all.
Now your myTrace function is the top-level one. It is visible from ANY of your AS3 classes with NO imports. No hacks. You can call it “global method in AS3″ or “top-level function in AS3″ or whatever you like. This is amazing and I wonder why no one even blogged a line about such simple and great solution except the Miramax at as3.ru. Am I missing something evident here? Feeling like complete n00b.

New Online 3D Alternativa Game - in development, but very promising

Meet the Alternativa Game Blog ??” regular news from the developers team of upcoming flash 3D online game.

Suprise: reasonably or not, they do not use Papervision3D developing their own engine because it is heavily optimized for the game needs as they said. They develop unique approaches like texture lighting with highlights, texture objects and even its own 3D editor (hello, Google SketchUp). There also advanced shading tricks like special corners processing ??” you can see the more dark shadows in the corners in action here as well as other abovementioned stuff.

Also, there’s a lot of already created custom game interactive objects like TV, phone, photocamera, watches, newspaper, and more ??” check the Alternativa Game project’s blog, you will see a lot of demos there. Pretty promising and good already. Also, they may release their game 3d engine as public later.

Cannot create the database because MKSS.EXE could not be located - Visual SourceSafe says when you try to create the new database but Administrative Tools was not set up during custom install

Such error I’ve got today when tried to create the VSS database for one of my projects, at the very last step of database creation wizard. As for me, this is pretty unfriendly behavior: application should warn me of such issues at the very first step, not just give me a poor error window at the very last one, despite the fact there’s not vary much steps in “Create new database” wizard at all.

Sometimes I use Miscrosoft Visual SourceSafe when working with .NET developers at the same projects or project requirements imply the usage of VSS.

Last time I used VSS pretty far ago, nearly two years. Today I installed it again to store the project’s files in the VSS database. Usually I’ve been accessing the database created earlier by other developer or by admin, so I’ve never installed “Administrative Tools” with VSS when performed a custom install. This time, I should have create the databese by myself and when I’ve tried to do so, the “Cannot create the database because MKSS.EXE could not be located” error appeared at the very last step of the process, when I pressed the “Finish” button.

I’ve googled for the exact phrase made from error text, and found no results. This is strange. Is it only me who got such error at all? Then I googled just for “MKSS.EXE” and found “How To Create a New Database in Visual SourceSafe” article from Microsoft. Mkss.exe should be located in the Win32 directory in Visual SourceSafe - there was stated. So I suggested “Administrative Tools” when performing custom install is needed, run setup.exe from VSS distributive folder again, selected “Add or remove features”, then checked “Administrative Tools” and that’s all. Then succesfully created the database.

Happy end, but it would be much better to have more friendly workflow and help in such situations.

Meet the FDJ: Flex Developer’s Journal at flex.SYS-CON.com

Now Flex Developers have the whole Flex Developer’s Journal section and corresponding top-level menu at the famous SYS-CON Media website. It is just the top level menu item between the “WEB2.0″ and “LINUX” ones. Weeeeehooooo!

Transmit all your positive waves toward the Yakov Fain. He’s a Editor-in-Chief of this whole great new section.

And a lot of respect goes to the other authors who published numerous advanced Flex Articles at SYS-CON before and thanks to Yakov again for his strong efforts in growing this new FLEX SYS-CON trend, bringing it really alive and providing massive help to talented Flex experts in publishing their articles, e.g. Advanced Ant for Adobe Flex Projects (How to use Ant to automate HTML wrappers creation and more) by Konstantin Kovalev.

Also, Yakov is the co-author of one of the best Flex Development Books ever — you know.

New FDJ authors are invided - read Yakov’s Message From the Editor-in-Chief of Flex Developer’s Journal for details.

God, save the Flex.

Flickr loves Flash: crossdomain.xml finally added to the Flickr Image Server

Bored using proxies to get images from Flickr? Troubles no more. Flickr added crossdomain.xml to their Image Server to make life of Flash Platform Developers easier. The files are located here:

  • http://static.flickr.com/crossdomain.xml
  • http://farm2.static.flickr.com/crossdomain.xml

Now your BitmapData can access any part of any Flickr image.

Follow the details at the Yahoo! Flash Blog: Flickr Now Even More Flash-friendly. There’s also a flash illustration of extra benefits which this update brings to processing Flickr images with high quality. Thank you Yahoo Flash Team and Flickr Friendly team too!

And, as I’ve heard through the grapevine recently, Google is going to add crossdomain.xml to the Google Maps. Are there any details on this lovely new feature, or this is old news already?