Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Creating a dynamic expo map in Flash

Posted on 2004-09-09
10
Medium Priority
?
473 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
[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
  • 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 1200 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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
 
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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

There are times in your Flash CS4 application when you want more than a simple pointer or a hand, and it's hard to find an ideal walk-through to tell you what to do.  I spent a few days recently learning my way around making custom cursors in Flash,…
I have found that much of my time doing support ends up being a constant repetition of the same steps to different people.  Early on I stated using web pages with Frequently Asked Questions (FAQs) to alleviate most of the burden.  Sometimes this jus…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.

718 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