^ Main


August 21, 2007

Flash Player 9 gets H.264+AAC

Nice! This definitely helps keep Flash as the de facto standard.

“Yes! that’s right Flash Player 9 will now supports H.264 for video playback. The latest update to Flash player 9 which will be available on Adobe Labs will include support for H.264 and AAC in the form or .flv, .mp4 and .mov files.”

Read more here: http://blogs.adobe.com/rgalvan/2007/08/flash_player_will_support_h264.html.

Update

Ryan posted a bit more on the topic and it clearly answers “Will Flash work with other video formats?” Yummmmmmy!!!!!!!

Update 2

Aral has the full FAQ here (found the link from Ryan’s post).

“In a nutshell, H.264 is the same standard being used to broadcast high-definition television by the likes of BBC HD, DirecTV, and Sky HD. H.264 provides great video quality and does so across the bandwidth spectrum from 3G (mobile phones) to HD while using up about half the bandwidth of MPEG-2. And there’s already a wealth of H.264 content out there that Flash can now play. Specifically, this includes MP4, M4V, M4A, MOV, Mp4v, 3gp, and 3g2 files. (And even songs from your iPod that are not protected by FairPlay DRM as they’re in H.264/AAC format too!)”

Posted by John C. Bland II at 10:43 AM | | Comments (0) | TrackBacks (0)

August 20, 2007

Uh oh Silverlight...here comes crappy sites!

Technorati Tags: ,

One of the biggest issues people complain about with Flash sites is the crappy graphics/implementation and stupid ads (even though they don’t blame Photoshop for animated GIFs; lol…had to say it…again). They blame this on Flash, unfortunately.

Well, I’ve said this before and I’ll say it again. IT ISN’T THE TOOL MAKING THESE CRAPPY SITES AND STUPID ADS…IT’S THE PEOPLE!!!!

Continue reading "Uh oh Silverlight...here comes crappy sites!" »

Posted by John C. Bland II at 9:01 PM | | Comments (2) | TrackBacks (0)

August 9, 2007

Silverlight vs Flash: STOP IT!!!!

I’m 100% sick of these Silverlight vs Flash arguments. They are popping up all over the place and it is annoying. My problem is not people comparing the two to see which one they should use but when people are bickering about which one is better (like Flash vs Ajax).

As a perfect example, the AZGroups mailing list (.NET group) had a post about a “Color Picker Utility in Silverlight” in which Esther Schindler of CIO.com (blog: http://advice.cio.com/blog/esther-schindler) responded. To sum of my frustrations, I’ll merely copy/paste her email then my responses [since it covers all basis of this post]. This isn’t in any way an attempt to “out” Esther. It is just relevant that you see the posts as they occurred.

Continue reading "Silverlight vs Flash: STOP IT!!!!" »

Posted by John C. Bland II at 11:47 AM | | Comments (2) | TrackBacks (0)

July 20, 2007

Flash CS3 Web Services Classes...coming soon!

I don’t have them anywhere close to complete but I have figured out how to make the calls (less than an hour ago). For my immediate need I’ll probably hard-code a few things for this application but I’m going to full flesh out these classes within the next week or so. I’ll probably post it to riaforge.com but you’ll definitely hear about it here as well.

More coming soon…

Posted by John C. Bland II at 1:50 PM | | Comments (0) | TrackBacks (0)

July 13, 2007

Flash CS3 AS3 - Remoting Sample

Hagel found this online (in the wake of my recent WS post): http://www.oscartrelles.com/archives/as3_flash_remoting_example. It is a good example of using Flash Remoting in Flash CS3’s AS3.

Remoting, at the core, has always been NetConnection anyway so Oscar’s example takes me back to my old RemotingConnector in AS2 (ahhh…the mileage it got me). :-D I haven’t looked at the core of the WebService classes in AS2 but it might be working from the same. Next week I’ll have to find out for sure though since the WS has to be integrated into the app.

Posted by John C. Bland II at 11:56 AM | | Comments (0) | TrackBacks (0)

Flash CS3 AS3 - Missing WebService Classes

:-(

:-(

:-(

That just about sums it up. Yet another reason why Flash CS3 truly misses the mark. Don’t get me wrong, I’ve found some pretty sweet things in it (TransitionManager, DocumentClass, and the granularity of MouseEvent targets rock hard!) but missing all of those components (namely Alert, Tree,  and Data components) continue to ring the phrase “Flash CS3 sucks” over and over in my head. Mind you, there are some great upgrades they made but missing so many components and a SUPER CRAPPY development environment is huge. If I were building a simple app…no prob…but I’m not.

Regrettably, I should’ve pushed even harder to use Flex. I would’ve saved tons of time (built-in container classes [vbox, hbox, etc] with scrollbars, tree component, alert component, and now web services…all having to be done custom).

:-(

:-(

:-(

Posted by John C. Bland II at 11:45 AM | | Comments (0) | TrackBacks (0)

July 11, 2007

AS3 XMLDataLoader

Unlike my previous AS2 version, this one is pretty much nothing but XML data loading, literally. I’ll get right to it and put the code in here. First, here’s how you use it:

//this would go somewhere in a class or on the timeline
XMLDataLoader.instance.addEventListener(XMLDataLoader.instance.LOAD_COMPLETE, parseMyData);
XMLDataLoader.instance.url = “my.xml”;
XMLDataLoader.instance.trigger();

private function parseMyData(event:XMLDataEvent):void{
     trace(event.data); //traces the XML data
}

Here is the XMLDataLoader class:

/**
* XML Data Loader
* @author John C. Bland II
* @version 0.1
*/

package classes.data {
    import flash.net.*;
    import flash.events.*;
    import classes.events.XMLDataEvent;
    public class XMLDataLoader extends DataLoader{
        private var _url:String = “”;
        public function get url():String{ return _url; }
        public function set url(value:String):void{ _url = value; }
        private var _loader:URLLoader = new URLLoader();
        public function XMLDataLoader(enforcer:SingletonEnforcer){
            if(enforcer null){
                throw new ArgumentError(“XMLDataLoader is a Singleton class. Use XMLDataLoader.instance.”);
                return;
            }
            _loader.addEventListener(Event.COMPLETE, onLoadComplete);
        }
        private function onLoadComplete(event:Event):void{
            var ev:XMLDataEvent = new XMLDataEvent(LOAD_COMPLETE);
            ev.data = new XML(_loader.data);
            dispatchEvent(ev);
        }
        private function onLoadFailed(event:Event):void{
            dispatchEvent(new Event(LOAD_FAILED));
        }
        public function trigger():void{
            if(_url.length 0){
                throw new Error(“XMLDataLoader.url must be set before calling trigger()”);
                return;
            }
            _loader.load(new URLRequest(_url));
        }
        /**
        * Singleton implementation
        */
        private static var _instance:XMLDataLoader;
        public static function get instance():XMLDataLoader{
            if(_instance == null) _instance = new XMLDataLoader(new SingletonEnforcer);
            return _instance;
        }
    }
}

class SingletonEnforcer{}

This is a Singleton so be sure to keep the SingletonEnforcer at the bottom of the file (inaccessible to external code). Notice there is an XMLDataEvent, which is custom.

/**
* XMLDataEvent
* @author John C. Bland II
* @version 0.1
*/

package classes.events {
    import flash.events.Event;

    public class XMLDataEvent extends Event{
        private var _data:XML;
        public function get data():XML{ return _data; }
        public function set data(value:XML):void{ _data = value; }
        public function XMLDataEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false){
            super(type, bubbles, cancelable);
        }
    }
}

That’s it. In a nutshell, add an event listener, set the url, trigger the data load, and do whatever you want with the data when it is completely loaded.

Enjoy.

Posted by John C. Bland II at 10:50 AM | | Comments (0) | TrackBacks (0)

July 9, 2007

Flash CS3 AS3: doubleClickEnabled "Gotcha"

Ok…I fought with this for wayyyyy too long, gave up, tried again tonight (for way too long), gave up, then had a thought. I went back to the help docs to re-read the instructions about using mouseEnabled as well as doubleClickEnabled…nothing new. Well, maybe something new. I noticed there was a related link to mouseChildren.

This was interesting and made me think. I noticed all stage items did not use the hand cursor. So, like all great developers, I used useHandCursor = true which works on certain parts of the items. I figured out it was because the children had mouse abilities too, which is a good default option in my opinion.

Ultimately, I remembered Ron Haberle’s code about using double click. His code (see below) was all code (just 1 sprite with a drawing) so there were no children with possible clicks.

import flash.display.Sprite;
import flash.events.MouseEvent;
var sp:Sprite = new Sprite();
sp.x = 100;
sp.y = 100;
sp.graphics.beginFill(0xe4e5e6);
sp.graphics.drawRect (0, 0, 100, 100);
sp.doubleClickEnabled = true;
sp.addEventListener(MouseEvent.DOUBLE_CLICK, handleClick);
addChild(sp);
function handleClick(evt:Event):void {
    trace(“Double Click”);
}

This didn’t work for me. Let’s get back to present day/time from the previous paragraph (before “Ultimately, …”).

All I had to add was mouseChildren = false; to my constructor and the event was firing like clockwork. :-) Good thing too. I was about to mark off this item as a CS3 bug in the bug list. LOL. Hey, when all else fails…blame the software, another sign of a great developer. LMBO. ;-)

Posted by John C. Bland II at 1:24 AM | | Comments (2) | TrackBacks (0)

July 2, 2007

Flash CS3 AirCompiler

Read more here.

Grant (Skinner) sent this to the list, over the weekend, and I had a chance to play with it. After setting it up (which he admittedly says isn’t the fastest; they’re working on it though) I was able to hit Test and have my CS3 app in an AIR window just that easy. Very nice!

Posted by John C. Bland II at 10:50 AM | | Comments (0) | TrackBacks (0)

June 26, 2007

Flash CS3: Validated Enum Values

I am working on an enum class and I needed a way, within the class, to validate the types. As any great developer would do…I started extracting the validation code. :-) lmbo. (joke @ extraction = great developer…not tooting my horn) :-D

So, the problem is simple…how do you extract validating code for an enum that will obviously change for each time? Oh, keep in mind enums in AS3 don’t exist. You simply use static properties in a class. Here is an example from the AS3 docs:

public final class PrintJobOrientation
{
    public static const LANDSCAPE:String = "landscape";
    public static const PORTRAIT:String = "portrait";
}

Nothing special there. Now, back to the problem. How do I build a base class to validate the types when I pass them to other classes? In come flash.utils.describeType().

This little function provides A LOT of details about any class and is perfect for what I need/want to accomplish. Here is a sample of the output.

<type name=”myapp.enums::BrowserTypes” base=”Class” isDynamic=”true” isFinal=”true” isStatic=”true”>
  <extendsClass type=”Class”/>
  <extendsClass type=”Object”/>
  <constant name=”IMAGE_BROWSER” type=”String”/>
  <constant name=”TEMPLATE_BROWSER” type=”String”/>
  <accessor name=”prototype” access=”readonly” type=”*” declaredBy=”Class”/>
  <factory type=”myapp.enums::BrowserTypes”>
    <extendsClass type=”myapp.enums::EnumBase”/>
    <extendsClass type=”Object”/>
  </factory>
</type>

To generate this XML, I used the following code:

import flash.utils.describeType;
import myapp.enums.BrowserTypes;
var description:XML = describeType(BrowserTypes);
trace(describeType(BrowserTypes));

That’s it. I read my entire class file and received XML info about it which means I can (duhn duhn duhn duhnnnnnnnnnnnnn [or however horns sound when they blare for you]) PARSE THE XML!! :-)

Let me get to the bottom line…here is the base class I created to validate any enum constant.

/**
* EnumBase
* @author John C. Bland II
* @version 0.1
*/

package myapp.enums {
    import flash.utils.*;
    public class EnumBase {
        public static function isValid(value:String):Boolean{
            return describeType(BrowserTypes)..constant.(@name==value).toXMLString().length > 0;
        }
    }
}

Here is the enum which extends this class.

/**
* BrowserTypes Enum
* @author John C. Bland II
* @version 0.1
*/

package myapp.enums {
    public final class BrowserTypes extends EnumBase{
        public static const TEMPLATE_BROWSER:String = “TEMPLATE_BROWSER”;
        public static const IMAGE_BROWSER:String = “IMAGE_BROWSER”;
    }
}

Pretty slick huh? The parsing merely returns a boolean if it can’t find the node with a name that matches the passed in value. :-D YUMMMMMMMMMMMMMMMY!

NOTE
This will only validate constants. You can easily change the EnumBase.isValid() method to parse whatever you want but your enum(s) should use constants anyway.

Posted by John C. Bland II at 2:17 AM | | Comments (2) | TrackBacks (0)

June 22, 2007

ActionScript 3 Tip: Dynamic attachMovie

attachMovie is gone. In AS3 you simply say new Whatever() and it creates a new instance. I posted a brief tutorial on gotoAndStop.org. What I ran into today was trying to get this to work in the instance of a dynamic clip.

In AS2, this was common practice:

var linkage:String = “Blah”;
attachMovie(linkage, “new name”, 0);

In AS3, here is how you do it:

var linkage:String = “Box”;
var DynamicClass:Class = getDefinitionByName(linkage) as Class;
addChild(new DynamicClass());

This realllllly made my day. :-D I figured I’d go ahead and post it here so others can join in on the love.

BTW, still loving FlashDevelop. ;-)

Posted by John C. Bland II at 12:33 PM | | Comments (0) | TrackBacks (0)

June 21, 2007

FlashDevelop ROCKS!

I haven’t used FlashDevelop because I had it mixed up with PrimalScript (which has a price attached to it). One of our developers has used it for quite some time. Another one just recently picked it up for this huge Flash CS3 project we’re developing. Both spoke highly about the software but I still was skeptical. My main annoyance is using two programs to build an app. Meaning, Flash CS3 for the FLA and FlashDevelop open for AS files. Small issue but it kept me away.

Last night I decided to install the beta version and I toyed with it briefly. I really liked what I saw and today I actually dev’d in it. Now, I’m not going to go feature by feature and talk about what I like/dislike (haven’t met a dislike yet but I’m sure something will be disliked) rather I’m just going to say….FlashDevelop ROCKS!!!!!!!!!!!! Seriously. I’m redev’ing some classes and the mere fact I have code hints for the AS3 library (Flash CS3’s version) AND my custom classes is GREAT!

The bottom line is…the IDE sucks for AS3 development. I really tried pushing for some development updates in the IDE (before it came out, that is) but this IDE is horrible for development, in my opinion. Sorry Adobe…it just stinks (for development).

Posted by John C. Bland II at 8:55 PM | | Comments (0) | TrackBacks (0)

June 12, 2007

Flash CS3's AS3 is not Flex 2's AS3

…and this is HIGHLY irritating. There are a lot of lil’ things that aren’t the same or simply do not exist. If CS3 was out first, I’d understand but it wasn’t. Flex 2 has been out for a year now and has been through a revision already. Why in the world did they make CS3’s AS3 suck so bad? Argggg.

You’ll see some posts regarding issues I have with CS3’s AS3 as we continue working on this RIA in CS3. We pushed hard for Flex but, for animation purposes, the client wanted CS3. :-( That was disappointing but I had no idea Flash’s CS3 was lacking in so many areas.

- Irritated in CS3

Posted by John C. Bland II at 4:07 PM | | Comments (3) | TrackBacks (0)

November 29, 2006

Took me back a bit...

…when I did a search for validating email addresses in AS 2. This is one of those things you do and never revisit until it is needed.

Well, the search results showed several results. I looked at the first one and thought “blah” so I asked a friend if he had a script. While waiting for him to review his stash, I looked down. One of the links had “Beginning OOP in AS 2.0” as the title. This sounded familiar to me. So, I clicked.

Check it out. :-) My how time passes.

If you didn’t click, it is an article I wrote a couple years back. It is funny looking at the Validator class though. I remember the email validation code was from somewhere else and I just made a class out of it. Well, the function isn’t static so you have to instantiate it. Now-a-days, I’d never do that. Simply make it static and be done. :-)

I won’t bash my old code anymore than that. I just found it quite funny that it showed up in a search.

Posted by John C. Bland II at 4:17 AM | | Comments (0) | TrackBacks (0)

November 7, 2006

Adobe hands over the AVM to Mozilla

This was an interesting move. I couldn’t wait to blog about it just to see the reaction and thoughts.

“The goal of the “Tamarin” project is to implement a high-performance, open source implementation of the ECMAScript 4th edition (ES4) language specification. The Tamarin virtual machine will be used by Mozilla within SpiderMonkey, the core JavaScript engine embedded in Firefox®, and other products based on Mozilla technology. The code will continue to be used by Adobe as part of the ActionScript™ Virtual Machine within Adobe® Flash® Player.”

Read more about the Tamarin Project to get the full scope.

Update:
Read more about the donation from Adobe.com.

Posted by John C. Bland II at 6:39 AM | | Comments (0) | TrackBacks (0)

October 9, 2006

A Concise Guide to the SWF File Format

This is pretty interesting. I don’t get into the 1’s and 0’s (left Assembly alone a few years ago)anymore so this was an interesting site. I’m not sure how they obtained this information but it seems like they just dumped the contents of a swf.

Check it out:
File format
File reference
Terminology

Posted by John C. Bland II at 8:16 AM | | Comments (0) | TrackBacks (0)

June 28, 2006

Flash Professional 9 AS 3.0 Alpha

Flash Professional 9 ActionScript 3.0 PreviewA preview of the next release of the Flash authoring tool, scheduled for release in 2007, extends the capabilities of Flash Professional 8 to include support for the new ActionScript 3.0 language in Flash Player 9.

Adobe Labs - Homepage

I'm installing it right now so I can see how it works out. It'd be super sweet to use Flash 9 in the Flash IDE and spit out some Flash projects in Player 9.

Blogged with Flock

Posted by John C. Bland II at 9:48 AM | | Comments (0) | TrackBacks (0)

Flash Player 9 is here

File size: 1,324 K
Download Time Estimate: 2 minutes @ 56K modem
Version: 9,0,16,0
Browser: Firefox, Mozilla, Netscape, Opera, and CompuServeDate
Posted: 6/27/2006
Language: English

Adobe Flash Player Download Center

If 9 is here...that means Flex 2 is on the way. :-) Get ready!

Blogged with Flock

Posted by John C. Bland II at 3:56 AM | | Comments (0) | TrackBacks (0)

May 3, 2006

Where my Flex skills met my Flash skills

Coming froma Flash background I’m so used to setting dynamic x/y coordinates by hand I took the same approach in Flex. I was doing things like this.

<mx:Canvas id="mycanvas" />
<mx:Canvas id="yourcanvas" y="{mycanvas.y+mycanvas.height+10}) />

+10 simply gave me a little extra cushion. I basically took the y position and height of mycanvas to figure out where the bottom of the clip was positioned. Here’s how simple it is using what’s readily available to you in Flex.

<mx:VBox>
     <mx:Canvas id="mycanvas" />
     <mx:Canvas id="yourcanvas" />
</mx:VBox>

I know. I said “wow” too. LOL. This is just 1 example of me leaning on Flash based layouts instead of utilizing Flex’s natural ability. I have more but this is enough for now. :-)

Posted by John C. Bland II at 3:26 PM | | Comments (0) | TrackBacks (0)

May 1, 2006

Mike Chambers Podcast on Flash Platform

Mike Chambers has released a podcast where he speaks on Flash as a Platform. He talks about Flash moving forward; including Flex, Apollo, Flash 9 (player and IDE), etc. It is worth the listen. The good thing about a podcast is you don’t have to watch anything. Just let it go and listen. :-)

Check it out here.

Posted by John C. Bland II at 4:09 PM | | Comments (0) | TrackBacks (0)

April 22, 2006

Next Flash IDE in Eclipse?

This is nothing but my thoughts and no reflection on what Adobe will do with the next version of Flash.

I was just developing an app, pretty sweet one too (NDA’d so can’t speak on it), in the Flash IDE and starting missing Visual Studio features. AS now reminds me of C# (and vice versa) so my mind wondered for a spell. I started thinking of all sorts of features the next Flash IDE could have, namely for coding, and I noticed a lot of the features I am longing for are included in the AS Editor for FlexBuilder 2.0.

This definitely makes me wonder. If Adobe is taking resources to build the entire Flex IDE in Eclipse why wouldn’t the Flash team build on top of or simply implement the same AS editor? Why rebuild the wheel?

Continue reading "Next Flash IDE in Eclipse?" »

Posted by John C. Bland II at 8:09 PM | | Comments (0) | TrackBacks (0)

Flash Player 9

This has been public for a lil’ bit now but I saw another post about it on Peter Elst’s blog and it made me want to post a link to his post. My only reason for doing so is Peter’s blog is looks sweet! :-) He’s a guru in the Flash community already so it isn’t like he needs the pub but figured I’d give a lil’.

Basically, Flash Player 8.5 is now Flash Player 9. There is a FAQ on labs here and you can read more on Peter’s blog here.

Posted by John C. Bland II at 4:01 PM | | Comments (0) | TrackBacks (0)

April 14, 2006

Delegate.create and removeEventListener

I ran into the strangest bug tonight. In my remoting calls I used

rc.addEventListener("result", Delegate.create(this, MyResultCallBack));

Well, when using removeEventListener it would remove the listener with any of my efforts. So, I decided to Google it and found out you have to store a reference to the callback (including Delegate code) then use that reference to remove the listener.

Here is the example found here.
—————————————————————————————-
bc[as].. import mx.utils.Delegate;
var dataGridDelegate:Function = Delegate.create(this,onMyDataGridChange);
myDataGrid.addEventListener(“change”, dataGridDelegate);
function onMyDataGridChange(eventObj:Object):Void
{
trace(“myDataGrid change event fired”);
}

Then, you can remove the listener with this code:

myDataGrid.removeEventListener("change", dataGridDelegate);
p. -----------------------------------------------------------

Posted by John C. Bland II at 1:49 AM | | Comments (0) | TrackBacks (0)

April 13, 2006

Active Content Developer Center

With all of the Eolas talk I figured I’d show people where to go for knowledge on still providing active content (Flash, etc) in IE.

Click here for more information.

Posted by John C. Bland II at 3:26 PM | | Comments (0) | TrackBacks (0)

February 22, 2006

Flash 7 on Mobile? Can't be...

An article called Picsel beats Macromedia to putting Flash v 7 onto mobile was posted to the FlashLite mailing list tonight. The article talks strictly about Flash 7 content not Flash Lite with Flash 7 abilities. It is kind of interesting to think another company put Flash 7 on a phone before the creators of Flash 7. I’d like to hear Adobe rep’s speak on this topic. I’m sure the list will blow up tomorrow morning once everyone reads it.

The only thing it seems they would be missing is the Flash files interaction with the phones since Flash 7 has no way of hitting softkeys, etc but Flash Lite does. If they have Flash 7 working on a phone and the .swf can interact with the phone…whoa. That would be phat!

What are your thoughts here?

Posted by John C. Bland II at 1:30 AM | | Comments (0) | TrackBacks (0)

February 19, 2006

Apollo?

I just posted on MMUG Lyris (the user group managers list) “Adobe, please buy Multidmedia.” as a plea to have desktop abilities natively in the Flash IDE which turned up a couple response. Peter Elst who, in a nut shell, stated MDM is great but
bc.. “I believe there is nothing technically stopping Multidmedia from writing an exporter for Flash 8, not sure if they would need some sort of partnership agreement for it but even without it its relatively easy to write a C-level or other Flash extension that integrates the Flash IDE with Zinc (especially since they’ve got a command line version).”

This would be super sweet to have Zinc in the Flash IDE which would GREATLY improve testing and the entire app dev process.

Continue reading "Apollo?" »

Posted by John C. Bland II at 9:11 AM | | Comments (0) | TrackBacks (0)

February 17, 2006

XAML... Flash Killer?

(In response to Cody B.’s post)

Ok. Let’s separate the two really fast and end the debate. :-)

XAML more-so equivalent to Flex than Flash. Flash can do some great things but it isn’t even comparable to Flex and they are in the same product family @ Adobe. Some thought Flex would be a Flash killer but it isn’t. For 1, Flex is built on the Flash player. It doesn’t have a physical timeline for you to utilize but MovieClips are still around so you can do things like onEnterFrame, etc.

Continue reading "XAML... Flash Killer?" »

Posted by John C. Bland II at 9:40 AM | | Comments (0) | TrackBacks (0)

February 14, 2006

Downloading Files with Save As...

Now this is plain old sweetness! :-) One of our clients needed the ability to download images for their site (mind you this is Flash) by right clicking on the image and clicking “Save As…” just like you would in an html-based site. This poses a problem in Flash.

  • Context Menu’s (the right click menu) in Flash has a problem with subelements (mc’s, etc that aren’t a direct decendent of _root).

Continue reading "Downloading Files with Save As..." »

Posted by John C. Bland II at 11:40 PM | | Comments (0) | TrackBacks (0)

C# & Flash Differences: Event Listener Assignments

Ok…me coming from Flash I was expecting some sort of method (or 3) in C# used for adding/removing event listeners and dispatching them. Well, I was terribly mistaken. :-)

While I was working on the Simple Calculator I decided to jump ahead in the dev process and peep some of the code Visual Studio was creating for me with the visual changes I was making. In doing so I found the InitializeComponent method which init’s all of the buttons, menus, etc.

Continue reading "C# & Flash Differences: Event Listener Assignments" »

Posted by John C. Bland II at 12:12 AM | | Comments (0) | TrackBacks (0)

January 28, 2006

Free .Net Remoting?

Wow, I just came across this on 5 1/2's blog and must say"Uh oh!"

Apparently the folks at The Silent Group took it upon themselves to write a free .Net Remoting gateway called Fluorine. The name isn't catchy by any means but if it allows me to use Remoting with .Net for FREE...I can get over the name.

Once I get some time to test I'll let everyone know about my trials and trib's. In the meantime, feel free to test yourself.

Posted by John C. Bland II at 8:19 AM | | Comments (0) | TrackBacks (0)

January 26, 2006

What is a Singleton?

A Singleton is an OOP pattern which is pretty sweet for several situations. Take for instance you have a data class that pulls web service data (which is what I'll be doing when I finish this post). Well, you don't necessarily want all of your other classes to have to create a new instance of the data class, set the necessary parameters, then make the call. Instead, create a Singleton, do it once, and in your classes create a reference to the instance.

Continue reading "What is a Singleton?" »

Posted by John C. Bland II at 1:23 AM | | Comments (0) | TrackBacks (0)

January 24, 2006

Jack the (_root) Hacker

I did this a while back but revisited it for a Flash module I am creating for a client. So you know how I work…I HATE CODE IN THE .fla!

If I don’t use a root hack I use an include (picked that up from Ron Haberle). I used to initialize a Controller class and that would handle all of my app code. Ron showed me how he uses an include file and I loved that even better. All of my fla’s have 1 line of code now: #include “myFLAname.as”. That just feels right to me.

Enough about includes and my flow…how about some _root hacking?!?

Peep the code below. Basically on the root (or in an include) put the first piece of code. The only thing you have to change is your class name. I conveniently named my Root.as and store it in a class folder (for this demo I called it myclass). Just replace (ctrl+f in Flash 8) myclass.Root with yourclass.ClassName and you’re done.

Now scroll a little lower and you will see the my Root class. I put the _root hack stuff inside of a comment block for clarity. That way I know I don’t have to touch that stuff anymore. From the onLoad method I call init() which is where I start initializing my app.

I owe the original code to JesterXL (aka Jesse Warden). This post is really to expose the process a little more by opening it up to my reader base as well. It is a very sweet concept and it felt GREAT to implement it tonight.

Hope this helps…

Continue reading "Jack the (_root) Hacker" »

Posted by John C. Bland II at 1:43 AM | | Comments (0) | TrackBacks (0)

January 22, 2006

Resizing Interface

A user group member asked how http://www.skyloftsmgmgrand.com/ was built so we, on the list, started discussing it briefly. In an attempt to help the member understand a little better I did an example file. It doesn’t do much but keep resizing/repositioning the background (bg) clip and make two other clips (representations of the logo and navigation for the example site) move accordingly.

Initially I did one that simply resized the bg and had the clips follow then followed it up with the code to use tweening instead. Both are super short in terms of code but get the job done.

You can download the files in the Resources -> Code Library section of FMUG.az’s site.

Continue reading "Resizing Interface" »

Posted by John C. Bland II at 1:09 AM | | Comments (0) | TrackBacks (0)

January 21, 2006

AMFPHP 1.0

GET IT WHILE IT'S HOT! AMFPHP Official Site

AMFPHP 1.0 finally hit the chopping block in December. I've been using a AMFPHP since around the time it came out and had major issues with it but loved the fact that I could still use, what to me is, the best method for database integration in Flash. The biggest problems I had were documentation (whole site dedicated to it now), debugging error messages (these have greatly improved), and datatypes (excellent expansion in 1.0).

There is still a need for an ease of use tutorial, which I'll be doing soon for FMUG.az next week, to help the beginners learn the easy way to install and start using AMFPHP. All previous tutorials I have seen deal with installing on Apache (namely dedicated boxes) and make everything sound complicated. Well, it only takes 2 steps to install.

If you have time come to the FMUG meeting or catch it on Breeze. I'll post more about AMFPHP as I use it.

Posted by John C. Bland II at 7:33 AM | | Comments (0) | TrackBacks (0)