Actionscript 3

WordPress and Flash 10x Cookbook Review

Friday, June 25th, 2010

As you may know, I have completed quite a few projects and written several posts regarding the integration of Flash and WordPress. In fact, my latest project was a complete Flash and WordPress Website called RocFolio 2.

A few weeks ago I was excited to be contacted by Packt Publishing. They asked me to review one of their books, “WordPress and Flash 10x Cookbook”. I was honored that they contacted me and excited for the opportunity to read through their book and see what I could learn. Here is the book information followed by my review.

Book Information

Full Title: WordPress and Flash 10x Cookbook
Author(s): Peter Spannagle, Sarah Soward
Pages: 268
Published: April 2010
Publisher: Packt Publishing
ISBN: 978-1-847198-82-2

My Review

The book as a whole is written well and includes over 50 simple and effective techniques on how to control certain tasks relating to Flash content in WordPress. The easy-to-follow step by step instructions, and pictures to help out those of us who are more visual, that accompany the techniques make integrating Flash and WordPress a fairly straightforward process.

This book is aimed at new or intermediate WordPress users who are interested in learning how to create the unique and media-rich sites that using plug-ins and Flash can provide, so much of the book’s content I was already fairly familiar with.  But for the newer user looking to enhance their personal or business sites and blogs, this book definitely contains strategies and techniques to help you do just that. Just remember that a working knowledge of XHTML, CSS, and graphic design is helpful and familiarity with WordPress is required, because the book does not address the basic mechanics of using WordPress itself. Also, any previous experience with Flash is helpful but not necessary.

Honestly, the Cookbook focused more on how to add, edit, and embed Flash into WordPress than an actual integration of the two, which is what I had originally thought it was going to be about. It also mentions several really nice WordPress plug-ins, some of which were strictly for helping you add and control Flash on your WordPress site, while others mentioned are to help you with SEO, Google Sitemaps, and optimizing your WordPress site as a whole. The Cookbook also delves into some Actionscript 3.0 scripting which is followed by examples paired with actual code. Here are links to some of the plug-ins the book mentions that I found to be particularly helpful tools in building a WordPress site:

Kimili Flash Embed Plugin
Dean’s FKCEditor  Plugin
Google Sitemaps XML Plugin
SEO Title Tags Plugin
FLV Embed Plugin

If you don’t know how to use these plug-ins, or have an overall desire to learn more about Flash content within WordPress, the WordPress and Flash 10x Cookbook definitely explains in detail the best way to do so. Overall, this book is a great reference and would be a helpful addition to your desk or workspace, especially if you’re a new or intermediate designer/developer. Hey, even if you’re an advanced user it could still come in handy, teaching you something you might have missed along the way as you taught yourself… we all have something to learn. Right?

Cya

Flash WordPress Template called RocFolio 2

Wednesday, May 5th, 2010

flash-wordpress-template

I have just finished my second website template, it’s a Flash WordPress Template called RocFolio 2.  This Flash WordPress Template is perfect as a portfolio or if you want to display your latest featured work in a great way. If you use wordpress, then it automatically updates itself by getting the information from your wordpress site after you make new posts. If you don’t have a wordpress blog, a sample XML file is included that you can use. This template is very easy to use, easy to setup, and easy to customize all through XML . RocFolio 2 comes with a help file and 5 different themes. The different flash themes include a Dark, Light, Bokeh, Starfield, and Two-Tone version, or you can customize the look and feel of it very easily. Also, each templates include  a contact form with error checking, and a muic player with tons of features. This Flash WordPress Template includes navigation for going between multiple Feeds (or multiple sample xml files) or external links, and another navigational menu  that can be used as social media menu that has a special random letter hover effect. Like I have said before, if you use wordpress then it automically updates itself through the RSS feed of the site, and then it automatically grabs the first image in the post to display. This template can be customizable through 4 simple XML files, uses tweener for smooth transitions, and has a 3 column layout layout with headers that have the ability to add an image, use text, or both. There are tons of other features and options, and I hope you enjoy it.

RocFolio 2 is the second version of one of my best selling items on ActiveDen.net.  First first version, RocFolio, is more geared towards being a Flash and WordPress Portfolio Template, because it can only take in a single RSS Feed, unlike RocFolio 2 where you can go between multiple rss feeds or wordpress categories.  Below is a preview image of RocFolio. It its not fully customizable by XML like RocFolio 2 is but its still really easy to use and setup through  Flash.

flash-and-wordpress-portfolio-template

Cya

Loading Multiple XML Files in Flash

Wednesday, April 21st, 2010

While working on my second version of RocFolio, I came across a few errors while trying to load multiple xml files in Flash AS3. When loading the files sometimes Flash would randomly put additional characters at the end of my xml file giving me parsing errors. So I had to figure out a way to cut those out, and I’ll try to explain real quick what I did.

So to load your XML you have to create your load and request variables and then you should create a few event listeners for progress and complete events, like this:

1
2
3
4
5
6
var loader:URLLoader = new URLLoader();
var requestURL:URLRequest = new URLRequest(xmlfilename.xml);
 
//create progress and complete event listeners for the loader, and load the urlrequest
loader.addEventListener(ProgressEvent.PROGRESS, getBytesLoop);
loader.addEventListener(Event.COMPLETE, loadXML);

Now in your loadXML function all you have to do is figure out where the xml file actually ends, and then index that spot and then cut the rest of the string out with the substring() command. Here is how you do that.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
//function loadxml loads the xml and handles assigning to places
function loadXML(e:Event):void {
 
	var dataString:String = e.target.data;
	var finalString:String = "";
	var endofString:uint;
 
        //find out where the end of the xml file is, however your set it up it should be the last closing tag, this one is </settings>
	endofString = dataString.indexOf("</settings>", 0);
 
	//cut out the good part of the xml using substring, then use 0 as your starting point to where you got your endOfString
        //make sure to add whatever amount you need to be at the end of the your last closing tag, </settings> has 11 characters in it so +11
	finalString = dataString.substring(0, endofString+11);
 
	//then assign the finalstring to your XML variable
	try {
		var theXML:XML = new XML(finalString);
	} catch (e:TypeError) {
		//loader.load(requestURL);
		trace("A TypeError has occurred : \r\t" + e);
	}
 
//then go on with setting up your XMLLists so you can access the data how you want
}

So hopefully this helps those out there that are getting weird parsing errors when trying to load multiple XML files. I know I tried finding the solution out on the web and couldn’t so that’s why I wrote this, if it helps you out please leave a comment.

Cya

New Flash Horizontal Menu

Tuesday, March 23rd, 2010


I have another file for sale on ActiveDen and it’s called Flash Horizontal Menu. This flash horizontal menu is great for any site or flash project. It is written in AS3 (Actionscript 3.0) and can be used as the navigation on any website and is super easy to use and setup. This menu supports loading swfs, going to frame labels, frame numbers, external links, and calling functions. If you want to use it in your flash file just drag and drop it. If you don’t know Flash and you are linking to several web pages, use the provided swf and XML file and you don’t even have to open up Flash. Some of the special features are that its customizable by XML, you can easily change the width and height, and a special javascript function handles the resizing in the browser. There is no need to even open the flash file, unless you want to use it in another Flash project then its just drag and drop, easily change the initial font color and the hover font color, easily change the font size and font type, easily change the space between items and navigation padding on the left to easily center it, it handles most html tags for even more customization, and you can add as many items to the menu as you want.Click the image above to view the flash in action.

Cya

Mini RocPod – XML Flash Music MP3 Player

Friday, February 19th, 2010

I have another file for sale of ActiveDen, its called Mini RocPod – XML Flash Music MP3 Player. Some of the special features of this flash mp3 player is that it is fully XML driven, it streams the mp3s, you can add unlimited amount of songs, it has auto start feature, you can auto hide the panels on start up or show them on start up, it can be easily added to actionscript3 files by just dragging and dropping. you can easily change the color of the music player through the xml, it displays album art, and it has 7 different background skins or art to choose from.  I used a lot of the same functionality as my first flash music player I creatd,  the RocPod – Flash and XML MP3 Player, but I wanted something that was a little more standard so I took out the circular scroll wheel volume controller and the ipod style menu. I still wanted to mix it up a bit so I added 7 different background arts and the hide-able panels  and appropriate settings in the xml for them. In the end I was really happy with the design.

Cya