Solved

Can you get a button to turn layers off and on

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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

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,…
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 motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
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…

707 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

17 Experts available now in Live!

Get 1:1 Help Now