Solved

Can you get a button to turn layers off and on

Posted on 2000-03-12
4
196 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

I come across a lot of question about how to access things in the document class from a movieclip, or accessing something from a movieclip in the document class. It took me a while to figure this out but once I did it makes life so much easier. …
While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
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…
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.

792 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