= fn(n){n xor 0xFFFF004B eq 0×0 ? n : fn(n – 0×1)}

Posts Tagged ‘Flash’

Howto: Show your images using fla-img-sw

Sunday, March 15th, 2009

“fla-img-sw” is a flash movie clip that enables several images loading by passing the images’ URL to the flash parameter. “fla-img-sw” is annouced by myself, you can get the source code or get the package on http://code.google.com/p/fla-img-switch/ .

Using AJAX to improve the loading phrase of the website is considered to be a good pratice on presentation tier. Actually, Flash movie cilp can do the same thing as AJAX. Imagine there are several images are to be loaded in one page, it takes user’s time on loading the page. If you show a thumbnail in that page, then if users would like to see the detail of the image, they have to click on that image link, your website then pop-up a window to show the original size of the picture. It waste users’ time, according to Even Faster Web Sites (Steve Souders), Life is too short, we should write code faster then even (means saving your users’ life and time :-)  

But I am not here to talk about how to utilize AJAX to improve the website, but gonna show a tutorial on how to use my open source gadget to show images on your website. Before that, just take a look at the example of how the gadget work: (click to enlarge, please note that the demo below is a snapshot of the commercial usage, the open source version is somehow a little bit different from the commercial one, like I depict on the previous post.)
fla-img-switch 
You can see a thumbnail on the right side, and the main picture which is selected will display on the big left side.

It’s easy to use. Once you get the package, you will see a file call “ImgSwitch.html”, that is the demo file, double click this file and you can see a demo locally. If you feel enough for the demo and being inclined to use it, just open the “ImgSwitch.html” and you will see how it works.

Easy to proceed:

  1. Copy “ImgSwitch.swf” to a appropriate position which you can refer from your HTML
  2. Copy the code below to where you would like to show the images:
    <object classid=”clsid:d27cdb6e-ae6d-11cf-96b8-444553540000″ codebase=”http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0″ width=”690″ height=”492″ id=”ImgSwitch” align=”middle”>
    <param name=”movie” value=”ImgSwitch.swf” />
    <param name=”quality” value=”high” />
    <param name=”bgcolor” value=”#c2b29a” />
    <param name=”FlashVars” value=”picurl=1.jpg;2.jpg;3.jpg;4.jpg;5.jpg&maxpic=5&modelNo=TestTing” />
    <embed src=”ImgSwitch.swf” quality=”high” bgcolor=”#352B68″ width=”690″ height=”492″ name=”ImgSwitch” align=”middle” allowScriptAccess=”sameDomain” type=”application/x-shockwave-flash” pluginspage=”http://www.macromedia.com/go/getflashplayer” FlashVars=”picurl=1.jpg;2.jpg;3.jpg;4.jpg;5.jpg&maxpic=5&modelNo=TestTing”/>
    </object>
  3. Change the parameters:
    A. Replace “picurl” paramter with your image url, note that if your images are from www, don’t forget to quote the images’ URL starting with “http://”. And the URL is separated by semi-colon(;).
    B. Replace “maxpic” parameter with the actual images quantity you would like to show. 
    C. Replace “modelNo” paramter with the title(name) of this group of images.

Done.



fla-img-sw: yet another open source stuff

Sunday, March 15th, 2009

I am happy to annouce the release of the following open source stuff which is images rollover flash movie clip (or you can call it HTML flash component). It looks like a gadget other than a whole project. Once you get the source code, you may open the fla source file with Adobe Flash 8.0 or higher version.

This gadget I developed can be dated back to 2 years ago, and the primary progamming language is ActionScript 2.0. My client requires a image rollover component that can easily embed to the existing website, that give me the chance to develop such a flash toy. It is small in size and quite efficient in runtime. The open source version is the original verion. You can find a demo in Product Demo, which is the  commercial version. The commercial one has been changed a little bit to fit my client’s need. The open source one contains smooth transition effects when switching images and browsing the thumbnail. My client don’t like those special effects. 

You can download the full version of the flash image rollover component on: http://code.google.com/p/fla-img-switch/

Or just simply get the source code via: 

svn checkout http://fla-img-switch.googlecode.com/svn/trunk/ fla-img-switch-read-only

Enjoy. :-)



Profile

  • Koumei Deng's Facebook profile


Submit Your Site To The Web's Top 50 Search Engines for Free!