|
Written by Mike Kerr
|
|
Saturday, 30 April 2011 22:29 |
|

I'm building a site that has multiple languages. The problem is that I want to use the same SWF and just change the XML text that's loaded in based on the URL in the browser. A friend recommended I use the following...
import flash.display.LoaderInfo;
var myPageURL:String = loaderInfo.url;
But this will give you the url with the swf name and extension on the end. You can use this if that's what you want to use but in my case the swf will always be the same. I could write a regular expression to remove the .swf off the end and splice the URL to get the value I want but I want to save myself the head ache. After some time digging I found this solution.
import flash.external.ExternalInterface; var pageURL:String = ExternalInterface.call('window.location.href.toString');
This will give the the URL from the browser header so I know it will be correct no matter what the URL is or what the swf is called.
|
|
Last Updated on Saturday, 30 April 2011 23:00 |
|
|
Written by Mike Kerr
|
|
Thursday, 10 March 2011 06:08 |
|
So just what is a SWC?
Adobe has this to say about SWCs
A SWC file is an archive file, sometimes also referred to as a class library, for Flex components and other assets. SWC files contain a SWF file and a catalog.xml file, in addition to properties files and other uncompiled assets such as CSS files and Blah BLAH BLAH BLAH!!! If you're interested you can read more on their live docs. But basically you can think of swcs like Flash's version of zips.
If you read my tutorial on how I setup my work space with FlashDevelop and the Flash IDE there are a few problems with it. The problem with Having Flash load your main class and then codeing within Flash develop is that when you setup all your MovieClips in your library as "Export for ActionScript" you are essentially making each MovieClip a class. The problem is FlashDevelop doesn't actually recognize these classes and you have to compile using Flash and not FlashDevelop. If you tried to compile with FlashDevelop you would get an error right away because it wouldn't know where to find any of your assets. So here I'm going to show you a cool new way to setup your FlashDevelop + Flash IDE work flow using SWCs.
|
|
Last Updated on Thursday, 10 March 2011 18:10 |
|
Written by Mike Kerr
|
|
Wednesday, 23 February 2011 06:15 |
|
I can't take credit for this but I don't think I could have written this tutorial better. This was the easiest and most comprehensive way for me to learn how to load assets with XML in Flash, using AS3.It also covers making a dynamic grid out of the data.
The tutorial doesn't build with a class structure but I've converted it... give me a few days to post how I modified the result.


|
|
Last Updated on Wednesday, 23 February 2011 06:38 |
|
Written by Mike Kerr
|
|
Wednesday, 16 February 2011 23:05 |
|

Here's my tutorial on getting all setup with FlashDevelop. This is how I start all my Flash projects. I don't claim to have the BEST way to work but it works for me and my dev co-workers don't seem to mind my files at all.
Before we begin you should have Adobe Flash CS3 or Higher and FlashDevelop. You can download a Trial of Adobe Flash from Adobe.com and FlashDevelop is Open Source which means it's free to download from their website and use for commercial use!
Get FlashDevelop Sorry if you're a Mac user... this program is PC Only (You'll have to use FLEX instead)
|
|
Last Updated on Thursday, 17 February 2011 07:22 |
|
Written by Mike Kerr
|
|
Wednesday, 16 February 2011 22:40 |
|

So at work I'm creating a dynamic video animation that will be controlled by a series of user input events. The video needs to be transparent so that we can interlay it with Flash graphics and animation. My first thought was to use AfterEffects to export out a transparent FLV. Once I loaded the FLV into my swf it was extremely choppy and pulled down the speed of everything else. I thought my issue was that the video was transparent... not so. After trying many different compression combos here's the best way I've found so far.
|
|
Last Updated on Thursday, 17 February 2011 07:22 |
|
Written by Mike Kerr
|
|
Friday, 11 February 2011 05:01 |
|

At my work I'm building a multi-user flash game using SmartFox server. We're close to completion and we ran into a bottle neck. Once we had 10 or more players the game would crash and the SmartFox server would kick everyone off. This method was to blame...
|
|
Last Updated on Thursday, 17 February 2011 07:23 |
|
|
|
|
<< Start < Prev 1 2 Next > End >>
|
|
Page 1 of 2 |