Folder Opens in a New Window

by Hiroshi on 24-06-2009

Problem: When you click at a drive or folder, it opens in a new window.
Cause: This is either settings issue for explorer or malware/virus attack.
Solution: There are couple of solutions for this problem.

{ Continue Reading }

SWF With Transparent Background

by Hiroshi on 27-09-2007

In some cases we need swf with transparent background. For that you might add a little property as movie parameters which is:

wmode=transparent

Flash XML PHP

by Hiroshi on 09-07-2007

With Flash, XML and PHP you can create very professional, interactive, dynamic and customizable slideshows, galleries and lot more.

We basically control backend by php and create xml file which is called in flash to show the dynamic content.

This section is bringning php, xml and flash based utilities.

Get Data in Flash from PHP

by Hiroshi on 08-07-2007

Setting up swf

In order for Flash to get data from an external source, you need to make use of dynamic text fields. Simply place a blank dynamic text field on the stage and make sure you give it a variable name (NB: dynamic text fields have both an instance AND a variable names. In this case we want to focus on the variable name). Note the name you give to the field's variable name, as we'll need it when we write our PHP script.

Once you have a text field setup, convert it to a movie clip symbol. Attach the following code to the resulting movie clip:

onClipEvent (load) {
//assuming you have a personal web server and PHP installed locally
loadVariables("http://localhost/test.php", this, "GET");
}

Writing the PHP script that will pass variables to your SWF

To pass a variable between PHP and you SWF, it is imperative that you know the name of the variable you want to populate within your SWF. Again, when I say variable name, I'm talking about a dynamic text field's variable, not instance, name. As long as you keep that in mind, you should be alright.

The PHP script we'll write is actually quite simple. All you need to do is use the print() function, whose output will be automatically passed to your SWF. As simple as this may seem, be warned that Flash needs to know which variable to populate with the data output from our script. In other words, we need to print the name of the variable attached to the dynamic text field we created earlier. This is a crucial step but is very simple to achieve. I've included an example below on how we would code this in PHP:

<?php
//The value of $x would be printed to the screen but the SWF would not read the data
$x = "abc";
print $x;
//The value of $x would be printed to the screen and because of the prefix 'myVar=', the SWF will //interpret this as being the intended value for the variable myVar in the SWF
print "myVar=$x";
?>

If you've ever tried getting external data into your SWF from a text file, you'll notice that the two methods are very similar. PHP has a great advantage though in that you can use things like arrays, loops and even functions with which you can access information from within a database.

How to Make swf Background Transparent

by Hiroshi on 08-07-2007

In some cases we need transparent background for swf in webpages. For that a little property of swf movie as parameter will do.

wmode=transparent