Flash Q
- Started
- Last post
- 13 Responses
- springbok
Hi all,
I am trying to edit a library item with actionscript, is that possible????
I have a generic btn, and I am trying to change this buttons colour depending on which btn they have clicked. If i could only edit the library item it would change all the btns on the stage?Am I making sense?
Thanks in advance
- joyride0
you can only use AS to effect items on the stage. If a library item is not used in the movie it doesnotexist
- springbok0
ok thanks joyride
- UndoUndo0
if you edit a symbol in the library that is used as multiple instances on the stage all of the items on the stage will reflect the change you made to the item in the library
- springbok0
Cheers,
So how would i go about doing that?
- UndoUndo0
double-click the item in the library and it will allow you to edit it
- PonyBoy0
dynamically attach a movieClip to an existing timeline/movieClip using AS... then you can call that MC and adjust all pieces it contains as long as you labeled them in the library item.
once you've designed/produced an MC and it's in the library... right click on it... select it 'linkage' from the menu and label it something unique. Then, somewhere on the main time line, use 'attachMovie' to place it dynamically on the stage. The attachMovie function has specific parameters that will allow you to give the attached library item an instance name etc so you can 'call it' and adjust (via button clicks or timeline actions) during playback.
Here's some info on 'attachMovie': http://livedocs.macromedia.com/f…
- ornj0
After you attach the movie you can use actionscript to change teh appearence of it. Do some experimentation and you will find that what you want to do is pretty much doable. If you use this movieclip enough and change enough about it it might make sense to make a class extending the MovieClip class so you can automatically create new objects and have it's properties set from the start.
- springbok0
how would i go about doing that, do u know any tuts?
- material-10
you can also place MC on the stage and use the properties dialog box/tint feature to change the color or alpha of a movie clip
- material-10
you can also do this via actionscript bt google may be the way for this
- springbok0
cheers material
- CyBrain0
The linkage and attachMovie scenario Ponyboy describes is the way. After that, you can change individual properties with action script and then duplicate that movie and place them where you want.
Show us what you end up with. Post a link.