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

x
?
Solved

Can you get a button to turn layers off and on

Posted on 2000-03-12
4
Medium Priority
?
211 Views
Last Modified: 2010-04-03
A want to draw a map, with different information on different layers.  I then want to be able to turn this information on/off with buttons.  I do not simply want to jump down the movie to a frame with more layers on, as I want people to be able to choose whatever sets of layers they require.
Is this possible?
Basically can I publish a movie with only one frame? Invisible layers?  Buttons that make a layer visible?
0
Comment
Question by:susannahbond
[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
  • 2
4 Comments
 

Accepted Solution

by:
mark_rogers earned 400 total points
ID: 2611683
I don't think that there is a way to turn layers on/off.

You will be able to use one frame in your Scene. Create your buttons (Ctrl F8) open Library (Ctrl L) and drag them in place.
!!Follow next steps because your buttons will open new swf's that can sit ontop of eachother like layers!!

Make New files (Ctrl N) for each of your layers (e.g. if there are ten layers - create ten new files.) and Publish (Ctrl/Alt/Shift S) each as 1.swf, 2.swf, 3.swf etc.

Back in the main FLA where the buttons are, double-click button 1, Actions tab, + and Load/Unload Movie.
URL box type 1.swf, Level box = 1 and OK.

Double-click button 2, Actions tab, + and Load/Unload Movie.
URL box type 2.swf, Level box = 2 and OK.
Repeat for each button.

Test Movie (Ctrl Enter) when you click on the buttons each swf should load.

Alright!
0
 
LVL 1

Author Comment

by:susannahbond
ID: 2613690
I didn't think layers could be turned on and off. Thanks for giving me a simple working answer.
(Now I can run before I can walk)

next, if you want more points, How can I get my buttons to stay in the same place, when I zoom in on the movie.  Can This be done? If not the answer is to move the buttons on to the web page, in this case, how do I translate the above button actions on to an html button?
0
 

Expert Comment

by:mark_rogers
ID: 2615337
Hey there. I am not after points, I like to help although sometimes I wish I should charge!

I am not sure if you have followed my example exactly because your buttons should not move at all.
Your LoadMovies should be seperate swf's that appear in the buttons.swf, without affecting the buttons, therefore you can zoom the movies.

To make a HTML page, use the AfterShock program that comes with Flash or Publish (Ctrl/Shift F12) as HTML with your desired settings.
0
 
LVL 1

Author Comment

by:susannahbond
ID: 2616571
I think I've done as you suggested.
I get an html page with my imbedded movie that just has buttons on it. I click the buttons and the other information appears.  
If however I then right-click and choose zoom in, I zoom in on all the "layers" together, which seems obvious. But when zoomed in, on a different part of the map, I can't see the buttons without scrolling around.
What I would like is the buttons to stay around the edge of the screen whilst people are zooming in and scrolling around the map. Is it possible to create a movie then have a window inside it showing a second movie
The first having the buttons, the second loading in all the 'layers'

0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

Sometimes you know that one object has a specific child in it, but you can't find the child. This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons.  My partner had created the toolbar usi…
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,…
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.
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.

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