I came accross this API diagram showing all the intrinsic classes, methods and properties available in AS3. It could be of some use to some of us flash dev’s. Enjoy.
Also some others I found…
I came accross this API diagram showing all the intrinsic classes, methods and properties available in AS3. It could be of some use to some of us flash dev’s. Enjoy.
Also some others I found…
So, I had a break between projects that I had planned and decided to renovate the entryway to my townhouse. The place was built over 30 years ago and that’s obvious to see especially in the entry way. I had pre-ordered some tiles for this very occasion and I finally got the chance to get them in. So I scraped the popcorn off the ceilings, patched up the walls where they needed it, painting the ceiling and walls, layed the tiles in the entry way and down the stairs to the basement, installed new baseboards and trim and even a new exterior door to the garage. I even installed a shoe rack and hat rack from ikea in the closet that I had to re-engineer to make fit properly. Here are some pics of the old and new versions of the entryway. Hope you like.
Today was a milestone for Coupon Sherpa. We hit over 1 million visitors to the website. That is quite significant for us considering the website was launched in August of last year. So after about 7 months we finally reached the 1 million visitor mark. We are looking forward to what the future holds for couponsherpa.com and have some big plans for making it more useful for our visitors.
I recently came across an issue with disabling buttons in ActionScript 3 without removing the MouseEvent listeners. In AS2 its simple if you just set the enabled property on the button/movieclip to false. In AS3 you have to do a little more than that. You need to set the mouseEnabled property on the button/movieclip to false but I also found that the MOUSE_OUT event will get triggered when that occurs so you need to do some custom code to disable that functionality.
In AS2
buttonClip.onRelease = function() { this.enabled = false; } buttonClip.onRollOver = function() { // do something } buttonClip.onRollOut = function() { // do something }
In AS3
buttonClip.addEventListener( MouseEvent.MOUSE_DOWN, buttonClick ); buttonClip.addEventListener( MouseEvent.MOUSE_OVER, buttonOver ); buttonClip.addEventListener( MouseEvent.MOUSE_OUT, buttonOut ); function buttonClick(_e:Object) { _e.target.mouseEnabled = false; } function buttonOver(_e:Object) { // do something } function buttonOut(_e:Object) { if(_e.target.mouseEnabled == false) return; // do something }
You’ll notice in AS3 how you need to check if the mouseEnabled property is set to false before you handle the mouse out functionality. In my project I was changing the button color on mouse over and changing it back on mouse out. When they clicked on the button, I set the mouseEnabled to false but the buttonOut function was getting triggered automatically, so this workaround fixed the issue. It’s not too much extra code but was annoying to figure out what was going on.
Today I figured out the hard way some intricacies of using the global setting within nested functions. In PHP, if you want to load a variable from outside of your function, you first have to declare it as global before you use it inside your function. So Something like this.
$a = 1; function test() { global $a; echo $a; // will output '1' }
I assumed it worked similar to actionscript where anywhere you use a global variable it can find it. That isn’t always the case in PHP as I just found out. The global setting is merely a reference to the top level code, so issues can come up when you are using nested functions. So I had a function that did an include or two and had a function within that at some point and realized any variable that was within that first function was not accessible even if I globalized the variable. So here is what I was trying.
function simpleFunction() { $a = 1; function test() { global $a; echo $a; // will output nothing } }
Nothing would output in this senario because my test function is looking on the top level code for that variable. Since my variable isn’t in the top level, there is an issue. So my solution was simple. Just declare the variable global in the top level and then use it wherever I want. Something like this.
global $a function simpleFunction() { global $a; $a = 1; function test() { global $a; echo $a; // will output '1' } }
So now the variable is declared in the top level even though I’m using it within a function and a nested function. It took me a bit of time to figure this out so hopefully someone else can learn from it. Enjoy!
Recently I had been toying with the idea of getting my own server because I hate being limited to whatever my shared host allows. I wanted to be able to load whatever software I wanted on it, load up as many websites/domains as I wanted, handle as many ftp accounts as I wanted and install any media streaming software I wanted. Email wasn’t really an issue since I think it makes more sense to route it all through a google apps account. I had a bit of experience (just a bit) working with servers since I have a mac-mini setup in my living room running MAMP that has all my movies on it and actually has a domain pointed to it (via zoneedit.com) to present client work.
After a bit of research I came accross macminicolo.net. They simply allow you to send them your mini, or you can buy one off them, and they hook it up to their network allowing you to access it through vpn, vnc, ssh or however else you choose. One might question its speed but I have already put a couple database heavy sites on it, including this website, and they load immediately.
I ended up buying a mini locally here and installing a faster, larger hard drive and loaded up the ram in it, installed all the necessary software and sent it off to them. They are in Las Vegas and there seems to be a fairly good pipeline to the internet down there. I’m very pleased with the server and the speed of my sites, I feel sort of free now because I am not under the yoke of being on the same server as a dozen or so other people; *barf*. So I can do whatever I want with it without having to ask if a specific port is open, or if php has a specific setting activated. I even ended up buying OSX Server. It has a bit of a learning curve for a server newbie like me but I feel pretty comfortable using it now. I didn’t have to worry about setting up a mail server or dns info which kept things simple. Setting up an ftp server on it was a bit tricky but I managed to get that working with pureFTPD and I even managed to get a few cron-jobs running on one of my sites.
Anyways, my hat is off to the fella’s at macminicolo.net for making my life a bit more easy.

I am now officially in the affiliate marketing world. After developing the Coupon Sherpa iPhone application with my brother Luke we decided we would also build a full fledged website offering every kind of coupon imaginable. So now our iPhone application is one aspect of what Coupon Sherpa is, with its most important being the website where you can find online coupons, printable coupons, grocery coupons and even coupon friendly blog postings. We just recently finished it and I would say it is some of the best PHP mySQL work that I’ve done. I built a brand new content management system (CMS) for it that allows for multiple users with different types of user accounts with the ability for them to manage all our stores, coupons, categories, banners, links, comments, etc. Both the back-end and front-end of the website utilize a large amount of the latest ajax technology to help keep the user experience seamless for doing such things as submitting contact forms, adding coupon or blog posting comments, or even suggestion hints when a person is using the search tool. PHP and mySQL were used for the framework and I also implored some new techniques I’ve learned recenbtly with CSS to display the content.
Something kind of exciting about the site is that I was actually able to get all our coupons to load dynamically from affiliate networks. Each network that we work with has a different type of api that we use to grab the latest coupons. This forced me to have to create a parser file for each network to work with their xml,csv, or even rest data. We then load any coupons we haven’t seen into our database using a cron job and then either remove the ones we don’t want or enable the ones we want to show up on the website. Seems straight forward enough but it actually took a fair bit of thought to make it all work. We also decided to ask for people’s twitter info on comments in the blog and I was able to access Twitter’s api and load in the person’s twitter image and user account info to display for each comment.
Anyways, a lot of work went into making it happen but it’s finally up and running and we’re excited to see how it works. We’re hopeful that a lot of people can save some money using it.
Some links…
American Eagle Coupon Codes
Kohl’s Coupons
Gap Coupon Codes
Target Coupons
Visit CouponSherpa.com
So, over the winter I had been working on a portfolio website redesign for a 3D artist in Toronto. The project was mostly php/mysql based which was a welcome change from all the flash work I had been doing earlier that year. The website includes an inline CMS (meaning that after you login, you just navigate around and edit whatever items you want to). It turned out a lot better than I thought it would and uses a lot of ajax for a lot of the cms updates. My buddy Ian McFadyen did all the design work and did an amazing job to boot. I handled all of the development work.
View Ray Caesar’s website.
After learning about the project I realized I should probably get my hands on a PHP based framework to base everything off of. I found out that so many frameworks are way too convoluted with things I would never use. Along my google journey I ran accross something called Simple PHP Framework. I downloaded it and ran some tests with it. It comes with some very nice utility functions and classes including user authorization classes and database access classes. It had pretty much everything I was looking for.
Anyways, I’m just sending out much love to the guys involved with the framework for saving me many hours of tearing my hair out figuring a lot of this stuff out myself. I’ve also since implemented it on http://www.freeshipping.org and the admin for my first iPhone app’s webservice at http://www.couponsherpa.com.
For the past couple months I had decided to take a break from Flash development and try something completely foreign to me; iPhone App development. The language is completely different than Actionscript, however it comes Model-View-Controller based, so that was my only comfort.
My brother and I came up with an idea to put coupons on the iPhone, something that hadn’t been done yet, or at least hadn’t been done very well yet. The idea, I would develop it, he would design it and get the coupons in it.
Read the rest of this entry »
Recent Comments