Posts Tagged utility
Convert links in text to clickable links in Flash AS3
Posted by Jeff in ACTIONSCRIPT 3.0 on March 18, 2010
I found this on StackOverflow but it took quite a bit of searching to find. Here you go:
1 | title_str = title_str.replace(/((https?|ftp|telnet|file):((\/\/)|(\\\\))+[\w\d:#@%\/;$()~_?\+-=\\\.&]*)/g, "<u><a href='$1'>$1</a></u>"); |
FlashTracer and Windows 7
I recently upgraded from XP to Windows 7 and have had to re-install a few things so I figured I would post the instructions as I set them up. This is about setting up the extremely very valuable tool for every Flash developer that is Flash Tracer. But it CAN be a pain to setup with multiple versions scattered around the web, various instructions on different blogs, and quite often important tips buried in the comments of said blogs. Hopefully this can help you setup Flash Tracer without a lot of effort.
I am using Firefox 3.5.5, on Windows 7, with the Flash Player 10,0,32,18 debug installed.
AS3 – Load XML Document Class Example
Posted by Jeff in ACTIONSCRIPT 3.0 on November 18, 2009
One thing that I do quite often in Flash is load XML. In order to save time, I separated a lot of that code out into external class files. I also created a snippet of code that calls those files in order to save time when I want to use them. (You will need Lee Brimlow’s snippets panel for this to work.)
The LoadXML and LoadURL classes are probably very similar to those found at Learning Actionscript 3 as that is where I learned a lot about this topic previously. Hope you find this helpful!
Load XML files (774.5 KiB, 27 hits)
Code snippet (for the panel) after the break…
AS3 – Loading CSS and Fonts
Posted by Jeff in ACTIONSCRIPT 3.0 on October 30, 2009
Working with CSS and fonts in Flash (especially with dynamic text) can be a huge pain. I have come up with a way that makes it a lot easier. What I do is load them up, store a reference to the css file in a global class, and simply refer to that class when you need to use the fonts and css. The css styles dictate which fonts are used where within your application.
This method seems to work out well and saves on file size as you are referring to an instance of the font instead of instantiating it over and over again etc. (You will need the FontLoader class in order for this to work.)
Description of the files after the jump…
How to convert mp4 files to mp3 files
I always hated how anything downloaded from Itunes made it so you couldn’t play the stupid mp4a file on anything but an IPOD. Seeing as how I purchased a new phone that has a gig of space for mp3’s I needed a converter. Free Audio Pack to the rescue! It converts those ridiculous files (as well as many others) to mp3s that I can load onto my phone or burn to an mp3 cd to play in my car. The price was right too.