How do you set up the As?

how do you set up AS?
can you put it like this?
_root.rotation.movieclip
?

_root.movieClip._rotation

in a dot syntax blood, we simply call to movie clip instance names. Technicaly Jubba’s example, though true, doesn’t really explain why things work the way that they do. For one thing, the statement is incomplete… just as the one you posted the other night is. Here are some examples.

_root.myMovieClip._alpha=0;

in this one… we’re telling the Flash player to look in the _root timeline for a movieclip with an instance name of “myMovieClip”. Next we are telling it to look for a property called “_alpha” and telling it to set that property to 0;
Now _alpha or transparancy to the unflash oriented, ranges from 0 to 100% so you can use anything in that range as a setting. In some of the other properties that you might be setting, the range will be different. You have to learn what each of the ranges are. Most are not tough to discern… though rotation is a difficult one to understand if you don’t know about radians. (which is what _rotation is measured in.)

_parent.myMovieClip._rotation=100;

This is a proper rotation statement. In this example, we are telling the Flash player to look in the _parent timeline for our movie clip called “myMovieClip”. We are then telling it to look for the property called “_rotation” and to set it to 100 radians.

myMovieClip._yscale=50;

In this last example of the set property method, we are telling the player to look for the movie clip called myMovieClip, in the current timeline, and to set it’s up/down scale to 50%.

Those are all statements which SET a property of an object. The following is an example of the reverse… we are going to get a property.

mcyscale=_root.myMovieClip._yscale;

In this example… we’ve moved the = to the other end of the string. mcyscale is a variable which we are setting to equal, the property of _yscale in the mc called myMovieClip, which should be in the _root timeline.

Most properties can be set, but all of them can be read using similar techniques.

next thing you might see is a “constructor” method. These usually have the word “new” in them. In MX you can construct almost anything from code, including movie clips, sounds, arrays, xml trees, and more. Most you wont have to worry about… but function and array constructors you’ll probebly run into right away so I’ll show you some of those.

helloWorld = new function(){
//do something in here
}

this is a function constructor. It makes a function called “helloWorld” which does whatever is inside of it’s curly brackets. If this function were created on the main timeline then any time in the future I could simply say

_root.helloWorld();

and the player would do that function.

nameStore=new Array();

this is an array constructor. it might also look like this.

nameStore=new Array(dan,dave,phill,kirupa,edwin,kitiara);

We can also get data from the array like so;

name=nameStore[1];

This would set the variable called name to be equal to “dave”, the element in the array. (in array’s the first element is number 0)

When constructing an array we can either insert data initialy like in the latter example, or we can create the data at a later time, as in the first example. At any time, if I’ve constructed my array already, I can add data to it like so

nameStore[6]=“Mathew”;

So if we did this.

nameStore=new Array(dan,dave,phill,kirupa,edwin,kitiara);

and then later in the movie did this code

name=nameStore.toString();
trace(name);

and we tested the movie we would see this

dan dave phill kirupa edwin kitiara

come out in the output window. (trace(); will send anything you request for it to send to the output window in test mode only.)

Now if we did this.

nameStore[6]=“Mathew”;
name=nameStore.toString();
trace(name);

we would get this output

dan dave phill kirupa edwin kitiara Mathew

Hope this helps a bit. If you’ve more questions… ask away.

Thank you David. I did not have the time or patience to get into that as indepth as you…:slight_smile:

I know Jubba… few have that kind of patience. I live for it myself… but then again… I’m stuck here at work for 7.5 hours with 2.5 hours worth of actual work to do. :slight_smile: I hope you didn’t take insult to me elaborating on what you had said. I know you know your stuff.

oh no, not at all. I know we all respect each other here. I should have elaborated. I’m just really sick…my tonsils are seriously larger than golfballs and I am having trouble breathing… :frowning: Well I’m going to try to go get better.

Cheers,
Jubs

Well alright guys thx for everything especially david
Thx to all of you