PDA

View Full Version : get ready for another easy problem...


kateWoolley
09-24-2002, 08:29 AM
Hi.
After reading the other threads from simple stuff, I felt brave enough to ask my question, for a problem that I am convinced is so simple that I can't see it.

I'm not completely ignorant of Flash, but this one has me stumped :(:

I'm working from a book called Flash MX Studio, it's by Macdonald (et al). I'm stumped on THE FIRST tutorial on movement (Making a movie clip with easing)... I can't get it to work.

The directions say to open up a new Flash file (550x400 with 31fps), draw a black circle, convert it to movie clip (F8), and name it. (seems simple enough)

Then you add another layer beneath the circle layer, and (making sure you're in expert mode)enter the code on the blank layer that is underneath the circle layer:

ball_mc.onEnterFrame = function() {

this._x += (this._parent._xmouse-this._x)/4;
this._y += (this._parent._ymouse-this._y)/4;
};

after that you save, and then play it, and the ball is supposed to follow the cursor. well, it DOESN'T WORK, at least not for me. I am very frustrated, as I have re-done this experiment several times assuming it's something I was doing wrong.

I'm also curious that it seems to be only One frame that they want you to create... I wonder whether or not the problem is that there is no where for the movie clip to go since you've only made the one frame?and that there are no other frames in which to play? or is that way off base? I've made other basic movies (involving keyframes and continuous tween movement) before with movement, which is why I am wondering this...

I would greately appreciate any help you could give before I go insane!

Thanks,
Kate.

Billy T
09-24-2002, 08:42 AM
you dont need extra frames because you are animating with actionscript

you have to make sure your mc has an instance name of ball_mc

cheers

kateWoolley
09-24-2002, 09:45 AM
first of all, thank you for your timely reply...

secondly...

*sniff* I did just that... I even started over (again) and imported the movie clip from the library (which stated it was the instance of ball_mc), re-wrote the code in a separate layer underneath (the same code as before)... No joy.

:mad:
very frustrating.

there isn't a chance that it has anything to do with the fact I'm working with a trial copy of flash? Just trying to cover all possibilities...:confused:

...kate...

kateWoolley
09-24-2002, 09:52 AM
okok...

I repeated the experiment again, only this time noticed that it read the instance as ball_mc, yet still had a field that said <instance name>. I inserted ball_mc, thinking yet again that it wouldn't work, and :eek: whoooooooooooopeeeeeeeeeee!!!!!!!!!!!
it did.

Like I said, I knew it was staring me in the face. I kept re-reading the email and going back and trying again... I'm slow, but good thing is I ain't stoopid:)

thank you so much for the help:)...
kate.

Billy T
09-24-2002, 11:01 AM
forgetting to add an instance name is extremely common for newbies

good news is you'll probably never have that problem again ;)

cheers

Artie Effem
09-24-2002, 11:43 AM
forgetting to add an instance name is extremely common for newbies

After 3 years, I still screw that one up on a regular basis! Because its so obvious I'm always looking to fix a more complex problem.

kateWoolley
09-24-2002, 11:57 AM
I've done other types of programming before, and I ALWAYS manage to forget the simple things. At least I'm glad to see I'm not the only one!:D

And you're right, BillyT, I'll Probably not forget this one in a hurry!