PDA

View Full Version : Theory of relativity "not working"???


Abelius
04-04-2004, 02:26 PM
Is it me or Flash MX 2004 does not let you choose between "absolute" and "relative" when you are trying to write Actionscript code on a movieclip?

Here is what I mean:

I make a circle, convert it into a movieclip and call it "myMovie_mc". I also give it the instance name of "myMovie_mc". While having it selected on the main stage, I hit F9 to access the Accions panel.
I type "onClipEvent(something){", go to the next line, and then I hit the little radar button where I see the root symbol and the "myMovie_mc" instance symbol, in a tree-like form. No changes from MX to MX 2004 so far...

If I select the instance of "myMovie_mc" and select the relative radio button, I will get a

this

in the next line once I hit the OK button. But that will not let me have a dropbox of the properties of "this" if I type a period.

So I select the instance of "myMovie_mc" and select the absolute absolute radio button. This way I get a

_root.myMovie_mc

in the next line, and if I hit the period I will get a NICE dropbox of all the properties, events and methods available to the movieclip...

Apparently this doesn't happen in Flash MX 2004. No matter which radio button I select; I get "this" instead of "_root.myMovie_mc"...
The only way around it would be to type the whole actionscript snippet in the first frame of some "actions" layer, but that's NOT what I want to do. I want to be able to type the actions on the movieclip I am dealing with, not inside some frame of some layer...

Anyone else noticed it, or am I wrong with this theory of relatiivity...? :)

divarch
04-04-2004, 03:31 PM
Yep, that thing is changed to, IMHO, a more convenient manner, because:
Why on Earth would you refer to the clip, with absolute path, if the code is on the clip itself? Because of the code hints ...?
This way, AS kindly reminds you on which clip are you putting the code.
If you have several clips, then the 'target path' works as it should.

If you need code hints, then just type '_mc' and a dot, to trigger them, when you select the method(prop) you wish, just replace the '_mc' with this... That is a workaround. :)

Abelius
04-05-2004, 10:49 AM
Basically that's what I am doing, but with Flash MX, when I was working with "absolute mode" I didn't have to do this workaround... :)

Anyway, thanks for the answer! :)