Solved

Creating a dynamic expo map in Flash

Posted on 2004-09-09
10
465 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
ID: 12022019
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
ID: 12024971
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
ID: 12029833
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
ID: 12041792
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
ID: 12046879
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 39

Expert Comment

by:blue-genie
ID: 12052837
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
ID: 12055718
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
ID: 12059662
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
ID: 12061973
you can have as many mcs play as you want.
0
 

Author Comment

by:cbestal
ID: 12180920
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Add 'birds singing' to homepage 5 100
how can flash builder 4.X version make use of java 8 5 265
free photo watermark software 5 77
Play RTMP without Flash 3 409
This is a very simple example to help those of you who are still migrating from AS2 to AS3 understand the redesigned event model in AS3. In AS2.0, event functions (that is, the function to be performed when an event is fired) were stored as a pro…
Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

932 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

18 Experts available now in Live!

Get 1:1 Help Now