Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 234
  • Last Modified:

Flash 6 - Make a clickable bmp with event handlers

Hello experts

I have a map which is splitted by regions in bmp format (1 bmp).

What i wanna do is upload the bmp in Flash and make 3 event handlers.

1. OnMouseOver event - When the mouse is over a region (not the whole map), I want that, that particular region gets embossed (like zoomed) and that it change colour. If possible, a gradient colour.

2. OnMouseOut event - restores back settings.

3. OnClick - if a particular region is click, OnClick takes the user to a web page.

I am new to flash so I would appreciate details of how to do the above and the code please. I think that the bmp has to be turned as an object. If so, please explain how I can do it.

Moreover it would be appreciated if the html code of how to insert a flash object or movie clip into a web page is also stated here.

Regards

King_Diamond
0
King_Diamond
Asked:
King_Diamond
  • 2
1 Solution
 
SatanUKCommented:
the easyist way to do what you want is to have flash import the image and try and convert it to a vector (Modify > Trace Bitmap)
convert this to a button (Select and press F8) place the button on top of the bitmap image then go in to the button and clear the up frame over to the embossed version and the hit area to the standard map this will make it look like its emossing it when really its just putting the embossed layer over the top

then you just need to put an onclick event with

GetURL("Mywebpage.html");


posting flash in a page

<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
 codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
 WIDTH="550" HEIGHT="400" id="Untitled-1" ALIGN="">
 <PARAM NAME=movie VALUE="MyFlash.swf"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#FFFFFF> <EMBED src="MyFlash.swf" quality=high bgcolor=#FFFFFF  WIDTH="550" HEIGHT="400" NAME="MyFlash" ALIGN=""
 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>
</OBJECT>


replace MyFlash with the path to your swf file

0
 
King_DiamondAuthor Commented:
Hello

I've just tried your suggestion but didn't manage as I'm new to flash, need to ask you something.


How can I clear the up frame?

Do I have to make a button for each region? If yes, do I need to split the regions manually and how? I'm not good in freehand drawing so any suggestion might help.

Does your suggestion cater for the MouseOut event?

Do you know how to make the colour change when MouseOver event is triggered and is it possible to make a gradient colour? If yes, do I need to set it up before? Like saving the colour as bmp or anything else?

Thanks for your time.
0
 
SatanUKCommented:
you will need to separate the regions in to buttons Id sugest using the Trace Bitmap function as said if its got lines spliting it already flash will pick up on that and then you just need to select the correct area.

there is no need for a Mouse out event with my solution as the button will automatically un-emboss when you roll out you can still use the MouseOut event if you need to use it for other purposes

effectivly there are 2 layers on your button one that shows when you have your mouse over and one that shows at all other times what ever in is these layers will show so if you want it gradiented then yes thats quite easy to implement. you just need to import 2 bitmaps 1 with what you want it to look like in its "normal" state and one with it in its "over" state the rest is done with the trace bitmap tool and spliting it in to buttons layers

TBH you probbally will get better help with flash from
http://www.flashkit.com/index.shtml
since you/they can post up examples which you can look at and download and see how it works
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now