FORUMS: list search recent posts

Can I manipulate layers using Actionscript?

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Paulo Jan
Can I manipulate layers using Actionscript?
on Dec 29, 2008 at 4:36:18 pm

Hi all:

(Warning: Flash newbie here!)

Can you use Actionscript to manipulate the layers in the timeline? For example, suppose I had designed a pop-up and put all of its graphical elements in a layer, while the background is in another layer below, and I want the pop-up to appear when the user presses a button. Can I use Actionscript to manipulate the visibility, scale, etc. of that layer? Or are the layers in the timeline only for "design" purposes, and can't be accessed programatically?

Thanks in advance.


Return to posts index

Pieter Helsen
Re: Can I manipulate layers using Actionscript?
on Dec 30, 2008 at 12:50:29 am

Layers no, instances on layers, yes.

Basically any movieclips and buttons in your movieclip can be accessed and manipulated by addressing them by their instance name (the instance name for each movieclip on your stage can be specified in the Properties window; Windows > Properties)

The way to make it visible would be:

my_popup.visible = true

Kind regards,

General notice: from now on, I would like to ask everyone to put [AS2] or [AS3] (corresponding to the version of actionscript you are using on your project) in front of their post titles when the question is actionscript related! Please help us help you faster. Thank you.

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 All Rights Reserved