This content has been marked as final. Show 12 replies
The story is kind of hard to follow as to what these buttons are supposed to do. If you can show some code and explain what it is supposed to be doing, that might help clear things up.
Code is very very basic = which is why I'm confused - main issues are with the gallery where each thumbnail should expand into the large image... and doesn.t
Which, if any, of the four buttons work as desired in that file?
I think I know what your answer will be... it depends where in the pileup you are.
You should have your buttons run the full length of the timeline starting at frame 1 thru 120, and keep them in a layer at the top above the inactive layer. You can put them all on the same layer and call it "buttons" to help reduce the timeline realestate. You only need to place them and assign their on(release) code in frame 1, but the the layer needs to extend all the way to the end (meaning the black dot shows in frame 1 and the rest is gray space).
The university one sort of does.
Basically each button should when pressed.
1) vanish and be replaced by a static image.
2) a second image is placed behind and tweans to overlap the large image.
3) the black/semi alpha box covers up the static image making it look 'faded' - this bit was an experiment and might remove that layer entirely.
The university one sort of works and the 2nd image from left worked when I just had that button in but now doesn't.
It's hard to dig thru your entire timeline to see who needs to be what where. I imagine you don't want the button to be available when it is the one being displayed, so I understand why things are broken up as they are now. Scratch my earlier suggestion.
One of the problems is having a stop in the frames that you are telling things to go to. If the frame is a starting point for a transition, it will stop there rather than play, so you should have your stop(); frames and transition start frames be different frames.
The approach you are taking for this could be problematic to solve. It might be better to make each transition a movieclip of its own, and then use your buttons to tell individual movies to play out their transition. This would reduce your timeline to one frame (I think). The buttons just tell each movie to gotoAndPlay(2); Then you could have a problem where the movie that's transitioning is at a lower depth than the one being displayed, so you'd need to check if that's the case and swapDepths() for the two movies before you start the transition.
If that transition effect isn't a must have, you oughta consider doing a Google search for "AS2 slideshow tutorial". You may find one that helps, and offers the ability to have any number of images displayed. There could still be a way to retain it, but it might be best to work your way to that level from a more basic design first.
Thankyou so far, I'd really like to keep that transition in as I plan because it's a nice bit of animation. I could do it more static but it's less 'interesting' and less of a technical challenge. Not that I see what I'm doing as particularly challenging which is why I'm confused.
As for the go to and plays the labels should be the frame after the stop action - pretty sure thats how I put them - or does the stop need to be a keyframe?
From what I saw (I have since closed the file), the stop()'s were in the same keyframe as the labels. So in telling something to gotoAnd Play, if there's a stop() there, it will stop.
I think you should try the movieclip approach for the transitions with the swapDepth()'s provision so that you aren't rying to resolve the entire timeline. This will help insure that the picture being viewed remains as such when the new one transitions in. And it will reduce your timeline to one frame (I still think). Instead of using frame labels to goto, you command the movies to play after checking the depths to see if you need to swap depths first.
Not fixed it but you were sort of right. I'd set the label for the next frame after the stop() without realising it is the label for the entire keyframe/subsequent frames. Changing the labels/keyframes so the stop() is in it's own unlabeled keyframe improved things but still not behaving properly.
I think what might be happening now is it might not be coming into the right part of the movie when the gallery link is pressed.
From what I remember seeing, there was a bit of actionscript in the first frame on one of the button layers near the bottom somehwere which was telling it to go to another frame. I don't know if that was intended or a remanant from an earlier attempt at something.
sorted it - thanks to advice from a number of people including this thread.
I basically threw away what the lecturer said, got under the hood, put my coding hat on learnt enough AS2 to code all the buttons in about 2 hours :)