Archive for Flash/Actionscript

FisixEngine Tutorials

I am happy to know that the FisixEngine API Docs have been released.

I have volunteered to help create some tutorials for the FisixEngine, Mr. Michaeli (Oz) has invited me to create a ragdoll tutorial for the engine, and I am really excited to get started once it becomes available to me.

I really do not see how any flash developer could not be super excited about this project, I know I am!

Comments (1)

Actionscript 3.0 Fisix Engine

Among several AS 3.0/Flex experiments and projects, I must say that this is one of my favorites.

It is called Fisix Engine. There appears to be a few memory leaks in the fisix engine demo, however this appears to still be under development, I am certainly looking forward to seeing some more applications such as games, using this.

I have been trying for some time now to get my feet wet with Actionscript 3.0. It is an amazing language, but also a huge leap from AS 2.0.

Update: I just found this really cool ragdoll effect using the Fisix Engine, AWESOME!

Comments

Flash Player 8.5 Beta renamed to Flash Player 9

Adobe has announced that the next released version number of Flash Player will be 9 instead of 8.5.

I think this probably a good change, because it brings to light the importance of the new enhancements.

I for one am very excited for the release of AS 3.0/FP9. There is not enough time in a day to satisfy how long I just want to jump into Flex/AS3, but I suppose it won’t be long until it is released.

I must admit thoguh, I havent had the opportunity yet to check out Flex, although I have heard quite a bit about it.

A friend of mine and a very well-rounded flash developer; Kristopher Schultz was showing me a bit about AS 3.0 that got me excited, like the integration of regular expressions, I am not certain on how it will work, but I love where they are going with it.

Comments

Create a smooth startDrag() in Flash

Let's face it, startDrag() has been around since wow....flash 4 I think? Perhaps Flash 3, not sure exactly. Sure it serves its purpose still, but one thing that has always bugged me about it ever since updateAfterEvent() became available, is the fact that startDrag is dependant of the frame rate.

I put together a simple MovieClip prototype that would work the same way as startDrag except using updateAfterEvent. It is pretty basic so you could probably add a lot to it, but it does perform the simple task of draggable Objects without being dependant upon the frame rate!

Actionscript:
  1. MovieClip.prototype.startSmoothDrag = function (lockCenter:Boolean) {
  2.     if (lockCenter == undefined) var lockCenter:Boolean = false;
  3.     var thisXMouse:Number = this._xmouse;
  4.     var thisYMouse:Number = this._ymouse;
  5.     var setPosition:Function = function (target:Object)
  6.     {
  7.         target._x = target._parent._xmouse - ((lockCenter) ? 0 : thisXMouse);
  8.         target._y = target._parent._ymouse - ((lockCenter) ? 0 : thisYMouse);
  9.     };
  10.     setPosition(this);
  11.     this.onMouseMove = function () {
  12.         setPosition(this);
  13.         updateAfterEvent();
  14.     };
  15. };
  16.  
  17. MovieClip.prototype.stopSmoothDrag = function () {
  18.     this.onMouseMove = null;
  19. };
  20.  
  21. myDraggableMC.onPress = function () {
  22.     this.startSmoothDrag(true);
  23. };
  24.  
  25. myDraggableMC.onRelease = myDraggableMC.onReleaseOutside = function () {
  26.     this.stopSmoothDrag();
  27. };

I have also put together a simple demo of this in use, to give you an idea of how it can be effective. Notice below that the fps (frames per second) is set to 1, which is slow if you didn't already know :). Notice how the smooth Dragable obejct is really smooth, while the regular startDrag() method is dependant on that horrifying 1 fps!

Click here to download.

Like I said, it is pretty simple but feel free to add to it what you want!

Digg This!

Comments (15)

Metadata; SEO for Flash

Before Flash 8, there was no standard for seo'ing a flash movie. There was, and still is limited functionality provided by major search engines such as google, for instance if you search "game filetype:swf" in Google, it will return some results perhaps relevant but not really accurate.

In Flash 8 there is something called "Metadata". Although, in my opinion standard html pages will always have the higher "value" in terms of being indexed well by search engines. But this is a good start for getting flash on the right track in terms of SEO for flash.

Within Flash 8, open the document properties and along with your usual document properties you will see the Title and Description Fields, that pretty much says it right there.

Flash 8 Metadata

One thing to keep in mind, and is what I tell everybody who asks me anything about SEO: Don't try to use meta fields to spam keywords. This applies to html with meta tags as well. This isnt 1999 any more and the search engines aren't stupid. So just put what best defines the flash movie and allow the search engines to gain accuracy, common sense really.

If you turn on size report generation (File > Publish Settings > Flash Tab > Generate Size Report) and then test your movie (CTRL + ENTER) you will see something like this in the report:

Metadata
--------
Bytes    Value
-----    -----
217    <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about="" xmlns:dc="http://purl.org/dc/1.1/"><dc:title>My Flash Movie Title!</dc:title><dc:description>This is my flash movie's description!</dc:description></rdf:Description></rdf:RDF>

Keep in mind though, that because you included the meta information for your flash movie, this does not mean that it will automatically generate the meta tag information for your actual html page, this you will need to do separately. Although, in my opinion meta tags for html pages are no where near as vital as they once were and are more of an option.

Also another perk to using the metadata fields, is that you can publish the information for ANY version of flash player 8 or earlier. This means if you have a flash site compiled in flash 6 and just want to include the metadata, then go right ahead! You will need the corresponding .fla file and flash 8 to do this, but in the long run I think it is worth it.

Digg this!

Comments (1)

« Previous entries · Next entries »