Solved

Creating a dynamic expo map in Flash

Posted on 2004-09-09
10
462 Views
Last Modified: 2006-11-17
I'm a complete noob at Flash, so please be nice.

I want to create a map that when you rollover a booth on an expo map, the company that bought that booth displays in a popup or something.  Maybe have the booth highilght as well.

I have the map of all the booths with #'s, and another file in Excel that has the Company name and the booth #'s.

How should I begin?

I figure I'll have to manually go through the map and mark each booth as a number, but how do I do that?  Do I make each one a separate movie clip?

Any help would be appreciated?
0
Comment
Question by:cbestal
  • 5
  • 4
10 Comments
 
LVL 10

Expert Comment

by:muso120999
Comment Utility
If you want the booths to highlight, you would need to create them as buttons, otherwise you could have invisible movieclips (or buttons again) hovering over the booth image.

For a rollOver effect you can either put the rollover graphic on the "over" button state, or create a separate movieclip, with a frame for each of the booth pop-ups.

If you are going to use a separate movieclip, then you will need the code "stop();" in the first frame, and "on(rollOver){_root.rollover_mc.gotoAndStop(3);}" on your buttons - where rollover_mc is the name of your movieclip with the highlights, and 3 is the frame number of the pop-up.  Again for this option you may need the code "on(rollOut){_root.rollover_mc.gotoAndStop(1);}", where frame 1 has no pop-up visible so the pop-ups disappear when rolling back out.

Obviously the button "over" state is the easier option, as it requires no code!
0
 
LVL 39

Accepted Solution

by:
blue-genie earned 400 total points
Comment Utility
this is what you want right?
simple rollover buttons, that show a company name, pulled out from excel?
I've done a quick mock up and it works out fine.

if that is what you want to achieve, here's what I've done.
First of all, your xls must be in csv format.

then, i have a movieclip on my stage that loads the csv, formats it in the format i want, and i set a variable per excel entry.

then i have a dynamci text field on the stage to receive the data.

i have the movieclips with the rollover states to which all call the function which retreives its # and pairs it to the variable i've set and displays the appropriate data in the dynamic textbox.


0
 

Author Comment

by:cbestal
Comment Utility
blue-genie, yes, that's exactly what I want to do.

a couple quesions:
1. how do you get a movie clip to automatically load a csv?

2. how does each movie clip reference it's own # and then lookup it's associated value?

Thanks
0
 
LVL 39

Expert Comment

by:blue-genie
Comment Utility
code in AS1.

1. how do you get a movie clip to automatically load a csv?

to load a csv, you simply use LoadVars as per any other data source.
all the loading is in the black box on the top left - that loads the data.

2. how does each movie clip reference it's own # and then lookup it's associated value?

I've created a function that tells the rollovers what to load based on its instance name  - you'll notice its a generic function.

go grab this file. //remember i created the excel/csv called companies.csv - so either rename your csv file, or change the code.

http://www.geocities.com/bluegenie_sa/ee/loadText.zip
let me know if you need some explanations.

blu :-)



0
 

Author Comment

by:cbestal
Comment Utility
Ok, im looking into how to use LoadVars in my movie clip.

I'd be interested in the function to get the instance name, I tried your link, but it's broken.

Thanks.
0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
LVL 39

Expert Comment

by:blue-genie
Comment Utility
hi, sorry, go have a look at the link again, i've re-uploaded it - for some odd reason it wasn't there.

must have been friday fever.
sorry.
blu.
0
 

Author Comment

by:cbestal
Comment Utility
I have found out how to obtain my MC instance name, and supply that to a dynamic text box upon MC rollover.

Right now i have a large image, with 100 movie clip instances over it, each with a different instance name.  When you rollover any MC it display it's instance name in a dynamic text box.

My problem is that I can't load the CSV file and use the values that correspond to the instance name to give to the text box.

I was able to download your zip, but I couldn't open it, as I only have Flash MX.  Could you post code that shows how to do this, and where in my .fla to put it.  

thanks.
0
 

Author Comment

by:cbestal
Comment Utility
Ok, I found out how to parse the CSV file into an array using this link: http://www.actionscript.org/forums/showthread.php3?t=30052

So I have almost everything woring, except some of my data is in the format

ID , Name
94, Booth 1
92, Booth 2
88-92, Booth 3

Is it possible to have 2 movie clips play using actionscript?  by calling _root.88.gotoAndStop() or something?
0
 
LVL 39

Expert Comment

by:blue-genie
Comment Utility
you can have as many mcs play as you want.
0
 

Author Comment

by:cbestal
Comment Utility
Thanks for the help.  I eventually got somethign working that suited my needs.  I have to manually update the movie clips whenever there are changes to the booth ID's similar to my last comment (when two numbers for the same booth),, but  at least it works.

Thanks.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
The last time I worked with Flash and Socket connections was in AS1. A recent project required flash connecting to a Socket, and sending receiving information - we figured it would be easy enough - we all know about the socket policy documents and c…
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now