-
1. Re: Flash actions and instance names
Ned Murphy Jul 25, 2013 5:07 AM (in response to panvulcon)Explain a little more about how you have this button implemented in the timeline, and what specific problem is arising with it.
It is understandable that actions might be getting mixed up, especially if you are using the same object with the same name.
-
2. Re: Flash actions and instance names
panvulcon Jul 25, 2013 6:42 AM (in response to Ned Murphy)Hi Ned, what i have is a layer called actions that hosts a number of actionscripts with a keyframe for each script. To save time i usually create the first frame using unique instance names and then i simply copy and paste them into subsequent keyframes. So each KEYFRAME has unique instances. I thought that by doing this i would save time by not having to re-name or reposition each instance that appears on my timeline - this would take a long time not to mention the complications it would cause should i decide to shuffle a few frames about later on. For the majority of the time everything works just fine but occasionally the timeline will jump to somewhere totally unexpected. the problem is compounded by the fact that many of these buttons control video playback, so you can imagine the mess this is causing.
If what i'm doing is bad practice then i'll happily do it the right way by naming each instance but i'm still struggling to see why actions are getting mixed up when they run on their own keyframe.
-
3. Re: Flash actions and instance names
Ned Murphy Jul 25, 2013 9:10 AM (in response to panvulcon)You didn't explain how you implement the button(s) very clearly. You talked a little bit about what you usually do with actionscript, but not much about what you do with the button(s).
Pasting the same content into different keyframes does not make them unique. It makes them the same things in different keyframes, especially so if there is no break between them in the timeline. If you have 10 keyframes in a row, each with the same object and each object with the same name (it will actually have the same name by default - the name from the first frame), that object inherits all of the code preceding it. So a button in frame 10 might be doing what you intended it to do in frame 1 along with whatever new stuff you assign to it in frame 10 and every frame in between.
I recommend isolating different objects by putting them on different layers and/or separated by blank frames.
-
4. Re: Flash actions and instance names
panvulcon Jul 30, 2013 1:36 AM (in response to Ned Murphy)The buttons were created on the first keyframe by dragging bitmaps from my library and turning them into button symbols or sometimes movieclip symbols depending on what im trying to achieve. Typically i would then name them 'back' and 'next' before duplicate the keyframes on the timeline without changing the instance names. I've found this give unexpected results when using action script so have since created unique instance names for each keyframe and the problem seems to have been fixed.
I'm still thinking that i might be doing this the long way around but everyhting seems to work so i'm happy.


