dcsimg
A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: layers

  1. #1
    Member
    Join Date
    Oct 2001
    Posts
    75

    layers

    is it possible to show a layer with a
    transition off a button link? i want
    to go from layer #1 to layer #2 by pressing
    a button on layer# 1. is there a way to set a
    transition show event(fade in) without it
    being a timed scene event?
    is there a script i can add to the button
    to do this-as a show-layer# /fade in /
    duration seconds/ kind of script?

    thanx,
    leb

  2. #2
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244
    You do it with scenes.

    In first scene you stop your movie in the button use either script or action to gotoAndPlay scene 2 on Scene 2 use show event for the layer

    Example attached
    Attached Files Attached Files

  3. #3
    Member
    Join Date
    Oct 2001
    Posts
    75

    one problem

    awesome. now i have one problem. i have 4
    layers. on the fourth layer, i have two buttons,
    "close window" and "back to start".
    i add a scene, hide layer 4 with a fade and
    the button takes me back to scene 1 but the
    layer does not hide. so i have page one and
    page 4 both showing.(cant use a background
    because i have an animation running behind
    the layers of type.) how do i hide the last
    layer ?
    thanx,
    leb

  4. #4
    Senior Member
    Join Date
    Apr 2004
    Location
    Los Angeles
    Posts
    198
    Hi Lib,

    You say that the 4th layer has an animation in the background. Does the animation stop before you proceed to the hidding that layer? If you do not stop that animation, that animation may be taking up CPU resources needlessly. It may be best to stop it first or not use it. If you are going to send your client back to the 4th layer, than you need to indicate that.

    Question to anyone out there, does hidding a layer stop all animation and events of that layer?

    To really help, you would need to provide a simple story board so that we can see if hidding the layer is the best way to proceed.

    I understand that this does not answer your overall question.

    Rick
    Last edited by rblanc; 03-22-2005 at 06:03 PM.

  5. #5
    Senior Member
    Join Date
    Apr 2004
    Location
    Los Angeles
    Posts
    198
    Hi Brit,

    I took your example and modified it. I want to be able to swich back to the first layer using the same button.

    I have done this but there is one problem, if you assign an effects to the object in the first layer - the switching will not work. In order for this to work, you can only use "Show." Is there a way to display "Layer 1" with an effect?

    Switcher
    See it in action:


    switcher.zip
    File download
    Last edited by rblanc; 03-22-2005 at 11:40 PM.

  6. #6
    Member
    Join Date
    Oct 2001
    Posts
    75

    about the animation

    the animation is set as a background and the layers are placed on top, so that the transparent layers (of type) can be read as the animation loops. i just settled on using a hide command on the "back to layer#1" button. no fade layer transition, but it will suffice.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center