One Giant :Blog

Technology, Resources, Tips, Bugfixes, Web Design, Flash, AS3 (Actionscript), FlashDevelop, + more...

  • I've Never Let School Interfere With My Education (Mark Twain)

    Mark Twain had a million clever little sayings; one of them that I've grown to appreciate... "I've Never Let School Interfere With My Education."

    Especially in web technology, you frequently can't find the answers that you need in school.  I asked a number of professors when I was in college an impossible short answer question, "how do I succeed in business online."  I got a myriad of answers, but the best one was "If I knew that I wouldn't be here right now, would I?"  The truth is, when you're able to find a thousand more useful answers with a 2 second Google search, self-education is easier than ever... what you really need is some ambition to get it done.

    I came across this short blurb from the national CEO network, that seems to think experience and problem solving are the real keys to success.  I say add your own continuing self-education, some cash to float on, and you've got a real recipe to succeed in a new business or venture- so go for it!

    http://nationalceonetwork.com/articles/108-articles/121-entrepreneurs-find-success-through-experience-not-education

  • Finally, Smart Phones Better Than the iPhone

    It's about time major smart phone companies stepped it up, and HTC has got the right idea.  The new HTC EVO 4G is amazing.  Christ, where to begin, how about:

    • It's got a huge 4.3" high res touchscreen display (iphone is 3.5")*
    • Can be a mobile wireless hotspot for your computer / laptop! (iphone cannot)**
    • Multi-tasks multiple apps at once**
    • Runs internet browser similar to iPhone - touch & scroll, zoom, use upright or sideways, etc
    • RUNS FLASH WEBSITES FINE (no more stupid iphone blue boxes instead of flash)**
    • Turn on/off each wireless connection (GPS, 4G Connection, BlueTooth, WiFi, etc)
    • Personalize the wallpaper, UI, and home screens into modes or "Scenes" - one for work, one for home, etc**
    • Widgets (apps)
    • GPS
    • Camera has 2 Flashes**
    • Runs on 4G network (faster than iPhone 3gs)**
    • Connects to Wi-Fi networks
    • Touchscreen gestures like iPhone (scrolling, zooming, etc)
    • High quality video streaming (HQ)
    • Built in Kick Stand**

    *   = better than iPhone
    ** = non existent on the iPhone

    http://now.sprint.com/evo/?id9=SEM_Google_C_Sprint_HTC


  • Nielsen Reports on Social Media Bottom Line - People (and Their Money) Are Suckers for Their Friends

    First, a little background on Social Media in general.  One Giant Media has been watching trends in Social Media for the past couple years, as it's amazing how it continues to grow past all cynical predictions of it being a "fad" and establish opportunities for explosive growth for companies with a very low barrier to entry.  Anyone can make an app, buy some banners / ad campaigns, or run do-it-yourself facebook or twitter campaigns these days for next to nothing.  This has created somewhat of a mad gold rush to get in on the golden social traffic shower spraying some internet businesses with all the money making users they could ever hope for.  For other companies, though, it's the disappointing swing-and-a-miss.  All in all, though, there has been some stability and predictability thanks to platforms like Facebook structuring ad campaigns and apps in such a way that metrics show to some extent what works and what does not.  But one question remains- how do you make money?  Well, Nielsen has brought more of a definitive bottom line look at the answer to this bazillion dollar question.

    Nielsen's report, sparing the details, shows clearly where the money is: it's in people's friends.  Over 800,000 responses to ad campaigns by around 70 agencies show clearly that social network users are 4 times as likely to purchase (conversion) in response to earned media, as compared with purchased media.

    What does that mean?  Earned media represents different hooks, whether it be ads, or notifications, or news feed posts, that actually reference the user's friends or interests within the network rather than just a plain advertisement.  Paid media is more of the ladder- the traditional product / brand banner ads and pure "click here to lose weight" type ads.

    It's nice to have real figures to reinforce what we've seen for a long time- virality is born in social media from common interests and people's curious nature when it comes to their peers.  Think about it- if you're on facebook, and you see  a shoe ad- are you jumping at the chance to click it?  No, probably not.  Now imagine you receive a message or see something that says basically "Your friend [insert a good friend's name here] wants you to check out their hot new shoes! Click here to see what they got!"  - you're naturally much more likely to click this and even buy these shoes because on a pure logical level, you and you're friend probably like similar things.  More psychology comes into play where people will follow trends, and if you're friend is into something, you are curious to see what it is and are more likely to make similar choices.  This is the essence of why viral marketing can be so explosive and penetrate so deeply into networks of people, and always has been.  Thanks to Nielsen, though, we can say that this kind of traffic is around 4 times as profitable as the other.

     Nielsen study on social ad effectiveness

  • AS3 - Dynamic Text with Embedded Font for Nice Smooth Text , Animation, Rotation, Alpha, Fading, etc

    Dammit again, Adobe.
    Where are the Convenience Functions?

    As usual I will start out by bashing adobe for creating this pain in the ass. I don't know what happened at adobe labs but somewhere in the remake of Flash's text rendering engine for AS3 (which was an awesome improvement, no doubt), convenience functions were apparently forgotten completely and thus it takes like 15 lines of code to get 1 line of decent dynamic text going... and embedding fonts, well, that's just plain weird unless you're using the Flash IDE.

    Oh well- here's a quick how-to for dynamically getting text on stage rotating with a nice font, in FlashDevelop.

    .embedFonts = true or Text is Un-Fun and Ugly

    Basically, to fade, rotate, or even just display nicely aliased text dynamically with the FlexSDK (I'm using Flash Develop + FlexSDK) you need to embed the font to compile with the SWF and assign it to a class name (see code comments below (this is my FlashDevelop / AS3 way of doing this) . Then, in your actionscript, you need to make sure that the textfield has the following pseudo-code equivalents:

    1. textfield's .embedFonts = true
    2. textfield's .antiAliasType = ADVANCED (see code below)
    3. your text format object needs to have .font set to the class name associated with your font.
    4. set textfield's text format object to format object with desired font after ANY change to the text in the textfield (will reset format on change of text string)

    Other ways to load embedded fonts

    There are other methods of going about this.  One worth noting that has worked well for me before, is to create a SWF for each font and load / use them as text containers dynamically, setting the text on the text box placed on stage with the Flash IDE ( i.e. loadedFontMC.textBox.text = "look aliased text!").  This is a somewhat sloppy way to get flash to embed a font, but it's a cool way to support LOTS of fonts externally without compiling them into and bloating the SWF.  This way, you don't have to preload them all just to run the app- plus using the Flash IDE is easy to choose the character sets from the  Flash properties menu and do more with the mouse than with code...

    However, I find that for most purposes you only need 1 or 2 nice embedded fonts to cover all content and titles.  For that type of purpose, I prefer this dynamic style method as it is pure AS3 + actual font .ttf files, and has no other dependencies on external files.  Wrap this up in a nice class for yourself so you can just pass a font name as a parameter and don't have to deal with this again.  Maybe I'll post something like that soon... until then:

    A Simple Demo Class Ready for FlashDevelop

    You will, as usual, need the FlexSDK downloaded on your computer and attached to your project either by classpath, flexSDK settings in program settings, or by attaching .swc to your project library... take your pic.

    Here's a full Main.as class that you can drop into a pure AS3 FlashDevelop project src/ directory and get your embedded font tested / working. Then, you can copy and paste the working code into your other projects.  Follow the instructions in the comments for adding the actual font's .ttf file to your lib/ directory (could be any directory really as long as the path is correct in your embed tag).

    ** Please note that this will embed the whole font into your compiled SWF (all crazy characters included).  To greatly reduce the size of the font added to the SWF, look into specifying the character set using the Embed tag and just embed the characters you need (like A-Z 0-1 and punctuation, not all the unnecessary German umlauts and whatnot).

    "Embed Font and Rotate Test" 
    Main.as Source:

    package 
    {
    	import flash.display.DisplayObject;
    	import flash.display.Sprite;
    	import flash.events.Event;
    	import flash.events.TimerEvent;
    	import flash.text.AntiAliasType;
    	import flash.text.TextField;
    	import flash.text.TextFieldAutoSize;
    	import flash.text.TextFormat;
    	import flash.text.TextFormatAlign;
    	import flash.utils.Timer;
    	
    	/**
    	 * This is a simple font embedding test that rotates the text to show if embedding worked properly.  
    	 * start by creating a new flash develop project and replacing the contents of the Main.as file with this entire source code
    	 * 1) Right click the "lib" folder in the project tab and then pick a font from your fonts folder.  
    	 * 2) Once the font file is added to the project view lib/ folder, right click the font and choose "Insert Into Document" to generate the basic Embed tag
    	 * 3) add the fontFamily="FontClassName" to the embed tag properties and no semi colon at the end of the line so it will link to the next line
    	 * 4) Add your class variable on the next line like... ((( public var FontClassName:Class; ))) with the same name as fontFamily
    	 * 5) Use any textField.embedFonts and textFormat.font = FontClassName to set the font.
    	 * 6) Rotation test below will demonstrate if it worked or not, non-embedded fonts will not rotate (will just disappear and not render until rotation is 0 again)
    	 * @author One Giant Media
    	 */
    	public class Main extends Sprite 
    	{	
    		//[Embed(source = '../../..some_path_use_FD_AddToProject_RCmenu../FDproject/lib/FooFont.ttf', fontFamily="FooFont")]
    		[Embed(source='../lib/GOTHIC.TTF', fontFamily="FooFont")]
    		public var FooFont:Class;
    		
    		private var _textField:TextField;
    		
    		public function Main():void {
    			if (stage) init();
    			else addEventListener(Event.ADDED_TO_STAGE, init);
    		}
    		
    		private function init(e:Event = null):void {
    			removeEventListener(Event.ADDED_TO_STAGE, init);
    			// entry point
    			
    			// create text
    			_textField = createTestText("test some text here");
    			
    			// rotation test
    			var rotateIt:Timer = new Timer(1 / 28);
    			rotateIt.addEventListener(TimerEvent.TIMER, rotateText);
    			rotateIt.start();
    		}
    		
    		public function createTestText($text:String):TextField {
    			var t:TextField = new TextField();
    				t.antiAliasType = AntiAliasType.ADVANCED;
    				t.embedFonts = true;
    				t.autoSize = TextFieldAutoSize.LEFT;
    				t.text = $text;
    				t.x = stage.stageWidth / 2;
    				t.y = stage.stageHeight / 2;
    				
    			var f:TextFormat = new TextFormat();
    				f.font = "FooFont";
    				f.align = TextFormatAlign.CENTER;
    				f.color = 0x333333;
    				f.size = 28;
    				
    			t.setTextFormat(f);
    			
    			return addChild(t) as TextField;
    		}
    		
    		private function rotateText(e:TimerEvent = null):void {
    			_textField.rotation++;
    		}	
    	}
    }
    

  • One Giant CMS - a Powerful, Flexible, and Easy Content Management System

    One Giant CMS (Content Management System)

    We Did It!

    We've done it- eliminated one of the most frustrating parts of building your business online - editing & adding to your website on-demand. One Giant Media is proud to announce the newest version of our Content Management System - the One Giant CMS 1.2.

    Endless Problems.
    One Solution to End Them All.

    Have you ever wanted, or worse, needed to change or do something on your website but you couldn't figure out how? Or maybe it just didn't do quite what you wanted it to? It seems like with even the most popular open-source CMS platforms, the deeper you get into it the worse it gets.  It's an unnecessary and annoying problem that millions of websites have, and the One Giant CMS is the perfect solution. If you've used other content management systems, you probably know how confusing it can be, and what a headache it is to have the design changed or new sections & features added. It was from this exact same frustration with a client's system that we decided to put an end to this common dilemma. We set out to build the end-all solution- a flexible system that makes sense to non-tech savvy people and has no limitations for developers. What a relief it is to build a site on a system that makes sense - a stable CMS that is both easy to use and able to expand your site along with the pace of your business. And - if that's not enough - rest assured, it's only going to get better with each version.

    As Easy as Email.

    With the OG CMS you can add or edit your content quickly and easily- save changes, publish live to the web, or revert a live page back to a previous version. There's no code, no tech jargon, nothing confusing- just access to each and every page in your website from an easy menu, and an intuitive straightforward interface to breeze through adding or editing or removing content. Use the familiar email-like formatting toolbar to edit content like you would in your usual email software- add a picture, bold or italicize text, add links, bullet lists, and much more.  If you are the hands-on type and know some HTML or CSS, you can even press a button to flip back and forth between HTML-view and normal content views.

    Built to Grow

    As your business and needs grow and evolve, you will encounter new challenges that beg for new solutions like e-commerce (online stores), new flash features, press releases, customer facing services, scheduling widgets, galleries, new pages, limited access for new employees that need to edit the site, or just about anything! This can be a nightmare for some websites that just built "the basics" with another CMS or no CMS - which can mean choosing a whole new system and/or rebuilding the site again from scratch... Yikes! Not for sites powered by the One Giant CMS! Start small and build as you go! Our system can be extended with pre-made or new custom modules and widgets at any point, enabling us to install something new like a blog, store, flash gallery, or just about anything on your website without ever having to rebuild later! This kind of extendability and planning is built into the framework of every install of our CMS and it will keep your site ready to grow and expand as your business does- giving you that web-business edge and saving you time and money in the long run.

    Design Flexible

    Many CMS platforms are pretty involved to create and integrate a custom design- and then once you've got everything in place finally, changing the design around or adding unique features to certain pages can be a nightmare! Not with the One Giant CMS. In our system every page has an ability to use a different template from the main design with 1 simple "template name" option. Change the colors of the website for different parts of your business, or maybe use a whole different color for a key product's branding. Create landing pages, white labels, or micro-sites that don't look like your website and run it all with one easy system! If that's not powerful flexibility- when it's time for a redesign swap out the entire default template design and launch a whole new look instantly without having to touch any of the content or data- no down-time!

    Make Mistakes. It's ok!

    Mistakes will be made- typos, bad sentences, whatever it might be. With the OG CMS you can easily reload any previous version of a page with 1 simple menu. So, don't be afraid to publish your content, you have unlimited undo's!

    Fits Unique Businesses Like a Glove

    Do you have unique requirements or new idea that doesn't fit most CMS systems?  Have a proprietary application or interactive site you can't seem to integrate with anything? Maybe there's a specific feature you can't find anywhere else? We can build and install a custom module or widget that will do exactly what your specific needs require- especially if it's never been done before.

    Manage Flash Content

    One of the most common issues with flash content is that it's often not editable content, and has to be rebuilt and redeployed for an edit. Not anymore! Special flash modules manage content for the majority of our flash features allowing you to change up the fancy flash content on your site to keep your homepage fresh and engaging!

    Unlimited Users & Permissions

    Add as many users as you want and assign each one with access to as much or as little of the content as you want.  Great if you have copywriters or other staff members that need access to only certain pages.  This way, nobody can delete the homepage by accident or post a surprise announcement to the world :)

    SEO Optimized

    Add as much content as you want- it's automatically SEO optimized! Window titles, page titles, headings, navigation, tag clouds, and more can all automatically generate in a way that search engines like Google want it. This naturally builds up your site's organic search results and traffic.

  • Maximize the Web Browser Window with JavaScript

    This handy little JavaScript two-liner will resize the browser window to the users full screen size and position it flush top / left so that it appears maximized. Flash's full screen is much more seamless, eliminating the address bar and all of that as well, but with no flash, this will do.

    <script language="javascript">
    self.moveTo(0,0);
    self.resizeTo(screen.availWidth,screen.availHeight);
    </script>

  • The Best Animation Engine for Flash / Flex - A Developer's Must-Have for Actionscript

    This is one of those things that is so good, you almost want to keep it to yourself just to have your own secret weapon.  Unfortunately, the generous author of such an ActionScript library, Jack Doyle, is such a good programmer and has given so much to the community that I feel obligated to pay it forward.

    IMHO- the Greensock Tweening Platform, TweenLite, TweenMax, etc... is the best animation engine and as3 utility library ever made.

    The Fastest.
    You can use the benchmarking application jack has on his site to test his engine with a particle generator script- check it's performance against Tweener, Flash, and other major tweening engines and the comparison is obvious- the particles fly fast and smooth at a much, MUCH higher count than any of the other engines can handle without looking like 3 fps.

    The Easiest.
    Besides being ridiculously easy to use with a quick 1-liner syntax, you can add event handlers and other interesting things all in line.  Here's a 1 second slide/fade in that cues a function called "nextAnimation()":

    TweenLite.to(anyObject, 1, {x: 100, ease: Strong.easeOut, alpha: 1, onComplete: nextAnimation} );

    The Smoothest.
    Watch your animations slide across the screen smoothly with plenty of well optimized easing classes included with the library.

    Thanks and kudos to Jack and his excellent work, the Greensock library has become a not-so-secret weapon for many flash developers. Check out the Greensock site to see how many other awesome classes you can get for things like full screen layouts, filter tweening, sequencing, easing, managing XML, and a lot more.

    Get the Greensock Tweening Platform and other great actionscript classes here.

  • Google Announces That Internet Explorer 6.0 Won't Be Supported

    Google's web developers must have rejoiced today with Google's public email announcement to Google Apps users that it will no longer be supporting Internet Explorer 6.0 for any of it's services, including services like Google Docs and Google Analytics.  Web developers are very familiar with what a pain developing for IE6 is, and how bad bugs Internet Explorer 6.0 can be- it will definitely not be missed.

    Quote from Google's email:

    "In order to continue to improve our products and deliver more sophisticated features and performance ... As a result, over the course of 2010, we will be phasing out support for Microsoft Internet Explorer 6.0 as well as other older browsers that are not supported by their own manufacturers."

    It's true- IE6 is so bad not even Microsoft wants to take any responsibility for it.  This will be good for non-savvy non-wev developer types too as IE6 is known to be a walking trojan virus, hijack, malware, adware, spyware basically every other (insert bad prefix)ware in existance.

    The truth is, you really should avoid using any version of Microsoft Internet Explorer.  More about how scary IE is in general (and why the German government banned it entirely) in a recent post:

    Yet Another Scary Reason to Avoid Internet Explorer - Use Firefox or Get Hacked

     


  • The Usual Suspects: 14 Common Web-Safe Fonts

    Here are common fonts that are considered "web-safe" - meaning they are commonly found on almost all Windows and Mac systems and will be displayed in most web browsers for these operating systems. Sorry Ubuntu, you're still just the random guy in the internet corner.  ;)

    Of course, if text is created as an image, font support is not an issue as the font is only needed on the computer that creates the image. Also, in Flash content any font can be "embedded" in the movie so to be supported wherever it is viewed. 

    Arial ~ Arial ~ Arial
    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas volutpat velit ut magna porttitor eget suscipit tellus pellentesque. Fusce ac augue sem. Quisque consectetur sagittis quam vel suscipit. Duis ut enim leo. Suspendisse potenti. Etiam dolor justo, lobortis nec imperdiet facilisis, hendrerit vitae eros. Duis vitae suscipit ipsum.

    Verdana ~ Verdana - Verdana
    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas volutpat velit ut magna porttitor eget suscipit tellus pellentesque. Fusce ac augue sem. Quisque consectetur sagittis quam vel suscipit. Duis ut enim leo. Suspendisse potenti. Etiam dolor justo, lobortis nec imperdiet facilisis, hendrerit vitae eros. Duis vitae suscipit ipsum.

    Tahoma ~ Tahoma - Tahoma
    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas volutpat velit ut magna porttitor eget suscipit tellus pellentesque. Fusce ac augue sem. Quisque consectetur sagittis quam vel suscipit. Duis ut enim leo. Suspendisse potenti. Etiam dolor justo, lobortis nec imperdiet facilisis, hendrerit vitae eros. Duis vitae suscipit ipsum.

    Times New Roman ~ Times New Roman - Times New Roman
    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas volutpat velit ut magna porttitor eget suscipit tellus pellentesque. Fusce ac augue sem. Quisque consectetur sagittis quam vel suscipit. Duis ut enim leo. Suspendisse potenti. Etiam dolor justo, lobortis nec imperdiet facilisis, hendrerit vitae eros. Duis vitae suscipit ipsum.

    Georgia ~ Georgia - Georgia
    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas volutpat velit ut magna porttitor eget suscipit tellus pellentesque. Fusce ac augue sem. Quisque consectetur sagittis quam vel suscipit. Duis ut enim leo. Suspendisse potenti. Etiam dolor justo, lobortis nec imperdiet facilisis, hendrerit vitae eros. Duis vitae suscipit ipsum.

    Century Gothic ~ Century Gothic - Century Gothic
    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas volutpat velit ut magna porttitor eget suscipit tellus pellentesque. Fusce ac augue sem. Quisque consectetur sagittis quam vel suscipit. Duis ut enim leo. Suspendisse potenti. Etiam dolor justo, lobortis nec imperdiet facilisis, hendrerit vitae eros. Duis vitae suscipit ipsum.

    Trebuchet MS ~ Trebuchet MS - Trebuchet MS
    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas volutpat velit ut magna porttitor eget suscipit tellus pellentesque. Fusce ac augue sem. Quisque consectetur sagittis quam vel suscipit. Duis ut enim leo. Suspendisse potenti. Etiam dolor justo, lobortis nec imperdiet facilisis, hendrerit vitae eros. Duis vitae suscipit ipsum.

    Lucida Sans Unicode ~ Lucida Sans Unicode - Lucida Sans Unicode
    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas volutpat velit ut magna porttitor eget suscipit tellus pellentesque. Fusce ac augue sem. Quisque consectetur sagittis quam vel suscipit. Duis ut enim leo. Suspendisse potenti. Etiam dolor justo, lobortis nec imperdiet facilisis, hendrerit vitae eros. Duis vitae suscipit ipsum.

    Arial Narrow ~ Arial Narrow - Arial Narrow
    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas volutpat velit ut magna porttitor eget suscipit tellus pellentesque. Fusce ac augue sem. Quisque consectetur sagittis quam vel suscipit. Duis ut enim leo. Suspendisse potenti. Etiam dolor justo, lobortis nec imperdiet facilisis, hendrerit vitae eros. Duis vitae suscipit ipsum.

    Copperplate Gothic Light ~ Copperplate Gothic Light - Copperplate Gothic Light
    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas volutpat velit ut magna porttitor eget suscipit tellus pellentesque. Fusce ac augue sem. Quisque consectetur sagittis quam vel suscipit. Duis ut enim leo. Suspendisse potenti. Etiam dolor justo, lobortis nec imperdiet facilisis, hendrerit vitae eros. Duis vitae suscipit ipsum.

    Lucida Console ~ Lucida Console - Lucida Console
    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas volutpat velit ut magna porttitor eget suscipit tellus pellentesque. Fusce ac augue sem. Quisque consectetur sagittis quam vel suscipit. Duis ut enim leo. Suspendisse potenti. Etiam dolor justo, lobortis nec imperdiet facilisis, hendrerit vitae eros. Duis vitae suscipit ipsum.

    Courier New ~ Courier New - Courier New
    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas volutpat velit ut magna porttitor eget suscipit tellus pellentesque. Fusce ac augue sem. Quisque consectetur sagittis quam vel suscipit. Duis ut enim leo. Suspendisse potenti. Etiam dolor justo, lobortis nec imperdiet facilisis, hendrerit vitae eros. Duis vitae suscipit ipsum.

    Impact ~ impact - impact
    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas volutpat velit ut magna porttitor eget suscipit tellus pellentesque. Fusce ac augue sem. Quisque consectetur sagittis quam vel suscipit. Duis ut enim leo. Suspendisse potenti. Etiam dolor justo, lobortis nec imperdiet facilisis, hendrerit vitae eros. Duis vitae suscipit ipsum.

    Arial Black ~ Arial Black - Arial Black
    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas volutpat velit ut magna porttitor eget suscipit tellus pellentesque. Fusce ac augue sem. Quisque consectetur sagittis quam vel suscipit. Duis ut enim leo. Suspendisse potenti. Etiam dolor justo, lobortis nec imperdiet facilisis, hendrerit vitae eros. Duis vitae suscipit ipsum.

  • FlashDevelop Not Tracing / No Output (Fix)

    AS3 FlashDevelop project tracing will only work if you have the Debugger version of FlashPlayer installed.  With the debugger version you will also get flash pop-up messages from the web browser when an error occurs in the flash movie.

    1)  You will need to select a TestMovie option that works, I use "play in popup" which seems to use the operating system's default browser.  Set FlashDevelop's "Test Movie" option here:

    FlashDevelop Top Menu -> Project -> Properties -> Output (tab) -> Test Movie (dropdown) -> Play in Popup

    2)  You need to install the debug flash player for the right browser, there is one for IE (internet explorer) and one for Netscape/Mozilla (FireFox).

    Since FlashDevelop uses your operating system's default web browser for the "play in popup", that's the one you want to install the debug player for (which should be FireFox if it isn't already - click here to see how to set default browser in Vista).  Install it for both, if you want.  I like to have one browser with debugger version and one with regular flash player just for testing both.

    You can download the debugger player from adobe here:

    Adobe Flash Player 10 — Debugger Versions (aka debug players or content debuggers)

  • Organize Your Windows Desktop Icons Quick and Easy

    I've tried a few different desktop organizers for windows, and this one is, in my opinion, the best (easiest, quickest, simplest, nice looking)

    http://www.stardock.com/products/fences/

     It's a great app that will allow you to drag out labeled boxes on your desktop so that you can drop desktop icons into groups.  You can then drag, size, move and place the groups as you wish around your desktop and it will retain your layout after startup.

    My desktop used to be cluttered and now it is beautiful.  :)

  • How To Set Firefox as Default Browser in Windows Vista

    To set FireFox as the default browser for Windows, open firefox and go to:

    Tools -> Options -> Advanced -> General (tab)   and check the box that says "Always check to see if FireFox is the default browser on startup", and then click "check now"

    If firefox says something like "Firefox is already the default browser" but another browser loads sometimes, use this method to force FireFox as the default browser:

    1) Open "Run..." in windows (start menu, type run, press enter)

    2) Copy / paste this into the run text box:    firefox.exe -silent -setDefaultBrowser
    (and then press enter or click OK)

    reference page:  http://kb.mozillazine.org/Default_browser

  • How to get music off an iPod or iPhone 3g / 3gs (firmware 2.x+)

    Ah Apple, you jerks!  With all of your smug commercials about how much better your products are than Microsoft, you would think iTunes would be less annoying!  Nope!  Just when you thought you had a workable solution to an annoying problem, Apple goes and makes it even more annoying, all over again.  Doht!  Don't worry, thanks to the rockstar nerds of the world, there will always be new workable solutions.

    *This is  a follow up to the previous article  addressing the same problem (1st gen iphone or ipod devices):
    (http://www.onegiantmedia.com/how-to-get-music-off-an-ipod-or-iphone)

    Problem:

    How to get your music off your iPhone or iPod so that you may take the music to another computer- this may be necessary if you have an existing iPhone/iPod that was synced with one computer, and then:

    • You get a new computer and want your music from your iPod / iPhone
    • You have to reformat your hard drive and your only copy of your music is on the iPhone/iPod
    • You want to bring your music to another computer via iPhone/iPod
    • You want to merge your iTunes library from home with your iTunes library at work (new computer)
    • You want to back up your entire device

    The problem is, on the 2nd or new computer (not the original synced computer) iTunes will want to erase the device to sync up.  Lame!

    Solution 1:  Copy all music off iPhone / iPod manually, reimport wherever you want

    1)  Use alternate software (options listed below) to copy all of your music from your iPhone down onto your computer safely (see links below)
    2) Let iTunes do it's annoying business (connect your device, activate your acct, sync/erase all of your music off the device)
    3) Import all of your music that you manually saved to your computer back into itunes
    4) Re-sync now that your entire library is in iTunes, getting it all back onto the device

    Software Options:

    There are many new software packages for purchase around $20, but there are still some free options too.

    Wikipedia's list of Software - most can copy music off your iPod / iPhone:

    Free software recommended (in wiki list):

    Free software recommended (not in wiki list):

    Pay software recommended (in wiki):

    Solution 2:  Hack itunes so that it will sync with both computers

    You will need the original sync'd computer with itunes still on it to pull your registration key, then insert it manually into the new computer's itunes via hex editor.  It's easier than it sounds, just follow the instructions carefully.

    Great article / instructions here:  

    http://www.andrewgrant.org/2008/03/30/how-to-sync-an-iphone-with-two-or-more-computers.html

    Note:  This is only if you want to use the same account on multiple computers, don't do this to a friend's computer or their itunes will be permanently on your account.  If you want to just share your whole library use steps 1 and 2 from Solution 1.

  • XML to Flash / Flex text field - line break instead of \n or <br>

    I was trying to put a line break in my XML file and wasn't working.  I came across this blog and finally found the answer!

     And the answer is...

    &#xD;

    Hope this helps!

    Found here: http://viviangper.wordpress.com/2008/06/17/xml-line-break-in-flash/ 

  • Parsing XML in Actionscript (AS2 / AS3, Flash / Flex) - the EASY way

    AS2

    If you've come from a longer history with Actionscript & XML. you may have written some pretty elaborate / gnarly AS1/AS2 XML parsers in the past- and you probably know what a pain that can be.  (especially when someone tells you to change the spec!)

    If you are stuck in corporate America and thus still working in AS2, save yourself more headaches and get Jack Doyle's Greensock XML manager.  XPATH is great too, but this might be easier.  It allows you to convert XML to Object with arrays and properties, and reference nodes by name.  All in all, it's very well documented / explained with examples and very easy to use- yet another useful and stable class from Jack:

    http://blog.greensock.com/xmlparseras2/

    AS3

    If you are in AS3, you don't need much to parse XML anymore, thanks to E4X (an ECMA script approach to XML).  In fact...

    ...if you've written any for() loops to parse XML, you've already gone too far!!!

     

    Here's a great tutorial on E4X from Senocular:

    http://www.senocular.com/flash/tutorials/as3withflashcs3/?page=4#e4x 

    Here's another at dispatchEvent:

    http://dispatchevent.org/roger/as3-e4x-rundown/

  • HTML CSS Tip: Horizontal List - UL LI tags

     

    To make an HTML list appear horizontally instead of stacked vertically, simpy set the list item tag's display style to "inline" in your CSS file or style attribute, and be sure your container element's width is wide enough for the list items to be stacked horizontally.

    example:

    .exHorizontalListClass {

      /* Horizontal List Items: */ 
      display: inline;

      /* To remove bullets: */
      list-style: none;

    }

     

  • Shorter than Shortcuts - Best Free Windows App - A Must Have for Computer Professionals

    Make Windows way, way less annoying.



    http://humanized.com/enso/

    Enso is a free application for windows that allows you to use your computer with instant short-cut commands that you can type in plain English while in any (or no) application to do things that usually entire reaching for the mouse, shaking it around to find it, going to the start menu, scanning the list, maybe go to submenus, etc... etc... etc...  FORGET THAT

    For all my MacBoy friends, let me start by saying mac already has this basically built in with CTRL+SPACE or whatever... CONGRATULATIONS - I like Enso better :-P

    If you're a daily Windows Vista user, you may know you can press the "window" key and then type into the search area to find things quickly.  This is OK, but kind of slow and you can't make custom commands or type out Enlgish like "open Firefox".

    If you are comfortable typing on a keyboard, and you don't have this application, you're missing out!  (and probably wasting tons of time a couple seconds at a time, hundreds of times a day, every day).

    Without touching your mouse, you can set easy commands to do things like:

    • open a program
    • google something
    • google-map
    • spellcheck something
    • find on wikipedia, ask.com, yahoo, youtube..
    • get the definition of a word
    • close a window
    • switch to a window
    • minimize
    • maximize
    • count words highlighted
    • count characters highlighted
    • calculate math equations (eg: 23423432 * 713.4 - 20938123) on the spot in any text in any window
    • skip to the next track in itunes, winamp, pandora's box, others...
    • play an artist by name in compatible players (like itunes)
    • play song by name
    • mute/unmute
    • set new commands
    • remove old commands
    • + a lot more...

    Many of these commands will use any currently highlighted text in any program.

    Use case example: 

    Your scanning a Microsoft Word document and you don't know the definition - highlight it, hold CAPSLOCK, and type "define" or "google" and release.  You won't even have to type the whole word before it guesses which command you were intending.  Your browser opens right to the page you needed, you read it, hold CAPSLOCK and type "cl" and let go- it guesses "close" your browser closes and your back.  Then as a bonus you hold CAPSLOCK and type "Next Tr" and let go, it guesses "Next Track" and your music changes to the next song. 

    AWESOME.

    I've probably typed "open My Doc" for My Documents about 500 times in the past couple months, and never had to find the icon in my start menu or on my desktop. 

    Do I even have a start menu? :)

    It takes some getting used to but not much (a day or two of using it). You'll be amazed you ever used a windows computer without it!

  • PHP Opening Posted

    Are you an expert PHP developer available for part-time work?  Please review our requirements on our openings page and let us know if you sound like a match!

  • AS3 MovieClip / Sprite / DisplayObejct Filters does not work like Array - .push() .pop() .slice()

    To apply effects filters to display objects (sprites, movie clips, etc) ActionScript 3 display objects have a nice little .filters property that allows you to set an Array of effects filters at runtime.  This is great for effects like Bevel, Drop Shadow, Glow, Blur, Inner Shadow, KnockOut, etc..

    ex:

    (assuming you've created the filter instances myBevelFilter, myGlowFilter, myDropShadowFilter)

    1) Works:

    _myMovieClip.filters = [myBevelFilter, myGlowFilter, myDropShadowFilter];

    2) Works:

    var fx:Array = new Array();
    fx.push(myBevelFilter);
    fx.push(myGlowFilter);
    fx.push(myDropShadowFilter);

    _myMovieClip.filters = fX;

    3) Doesn't Work:

     _myMovieClip.filters.push(myBevelFilter);
     _myMovieClip.filters.push(myGlowFilter);
     _myMovieClip.filters.push(myDropShadowFilter);

    You're not doing anything wrong, this is just how Adobe has created the filters property.  From AS3 docs:

    Changing filters at run time

    If a display object already has one or more filters applied to it, you can’t change the set of filters by adding additional filters to or removing filters from the filters property array. Instead, to add to or change the set of filters being applied, you must make your changes to a separate array, then assign that array to the filters property of the display object for the filters to be applied to the object. The simplest way to do this is to read the filters property array into an Array variable and make your modifications to this temporary array. You then reassign this array back to the filters property of the display object. In more complex cases, you might need to keep a separate master array of filters. You make any changes to that master filter array, and reassign the master array to the display object’s filters property after each change.

    http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS5b3ccc516d4fbf351e63e3d118a9b90204-7db3.html

    AS3 Filters:

    http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS5b3ccc516d4fbf351e63e3d118a9b90204-7dba.html

  • Common Flash/Flex AS3 Mistake... Loader Doesn't Work - No Events Working When Loading External URLs

    If you seem to have everything set up correctly with a Loader class instance, but there's just nothing happening... You probably made the same mistake I've made a number of times when coding a little too quickly:  attaching the event listeners to the Loader object itself, rather than your loader's property: .contentLoaderInfo - where all the information and events on loading status actually occur.

    For example...

     The Common Wrong Way:


    var myLoader:Loader = new Loader();
    myLoader.addEventListener(Event.COMPLETE, onLoadComplete);
    myLoader.load( new URLRequest("externalExampleImage.jpg") );

    ...and then you wonder why the event never fires, there is no error, and you know your image is there... doht!

    The Right Way:


    var myLoader:Loader = new Loader();
    myLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadComplete);
    myLoader.load( new URLRequest("externalExampleImage.jpg") );

    ... works every time!

    Adobe Documentation Reference:

    http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/display/LoaderInfo.html

  • FlashDevelop Error Creating New AS3 Projects in an Existing Project's Directory

    If you try to create a new as3 project in a directory of an existing project, you may get this error:

    Could not create the requested project:  The file '...\expressInstall.swf' already exists.

    ...or similar error for "swfobject.js'

    Careful!Don't delete these files or remove bin/ and create a new project b/c it will overwrite existing classes like Main.as!

    Your best bet is to copy your the entire existing project directory to a new directory and create a new project there. Then, copy over whatever is overwritten into the new project directory, and test build.

  • Hex Codes: The ONE Website You Need

     

    Do you find yourself always looking for hex codes?  Either a specific color code, matching colors, etc.?  If so, bookmark this page right now!!  http://kuler.adobe.com/#create/fromacolor

     Your google searches for hex codes ends now. :) Enjoy!

     

     

  • Get Rid of Annoying Outlook Reminders That Cannot Be Removed / Found

    This really, really annoying bug started popping up for me not too long ago when a co-worker created some reoccurring  event in outlook that I accepted as attending, and at some point she must have removed it incorrectly or something, because it would always come up as "Canceled:" but when I would try to dismiss or OK it... I would always get this error message prompt (every freakin' day!):

    "Cannot turn off the reminder.  You may be reminded again.  Cannot locate recurrence information for this appointment"

    Solutions:

    1)  /cleanreminders

    First, try launching Outlook.exe with the “/cleanreminders” command line argument:

    C:\Program Files\Microsoft Office\Office12\OUTLOOK.EXE /cleanreminders

    2) Use Microsoft utility MFCMAPI manually remove the entry (not hard at all)

    If solution 1 does not work
    Download MFCMAPI tool from http://support.microsoft.com/?ID=291794

    1. Run MFCMAPI on the desktop

    2. Go to Session->Logon and Display Store Table

    3. Select your profile by name

    4. Right click Mailbox and choose “Open Store”

    5. Expand “Root Container”

    6. Find & Right click “Reminders” and select “Open Contents Table”

    7. New Window Launches with list of Reminders

    8. Select only the reminder items that you want to remove, Right click and select “Delete Message”

    9. Close MFCMAPI

    Restart outlook- you should not have those annoying reminders any more.

  • Flash/Flex AS3 - How to Select / Highlight All Text in an Input Text Field On Click

    This took forever to google for some reason...

    Issue:

    You want an input textbox to highlight everything in it when the user clicks it (on focus). Problem is, when the user clicks the text box places the carat, thus un-highlighting the text. I could be wrong, but the second problem seems to be that if you use the FocusEvent.FOCUS_IN event setting selection doesn't work, so you're forced to use MouseEvent.CLICK event... but if you highlight the entire box every time the user clicks, the user can't select any text because it always just highlights the entire box... also, once the box has been highlighted once, you want the user to be able to place the carat without re-selecting the entire box again.

    Solution:

    What you want to do is check if the user is highlighting or if the box was already highlighted since last focus, and if not, stop flash player from putting the carat at the location clicked with event.preventDefault() function, and then set selection from beginning to end. Event.preventDefault() is a sneaky little function you call right on the event object in your event handler, and it prevents whatever the default actions would be for that event (in this case, clear selected text and place carat)

    as3 code example:

    // assuming you have a textbox input called _myTextInputBox
    
    import flash.events.FocusEvent;
    import flash.events.MouseEvent;
    import flash.text.TextField;
    
    _myTextInputBox.addEventListener(MouseEvent.CLICK, onClickTextBox);
    _myTextInputBox.addEventListener(FocusEvent.FOCUS_OUT, onTextBoxLoseFocus);
    
    var _highlightTextOnClick:Boolean = true;
    
    function onClickTextBox(e:Event):void {
    
      var didUserHighlight:Boolean = Boolean(e.target.selectionBeginIndex != e.target.selectionEndIndex);
    			
      if ( _highlightTextOnClick && !didUserHighlight)  {
        e.preventDefault();
        e.target.setSelection(0, e.target.text.length);
        _highlightTextOnClick = false;
      }
    
    }
    
    function onTextBoxLoseFocus(e:FocusEvent):void 
    {
      _highlightTextOnClick = true;
    }
    
  • AS3 / Flash / FlashDevelop - scaleY = 0 ... Bug with scaleY value on Custom Class

    I haven't found much on the web about this...

    Issue:

    Has anyone experienced an issue where a custom class extending a library MovieClip instantiated on stage has an initial scaleY value of 0, but scaleX is 1?

    example:

    - class MovieClipAndThenSome extends
    - class MovieClipPlus extends class FL_MCFromLibrary
    - class FL_MCFromLibrary is generated by flash when not found in the classpath (it is the linkage name of a library movie clip in flash) and extends MovieClip

    //as3 example..

    var newCustomMC:MovieClipAndThenSome = stage.addChild(new MovieClipAndThenSome());

    trace(" >> scaleX: " + newCustomMC.scaleX); // output: >> scaleX: 1
    trace(" >> scaleY: " + newCustomMC.scaleY);// output: >> scaleY: 0


    is this a known flash bug?

    solution:

    an obvious workaround... call this line after object is added to stage..

    this.scaleY = this.scaleX = 1;

RSS Feed