Felipe Orellana - Code Mania

Archive for the ‘Web Development’ category

Let me tell you about godaddy’s Copyright department! IT STINKS!

I have a server with them, where I host about 30 websites for clients of mine. One of my clients had used a picture he says he paid for a year ago on a top banner for his site that someone else built for him.  It turns out that the photographer has been trying to get my client to remove the image for about a year. What does the photographer do when my client doesn’t answer? He skips me, and goes straight to godaddy and reports a copyright violation on the entire server.

Needless to say, godaddy puts my server on suspension the second this happens without checking with me to remove the material… no call… they email me at an address on the server so I never see the email.  Being 3rd of July their their lazy ass customer support can’t/won’t talk directly with their copyright department so I got stuck with 29 pissed website clients until Monday, July 7th.

After paying a full year upfront(sadly), I am now contemplating moving to MediaTemple, with all my clients, domains and server. Don’t go with godaddy, they have no repect for their clients… non what so ever…

AMFPHP and flash remoting

June 12th, 2008

Its been a little while since the last post, but I have some code I have been wanting to share. A little while ago I had written a business card template editor with client/admin areas for a shopping cart solution I had been working on.

The editor needed to create JPG images on the fly and send the full resolution images back to the server. It also picked up the template descriptions from a mysql database through PHP and passed it to the AS3 App all through AMFPHP.

It became clear to me, that it was quite anoying having to put my method calls on a string every time I need some data, and go through they whole process of creating a listener for the call. So I wrote two classes to help me out roll out the code faster. The code allows calls to an AMFPHP gateway just as if it was part of the AS3 code with namespaces and methods. So calls can now be written in one or two lines of code like this:

— AS3 CODE: –
[cc lang="actionscript" tab_size="2" lines="40"]
import com.orellana.speed.remote.Remoting;
import com.orellana.speed.remote.Callback;
var remote:Remoting = new Remoting(’http://www.yourdomain.com/AMFPHP_gateway.php’);
remote.myservicefolder.myservice(args…).callback(__myCallbackFunc, __myErrorEventFunc);
[/cc]

So, service folders become namespaces, the php classes become as3 class, and the php function behaves just like a function in as3. The only difference is the callback object returned by that method which is used handle returned values and optionally error events.

More information about AMFPHP can be found here: http://osflash.org/projects/amfphp
I also I just found this Post on code czar about remote calls and type safety, but I’m not sure if its the same thing.

Here are the classes:
Remoting.as
CallBack.as

Lee Brimelow an Adobe Evangelist has posted some really awesome how to’s on the now beta Flash10.
Follow this link to check them out: http://theflashblog.com/?p=384

Proudly powered by WordPress. Theme developed with WordPress Theme Generator.
Creative Commons License