Archive

Archive for the ‘Web Development’ Category

Encode your JSON data before sending it

January 18th, 2012 No comments

A problem I was facing recently, that the JSON was being receive properly on Firefox 3.6 my work development machine. Finished the project and deployed it. I haven’t tested it on other machines, how clever am I?! I opened my laptop to see how it would appear on other browsers, and shockingly, it wasn’t working at all!

After spending hours trying to locate the line where the error occurs and find out what’s the problem it turned out that I have to decode the JSON output before sending it. I wasn’t using any PHP built-in functionality for JSON, that’s because at work, we are still using PHP4 which has none. I was basically writing the JSON output explicitly. The text output can contain some special characters that need to be encoded and escaped before sending it. After digging around a bit I found out a solution from this post. Everything is pretty much explained there.

In a nutshell, you’ll have to use json_encode() to encode the data from an array and then output it. A JSON library is provided along with that post. There is also a decoding function, but I haven’t use it since I’m receiving my data on a javascript.

Solution to getURL not working

February 22nd, 2011 No comments

A security enhancement was added to Flash Player sometime ago that disables getURL to function properly in Actionscript 2.0 of Adobe Flash. This could be an issue for some as in my situation when I created a banner for MET to celebrate the independence & liberation day of Kuwait.

The issue occurs if you are targeting a different domain than the current domain where the SWF/HTML file is hosted. I’ve also heard reports that it can occur if the SWF and HTML file are located at different location even if at the same domain host. I haven’t tested the latter so I can’t confirm or deny it.

Anyhow, to resolve this issue, all you have to do is change the allowScriptAccess attribute on the <object> tag to have the value “always”. You also have to add <param name="allowScriptAccess" value="always" /> or edit it to match it if it’s already there.

So at the end, your code has to look like this:

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="955" height="88" id="SWFID" align="middle">
<param name="allowScriptAccess" value="always" />
<param name="allowFullScreen" value="false" />
<param name="movie" value="FILE.SWF" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /> <embed src="FILE.SWF" quality="high" bgcolor="#ffffff" width="955" height="88" name="SWFID" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" />
</object>

This issue is explained in more detail at the official knowledge base of Adobe here and here.

Releasing a New WordPress Plugin – WP Academic People List

October 12th, 2010 1 comment

My first WordPress plugin goes public. I’ve developed it for a research group in Kuwait University. Check out the WP Academic People List page for more information about this plugin. This plugin was built in a way that you can customize it for school alumni website.

Wix – Build a Flash Website for Free

January 1st, 2010 No comments

Ever wanted to create a beautiful Flash website? Wix is a great place to start. It provides a set of flash layouts that you can customize and build your website to the final touch. It’s simple, easy and fast! Best of all, you do not need to have any knowledge in Flash.

Silverlight 3 Tools Installation – Unable to Detect Visual Studio 2008 SP1

November 7th, 2009 10 comments

I’ve been trying to install Silverlight 3 Tools for Visual Studio 2008 but I keep getting a message saying that I don’t have SP1 installed even though I do have it installed, and it won’t allow me to install it. I tried to uninstall everything and reinstalled Visual Studio 2008 and updated it to Service Pack 1 but the same error keeps showing up whenever I executing the Silverlight 3 Tools installation. Here’s the error message I keep receiving:

Installation Requirements:

Build 9.0.30729.XX of Visual Studio 2008 SP1 or Visual Web Developer 2008 SP1 must be installed before installation can continue.  See <A HREF=”http://go.microsoft.com/fwlink/?LinkID=122094″>http://go.microsoft.com/fwlink/?LinkID=122094</A> for download information.

Silverlight 3 Tools installation error

I’ve done much research to resolve this problem but I couldn’t find any helpful information. However, I’ve been able to find some hints here and there and I’ve came up with the solution after playing around with it for awhile. But first I should clarify few things before I continue with the solution:

  • I’m using an early version of Windows 7 Professional since it was released 3 weeks ago by the time I’m writing this post.
  • I have Visual Studio 2008 SP1 Professional Edition and .NET Framework 3.5 SP1 installed.
  • The VS2008 build is: 9.0.21022.8 RTM which is the latest update I can get from Windows Update and it cannot detect any more updates for the VS2008.
  • I have Expression Studio 3 already installed.

Okay, so now to overcome the installation error of Silverlight 3 Tools follow up these few steps:

  1. Download Silverlight 3 Tools for Visual Studio 2008 from here. The download file name should be: Silverlight3_Tools.exe by default.
  2. Download WinRar from here. Winrar will be used to extract Silverlight3_Tools.exe since it is an archived file. The reason I mentioned Winrar here is because I’m not sure if there is any other application that supports extracting EXE files. Feel free to use any other app that could do the job.
  3. After installing Winrar or any equivalent application, right click on Silverlight3_Tools.exe and extract the archive file.
  4. Finally, go to the location where you have extracted the file and execute the file VS_SilverlightTools_Setup.exe to install the Silverlight 3 Tools.

Learn Adobe Flex Builder 4 in A Week

October 20th, 2009 No comments

Remember the Adobe Flex Builder 3 online video tutorials that could be completed in 5 days? Now Adobe have added another set of tutorials for the new Flash Builder 4 Beta 2 that could also be completed within a week. It is also free and publicly available.

Flash Builder 4 Logo

You could also download Flash Builder 4 beta 2 directly from Adobe and for free.

Singularity Global Web Conference

July 18th, 2008 No comments

It has been sometime now we have been waiting for this announcement. Tickets for the web based conference, Singularity 2008, is now available for sale for $99 USD.

Aral Balkan has been working hard to make this project happen and it is finally happening. This conference is a web-based, means you can attend the conference from your PC without the need to travel.

Next Version of Flex Information is Now Available

July 18th, 2008 No comments

More information about Gumbo is now made available on the Gumbo page. Gumbo is the codename of the next version of Flex.

Categories: Flash/ActionScript/Flex Tags:

Adobe Dreamweaver CS4

June 7th, 2008 No comments

For all fancy web developers in the globe, Adobe has announced Dreamweaver CS4 beta which is now available for public testing. If you are a Dreamweaver fan or you are a programmer geek race then you might want to grab this software.

Meet Dreamweaver CS4 beta

Free Photoshop Book

June 6th, 2008 No comments

Sitepoint and 99designs are offering a free complete book, The Photoshop Anthology: 101 Web Design Tips, Tricks & Techniques. This book is aimed for web developers looking forward to add Photoshop in their technique basket. It is available for a limited time. Hurry and grab it now! 
As for me, I have a week off between summer and fall semester. I’m going to get my hands dirty with books and programming! This book should be a good start. Long live fall break…

Categories: General Web Development Tags: