Sunday, April 13, 2008

Loading AS1 / AS2 Flash Movies Dynamically with AS3

So, I could not find any good code snippets for loading a older AS2 Flash Movie via AS3, but several people talked about it being possible.

Also I have been using BulkLoader for loading assets into Flash and there is not a code snippet on that site (that I could find) to load a older movie from a url - there was a method that indicated it could be done. BulkLoader is a great bulk load library (open-source): http://code.google.com/p/bulk-loader/

So I finally got the right mix down and figured I would throw the class wrapper that does it out to the wild and maybe save someone a few minutes. Leave me a comment if you found the snippet useful!

package com.netrecon.test
{
import flash.display.*;
import flash.text.*;
import flash.net.URLRequest;
import flash.events.*;
import br.com.stimuli.loading.*; //BulkLoader


public class OldMovie extends Sprite
{

var loader : BulkLoader = new BulkLoader("test");
var movie:AVM1Movie = null;
var url:String =
"http://yourURL.com/YourOldMovie.swf";

public function OldMovie():void
{
// loader loads AVM1 movie
loader.add(url);


loader.addEventListener(BulkLoader.PROGRESS, onProgress);
loader.addEventListener(BulkLoader.COMPLETE, onComplete);
loader.start();
}

// bulk loader events
function onProgress(evt : BulkProgressEvent) : void{
trace(evt.percentLoaded);
}


function onComplete(evt : Event) : void
{
var movie = loader.getAVM1Movie(url);
addChild(movie);
trace("loaded old movie swf from server.");
}
//end bulk loader events
}
}


-Rask
Austin, TX - Flash Game Development
http://www.net-recon.com

Tuesday, April 8, 2008

Austin Flash Game Development

We have been working with the SmartFoxServer working through the architecture and testing various scenarios for chat and other player interaction / handling.

It is a pretty good product - I think the possibilities for future versions and extensions are pretty broad as casual gaming / advergaming / branded entertainment / social media keep converging.

In case you are looking for more information on multi-player servers for Flash games, definitely check out SmartFoxServer and Electro-Server. Both seem pretty stable. I know there are other products out there, but these seem to have a pretty good community following so far.

It would be great to hear if anyone has had any good/bad experiences with these products or if anyone recommends cool extensions/complimentary libraries/other platforms worth checking out!

-Rask
Austin, TX
http://www.net-recon.com

Wednesday, March 19, 2008

Flash on the iPhone indicated by Adobe

Yesterday Adobe announced they have evaluated the recently released Apple iPhone SDK and have indicated they will be developing a flash player for the iPhone on it. That is great news from a interactive application and games standpoint.

I would speculate that it may even provide for developers to bypass the iPhone SDK where it might of been used previously and just develop apps in Flash that need rich experiences - saving learning curve time and allowing for increased re-usability. It will also allow the web design audience a avenue to deploy interactive elements to the iPhone without needing to know how to development in C or a similar language.

Nothing but goodness with this news. Hooray for cooperation between the big tech players..

[Edit 3/23/08: UPDATE - So Adobe is back-peddling some on this claim now saying they will need Apple's cooperation. Well we can still hope.. Source: http://macworld.co.uk/ipod-itunes/news/index.cfm?newsid=20775]

-David
In now sunny Austin, Texas!

Source: http://www.techcrunch.com/2008/03/18/adobe-forging-ahead-with-flash-for-the-iphone-despite-jobs-remarks/

Net-Recon provides web design, web development, flash games, and Internet marketing to customers nationwide.

Saturday, March 15, 2008

HOWTO: Fix "Invalid Token" issue in Joomla

This morning i tried to log in into Admin's Section, and i get the following error:

"INVALID TOKEN"

This error is related to cookies. It happened when we changed our summer time (Net-Recon Argentina Team went back one hour) - at that time, my account was blocked.

First off, if you get this error, all you have to do is to delete your cookies (This will let you log in into your admin section).

Then you have to search for this line in your login form:


<input type="hidden" name="<?php echo JUtility::getToken(); ?>" value="1" />


And change it to:


<input type="hidden" name="<?php echo JHTML::_( 'form.token' ); ?>" value="1" />



This will fix the issue.


These kind of issues are very common if you use Joomla v1.0 templates in Joomla v1.5.


-Nico.
Net-Recon
Web Design and Flash Games - Based in Austin, TX

Tuesday, March 4, 2008

HOWTO: Joomla and Windows Live Writer

So we are switching one of our customer's sites to have a Joomla backend. The customer really wanted to be able to use a WYSIWYG / easy editor to publish articles and photos into Joomla.

Now I had read some articles that it was generally possible to get Windows Live Writer (a great blogging tool) to work with Joomla, but the instructions were sparse and did not fully explain the process and issues with doing it. So, once I figured it out I decided to document it for the community and for my current and future customers.

At this link is a PDF explaining how to make Windows Live Writer work with Joomla. Good luck!

-David
Web Design and Flash Games in Austin!

Link: Joomla and Windows Live Writer (pdf)

Saturday, February 23, 2008

Setting Classpaths to AS3 files in Flash

As you start building a collection of AS3 files for larger flash games / applications importing them via the library seems a little crazy (not to mention wanting to use some of the 3rd party libraries and classes out there.

So start using classpaths - which allow you to import external classes into your flash projects (and other AS3 files). This also allows for you to create reusable classes for use between projects (loader helper classes, conversion classes.. etc..)

A good explanation of how to do it is made by Jody Hall at:
http://www.actionscript.org/resources/articles/698/1/Make-your-own-reusable-classes-using-Flash-and-AS3/Page1.html

-Rask
From Austin, TX

Net-Recon
Web Design, Flash Games, Social Media, Interactive Development