Solved

Flash 6 - Make a clickable bmp with event handlers

Posted on 2004-04-28
3
229 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Advice in Xamarin 21 120
Need help making a program or form for inventory that exports to txt 8 50
$_GET call between URL 3 67
T-SQL Query 9 35
This is an explanation of a simple data model to help parse a JSON feed
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …

734 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