13
Jan

Flash shopping cart

Posted By wassim in Flash

The best flash shopping cart you’ve ever seen!

The flash cart supports multiple categories of products; it is driven by XML or a mySQL database.

The flash shopping cart was designed with usability in mind, it loads and is ready to go in less than 10 seconds! Faster than html or php based carts!

User friendly, highly flexible, lightweight (around 120 kb!) and a cool web 2.0 design are not the whole deal, there’s more, a lot more!

Seamless paypal integration, the purchase is itemized and you get to see the details about each item in the paypal interface.

The merchant paypal account is easily customizable; you can set the paypal address, currency, thankYouUrl and cancelUrl.

The mySQL version is equipped with an admin panel that makes cart management, including thumbs and full size pictures upload a breeze even to non techy users.

This flash shopping cart is robust, it supports a variety of formats, can display jpg, png, gif and even swf pictures (both thumbnails and sull size pictures) of your products. It’s simply an all-in-one solution.

A demo of this flash shopping cart is available here.

23
Dec

Flash scrollPane component scrollbar not showing up

Posted By wassim in Flash, Flash Tutorials

This fix applies to flash 8 scrollPane component v2.

Here’s the problem: you attach content dynamically at runtime to your scrollPane, then much to your surprise, the vertical scroll bar doesn’t show up despite the fact that you specified vScrollPolicy as “on” or “auto” and that the content is larger than the scrollPane.

You probably know the problem that’s why you are here! Google dropped you in the right place, I have found a solution! A working fix.

After searching for two hours, and trying all the suggested workarounds like calling the redraw() method on the instance or the onComplete(), doLater() or even the invalidate() method, none of these worked, I even tried lowering the frame rate of the movie but all this ended up failing so I started experimenting and I found the following:

If you change the position of the content clip inside your scroll pane component, the scroll bar will fail to account for this change, it might even not appear in the first place, if you add content dynamically, like attaching a movieClip from the library on runtime, you will also face issues with the scroll bar.

What I did to solve the issue and debug is that I simply called the setSize() method twice, in the first call, I assigned a height higher than the desired one then in the second call, I assigned the desired height and this worked ! the scroll bar of the scrollpane now appears and behaves as expected.

Note that this fixed the case where the content is being attached from the library, not loaded externally.

 

4
Dec

Flash Player cache and smaller swf files

Posted By wassim in Flash Tutorials

This new feature has been introduced in flash player 9,0,115,0.

 Certain standard flash components (dataGrid, comboBox, list etc..) are used by a large number of websites. For example, More than 100 Kb of identical data has to be downloaded for every Flex application (the flex framework) . With the new Flash Player cache, Flex applications will download and start up much faster because users will probably have the framework already in a special cache from one site and will not need to download it again.

The Flash Player cache is not the same as the browser’s cache. It works by storing the contents of a new type of file (SWZ) on your hard drive. When a website makes a request for the SWZ file from the server, Flash Player first checks to see whether it has the matching file already in the cache before attempting to download it.

 Besides providing smaller size advantage and thus faster loading, this feature is also beneficial to the application host by reducing bandwidth.

4
Dec

Flash loader component failing to scale down loaded pictures

Posted By wassim in Flash

Hi,

I’ve ran into this bug recently and tried to find a solution, a quick google search returned no answers to the issue so I thought I would post about the problem here and also post the solution / workaround I found.

The problem is that the loader component (flash 8 AS2) is not scaling down the loaded jpg (unless the latter are cached by the browser) despite the fact that I have set the scaleContent property of the component to true via the component inspector panel (and even tried to set it via actionScript code), so as soon as the picture is loaded, it displays or renders to the screen with its original dimensions, if you refresh the page, it will scale down correctly.

Just a side note here, this has happened while I was using multiple instance of the loader component each loading a different jpg having a unique contentPath.

The solution I found is simply to preload the pictures I intend to use first using the MovieClipLoader class and then to set the contentPath property of the instances AFTER the images have been fully loaded (and thus cached by the browser). This solution works.

 

PS: you’ll have to test online to reproduce this since flash loads local content differently.

 

 

 

16
Nov

Angora Rabbit, a pet?

Posted By wassim in Education/Teaching, Wassim

Angora Rabbit



From wikipedia:
The Angora rabbit is a variety of domestic rabbit bred for its long, soft hair. The Angora is one of the oldest types of domestic rabbit, originating in Ankara , Turkey , along with the Angora cat and Angora goat. The rabbits were popular pets with French royalty in the mid 1700s, and spread to other parts of Europe by the end of the century. They first appeared in the United States in the early 1900s. They are bred largely for their long wool, which may be removed by shearing or plucking (gently pulling loose wool).
There are many individual breeds of Angora rabbits, four of which are ARBA recognized. Such breeds include, French, German, Giant, English, Satin, Chinese, Swiss, Finnish, to name a few.

What a cute pet it would make, don’t you agree?