Solved

Can you get a button to turn layers off and on

Posted on 2000-03-12
4
176 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
  • 2
  • 2
4 Comments
 

Accepted Solution

by:
mark_rogers earned 100 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

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

This is intended to introduce all collision detection principles in flash, their strengths, weaknesses and workarounds. The main method for Collision Detection in flash is using hitTestObject. But unless you'll be pushing rectangular shapes without …
I know the transition can be hard. We got used to the ease of use ActionScript 2 had, but honestly, it became problematic later on, especially if designers were involved in the project and found it easy to add code as they saw fit. So, this artic…
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.

914 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

15 Experts available now in Live!

Get 1:1 Help Now