Copy link to clipboard
Copied
loader.content["getData"](libraryS,dataArray);
Hi, I am trying to understand some code
1. The loader.content returns the root display object - a movie clip (which I am loading into a container mc)
2. The getData is a function within the targeted/loaded movie clip
3. The (libraryS,dataArray) are the parameters of the getData function
So why do we use the sqaure brackets for the function name and the normal brackets for the parameters???
Cheers
object["name"] is the same thing as object.name and are quite often interchangeable.
If it compiles you could probably write that like this as well: loader.content.getData(libraryS, dateArray);
If that doesn't compile that's probably why it is done the other way.
Copy link to clipboard
Copied
object["name"] is the same thing as object.name and are quite often interchangeable.
If it compiles you could probably write that like this as well: loader.content.getData(libraryS, dateArray);
If that doesn't compile that's probably why it is done the other way.
Copy link to clipboard
Copied
Thank you very much.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now