Solved

Flash 6 - Make a clickable bmp with event handlers

Posted on 2004-04-28
3
225 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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
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 …

744 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now