Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

rollovers - Flash vs Javascript

Status
Not open for further replies.

Microbe

Programmer
Oct 16, 2000
607
AU
Hello,

This is going to be a basic question, but I am a total newbie to Flash.

I have created a map and using Javascript have about 60 rollover regions that display a name when a location is rolled over. The names are all displayed in the one place (top left corner) despite where the rollover location is. i.e. rather than a true rollover, it does a swap image.

Usinge JS it works beutifully, except it takes AGES to download all the images and I need to speed it up.

I was thinking of doing it in Flash instead so a couple of questions.

1: Will it be any small doing it this way i.e. does flash compress it at all?

2: Is this the best way to do it?

Thanks in advance
Steve Davis
hey.you@hahaha.com.au
 
There will or might be many that will add to this but here is my two cents.
There would be a couple different ways to do this. But either way you are going to either have all the images load in one swf file or have each roll over render the image like JS. But i have not seen what your are talking about but if it is just names, then by creating the names/text in Flash, I can only imagine that it would be done in vectors and it would take no time to download or show. The images you are using are plain txt or an image text that looks cool or something. Hey just a thought from someone about to go to the beach!
 
Doing this in Flash will almost definitely result in a shorter download time. Flash compresses graphics content very well indeed, even if you stripped away every bit you thought possible in Fireworks or Photoshop the Flashed version of an image is, at least in my experience, smaller.

Your big decision will be vector versus bitmapped graphics. Using bitmaps would probably just mean importing what you already have and letting Flash work its compression magic on them. If you go the vector route you'll have to trace the countries' outlines (within Flash or using Illustrator or Freehand) and then add colour. Depending on the level of detail you're going for here vector art could bring your file size down dramatically: if you have relatively simple shapes and fill them with flat colour the file size will be tiny. However extremely complex edges do bump filesize up, sometimes far beyond the bitmap equivalent.

The rollover scripting can be achieved by turning each country area into a button symbol and some minimal
ActionScript (which is really close to JavaScript anyway).

To answer your second question - yes I think this is a good way to do it. Using Flash you can take the map idea much further than will JavaScript alone in terms of interactivity and animation and your file will almost certainly download faster. You have the extra benefit of being able to add a preloader animation too so that the user isn't left scratching their head wondering why it's taking so long.

Not off to the beach - just about to step out into the London rain...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top