Web Development & Design

Loading External Image (JPG,PNG etc) into a movieClip in Flash AS3

Actually this is a tutorial I found on the net and its from jesseharding.com , here what he had to say:

"loadMovie is gone in AS3. I liked to use loadMovie to pull swfs and jpgs into existing movie clips on the stage. You can still do this fairly easily by using the load() method. Here’s how:

var i =new Loader();
i.load(new URLRequest(yourimage.jpg));

Basically we are loading the image into a Loader called “i”. Next we add i as a child to our movie clip that is on the stage."

Drupal 6* - HTTP Request fail status on WAMP

Lately I got this error when I freshly installed Drupal 6. I googled and google how to fix the problem.

All you got to do is navigate through your windows file system if your using windows look for the folder c:/window/system32/drivers/etc/ and open "hosts" file , you must be an admin to be able to change this file.

If you are running Windows vista/7 , right click on notepad and choose "run as administrator" and look for that hosts file. Uncomment the bit where it says "" removing the # number sign.

Reload the page and the error should now disappear.


imagecopyresampled() PHP Function - Dummy Explained

Okay I have been just developing my projects. And its been a while since I played with PHP powerful function the *drumroll* imagecopyresampled function. In the beginning I never really understood the parameters cause it tends to display weird results. But now I fully understand how it works. As a person who likes to know the ins and outs of everything. I really like to know how to use this function here I will explain for my reference in the future and for anybody who likes a simple understanding of this function.

Allow phpmyadmin to be accessed from outside the network

When using WAMP server on windows and you like phpmyadmin to be accessed from the outside. Make sure you put wamp online first then go to C:\wamp\alias directory and open phpmyadmin.conf. Replace Allow by using your own IP or any IP that it can be accessed. Use comma for multiple stances. Or you could simply follow the instructions on there. Where it says to change to "allow from all" replacing "deny from all".

Then head to "config.inc.php" of the phpmyadmin folder and look for the lines that say:

Web Designers/Developers Recommended Tools/Programs

As a web designer and a web developer, we all know that TIME is our biggest enemy. It takes HUGE amount of time to complete one project HTML wise and CODE wise. You see programs on the web that tells you they are your bestfriend when doing a specific task. But all software does that, they tell you they are the best among the rest but how can you make sure? Some even when installed gives you viruses , spyware, malware and the lot. Okay not sounding like marketing guy. I will list here a bunch of programs that I use and found really useful and can even say I cant live with out.

PHP Header Function - Redirect - Exit

I was developing my site when something weird happened , mostly sessions get UNSET in the end of my php script, but when developing In the middle script a redirect function like the "header('location: http://mydomain/etc');" I assumed once redirected the any script below it wont run anymore but I was wrong.

The as soon as the header function has been called the script below it has triggered as well while performing redirection. At first I didnt know what was wrong with it until I just unknowingly added EXIT; after the header function and everything works fine.

JQuery Plugin Must haves

As I am currently working on a website right now. And Im using JQuery as my javascript library and its the way to the future when it comes to DHTML and this accompanied with plugins that are useful to make developing easy and fun. Here are the plug ins I use for my reference your and yours.

* JQuery Form Submit - http://jquery.malsup.com/form/
This will let you submit forms via AJAX automatically that can save you time doing AJAX. This also lets you upload files via ajax and its pretty daunting doing file upload via ajax.

Bootstrapping - Relative Path trailing slash / (PHP)

When developing a site with bootstrapping in the mind, by the way bootstrapping is a technique in web development when all request gets directed to one page that is usually index.php for example a request to page, http://domain.com/user , http://domain.com/profile/edit etc. is handled by index.php with the help of a mod_rewrite script in the root directory.

When this is done an issue will occur relating to relative paths and pointing to static files in your site such as images, css and scripts especially . Imagine this scenario:
Examine the file structure


SQL Match And Against - Search Reference

When doing a search function of your site. Match and Against is better than Like sql statement. The field must be set to FullText match the term on the field:

Eg. SELECT field1,field2 FROM table_name WHERE MATCH(field1,field2) AGAINST('keyword') AND field1 = '1'

You can also use the IN BOOLEAN MODE to allow operators in the sql statement.
eg. ... MATCH(field1,field2) AGAINST('-freak +hellfish' IN BOOLEAN MODE) ...
(-) minus sign that means nothing should match 'freak'
(+) the word must be present in the match.

Syndicate content