Create Random Flash Files Rotation (Random Flash Banner Rotate)

4 Comments »

radom_flash5smBesides using Javascript to do a random select, i came across and found a easy solutoin simply using actionscript to ramdom select the .swf files. AS 2.0 code as below:

filename = ["file1.swf", "file2.swf", "file3.swf", "file4.swf", "file5.swf"];
path = “http://www.yourdomain”;
i = filename.length;
k = Math.floor(Math.random()*i);
loadMovie(path+filename[k], container);

* you need to make another layer with movie clip and put the instance name as ”container” to control where the random files display.

See below for more detail:

1. New document or existing .fla –> make a new Layer and on the first frame hit F9 for actionscript. 
radom_flash1sm

 

2. Insert the code above to the actionscript, i have two files for random display.
radom_flash2sm

3.Create another new layer.
4.Create a New Symbol and make it as a movie clip. (This is to make a container/placeholder, where the random files will display.)
radom_flash4sm

5.Drag the new created movie clip symbol to the stage (new created layer)

6. With the Movie Clip selected, go to properties –> put instance name as “container” and position whereever you want, in my case x:0 y:0
radom_flash6sm

Test it and you should be done :)

CSS margin-top image img src not working with firefox 3.0 problem fixed solved

1 Comment »

I came across on setting an image location using CSS “margain” inside a table cell, it looks allright on IE 7.0 or 8.0, however the firefox 3.X brower is not taking the margain at all.

See problem below:
The product detail image is the backgroud image and on top of that is the product image, which i use “margin-top” to set the location.

I was using: <div align=”center” style=”margin-top: 20px;”><img src=”pic1″ border=”0″></div>

The fix:
I should use padding-top: 20px instead of margin!

Why?

See below from firebug:


The golden rules on using ”margin” and “padding” on CSS.

1. Padding push everything inside the box(text or image).
2. Margin push everything away outside the box(text or image).

How to install free Lightroom 2.0 preset .lrtemplate file solved & fixed

14 Comments »

Simple quick reference of putting install lightroom preset, lightroom preset extension is “.lrtemplate”

Free Preset:

27 Free Lightroom Presets By Bryan Wheeler 
Link here

Basically, you can put your presets inside:

Mac
~/Library/Application Support/Adobe/Lightroom/Develop Presets/
Where “~” is your user directory.

OR

PC
C:\Documents and Settings\<your_username>\Application Data\Adobe\Lightroom\Develop Presets

If you can’t find it, you can follow below:

1. Open Lightroom.

lightroom_preset1sm

2. Go to Edit –> Preferences

3. Under Preference go to Presets tag and chose Show Lightroom Presets Folder
lightroom_preset3sm

4.Open the folder and go inside Lightroom –> Develop Presets
lightroom_preset5sm

5. Create a new folder. eg. I call it “free_preset” and put the Lightroom presets “.lrtemplate” file inside and you are done! Now close the lightroom and reopen it and you should able to see and use the new presets that you have installed.
lightroom_preset6sm