Greetings,
Just a quick question for you. I noticed that you are calling the
function by onRollOver of "ball4" (this.ball4.onRollOver). This would
imply that you have a movie clip that has another movie clip in it
called "ball4" that you have given an <instance name>. This also means
that "ball4" is the first frame in the movie clip of "this" that has
your code on it.
I am just trying to get a grasp of how you set up your timeline. It
might help to get an idea of how you structured the locations of where
these balls are at on your timline. Are they all on their own layer and
with one frame a piece? Is that why you want to swap depths, because
they are currently on top of one another?
Something like:
_root > this (current clip) > ball4
could give us an idea where you movie clip is located from the root of
your movie. Also, I see that you are defining variables (ball1_var).
Where are these being set to 0|1 and have you traced the value of these
to see what their values are?
Finally, for your gotoAndPlay commands, the code below indicates that
you want "this" to gotoAndPlay a frame. If this is correct, you could
make it absolute by saying this.gotoAndPlay("_1over4"). If you are
trying to control "ball4" then you will need to do something like
this.ball4.gotoAndPlay("_1over4");
Hope this helps, any answers you can give us on where these balls are
in your FLA and how you have them layed out on the stage will help.
- Peter Schmalfeldt
[quoted text, click to view] TiJayOldroyd wrote:
> This is the same thing I've been working on for the past 3 days (i know, I'm
> slow) As those who have helped me before have seen/known/read/forgotten - I'm
> a noob, and learning Flash...that being said...the swapDepths function eludes
> me...I understand the just of of - but the syntax and placement has me all
> bumblef**ked...With what I have so far, when I go to 'Test Movie' it does a
> pretty job of swapping depths...but, erm....it doesn't do the gotoAndPlay("blah
> blah blah") and I'm just looking at a ball that's closer to my face that
> before the onRollOver...(go ahead...laugh - you know you want to)
>
> here is the code I used - this is the first instance I decided to use it
> at...and I've moved it around a bit throughout the function () { string...HELP
> MEH
>
>
>
> this.ball4.onRollOver = function() {
> if (move_var == 0) {
> if (ball1_var == 1) {
> gotoAndPlay("_1over4")
> }
> if (ball2_var == 1) {
> gotoAndPlay("_2over4")
> }
> if (ball3_var == 1) {
> gotoAndPlay("_3over4")
> }
> if (ball4_var == 1) {
> gotoAndPlay("_4over4")
> }
> if (ball5_var == 1) {
> gotoAndPlay("_5over4")
> }
> if (ball6_var == 1) {
> gotoAndPlay("_6over4")
> }
> if (ball1_var == 0){
> if (ball2_var == 0) {
> if (ball3_var == 0) {
> if (ball4_var == 0) {
> if (ball5_var == 0) {
> if (ball6_var == 0) {
> gotoAndPlay("_over4")
> }
> }
> }
> }
> }
> }
> }
> this.swapDepths(ball6)
> this.swapDepths(ball4)
> }