Solved

Flash 6 - Make a clickable bmp with event handlers

Posted on 2004-04-28
3
227 Views
Last Modified: 2010-04-17
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
Comment
Question by:King_Diamond
  • 2
3 Comments
 
LVL 2

Expert Comment

by:SatanUK
ID: 10938710
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
 
LVL 1

Author Comment

by:King_Diamond
ID: 10961449
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
 
LVL 2

Accepted Solution

by:
SatanUK earned 125 total points
ID: 10984837
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

ScreenConnect 6.0 Free Trial

Explore all the enhancements in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question