Uncategorized
AS3 Drupal Services Framework
by Brian Hodge on Feb.02, 2010, under Uncategorized
I have been working on a framework to ease the communication between flash and drupals services module via AMFPHP.
Click here to head to the google repository
You will require an SVN client to retrieve the current versions of the individual classes.
The workflow is rather simple,
First you require the Services class, which is built around the Singleton Design pattern and cannot be instantiated directly. Please use the getInstance() method.
Once you have a reference to the SINGLE Services class instance and have set the gateway property, you may then use the public connect() method, which utilizes the System class to connect and disconnect from the database.
The Services instance maintains/holds a valid session id, and NetConnection instance, which are both required by all Service Classes.
The Service class is an Abstract class and is not intended to be instantiated, but extended by the various service classes, such as Node.as.
if you wanted node data, you merely import the Node class, instanstiate a node object passing THE Service object to it and then call getData() on the node object.
Relativity Calamity
by Brian Hodge on Mar.15, 2009, under Uncategorized
If you use a sniffer, as I spoke on before, you may have noticed that all assets loaded into your SWF are relative to the index.html, or the html file loading the main swf; Well, all but FLV’s. FLV’s are relative to the SWF file. This means that if the host swf is not in the same folder as the html file, the relative paths to XML, images, audio, etc, are different from the relative paths of FLV’s. This can cause you some problems if you are not aware of it and you merely copy and paste the path of another asset and merely change the name and extension to flv.
Hopefully this helps prove the usefulness of a sniffer to anyone that is not using one.
*Sniff*, *Sniff*. Do you smell IO resolution?
by Brian Hodge on Feb.16, 2009, under Uncategorized
A SNIFFER is a VERY POWERFUL tool that in it’s simplest form shows the data flowing through your browser.
If you often use XML files for things like a play-list, a list of images, or other assets that you wish to load at run-time, then you most certainly have ran into IO issues where a file cannot be loaded/found. After some quick research you see that you missed a directory in the path to the file/asset to load, or that you had a typo in its name. Sometimes, however, you may feel that you have all the pathings correct, and that everything looks correct, yet something is still wrong, the asset is not loading. Now it is time to meet your friend, Mr. Sniffer.
Free sniffers (Firefox – Plugins)
License Software
* charles
Once you have one of these up and running. Load a web page and watch the data flowing. Look for things like php files, or other formats that may be providing data-services. Select a .php file and look for GET or POST data output perhaps in a request tab. Play with the software and get to know it’s feature set.
If your having trouble on your own site, load it with the sniffer on, and look for indications of failure to load some sort of data, it is most likely the failing item you wish to load at run-time. A quick look at the path that was called should give an indication as to why the asset isn’t loading, and how to fix it.
AS3 Video Control: Scrubbing and click to point.
by Brian Hodge on Jan.28, 2009, under Uncategorized
Click here to watch the video.
For those of you who are familiar with Lee Brimelow and his works over at www.gotoandlearn.com some of the code may look familiar. This is because I follow his practices as best practices. I wanted to show some more video control functionality so I made a tutorial based off the work I learned from Lee. If you want to see the tutorials that precede this one head over to www.gotoandlearn.com. For the sake of file size and time I start my tutorial with a scrubbing scrollbar that controls nothing, it just merely has mouse input control. Through the tutorial I show how to add smooth and responsive video scrubbing, as well as a click to point method for the track that the scrubber slides on. Clicking the track will move the scrubber centered directly under the mouse.