Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

INSTANCES CONCEPT

Status
Not open for further replies.

alexfusion

Programmer
Feb 5, 2001
94
0
0
AR
Hello Everyone:
I am new on the Flash section of the Forum.
My question is very basic:
I am working with Flash 5.Maybe This would be a question for consulting the manual,but I can't get the concept of the INSTANCE.
One create a movie clip,one gives it a name.I know that the movie clip has its own time line that it is in an inferior level of the SWF time line,at least I read that in the manual.So when I can apply a property to the movie clip,such as X_scale,I have to refer to the name of the instance to apply the property and not to the name of the movie clip.I don't understand this concept.
Could anybody give me any help about this issue.
Thank you a lot!

alexfusion

mixale@hotmail.com
 
if i'm not mistaking even if it's a movie clip when you drag it into the timeline it becomes and instance of that timeline..anyways if this helps, when you name a mc it will end up being the name of the instance(if thats what you name it)..so if you wanted to apply the property x_scale to the mc named "mc1" all you have to do is when you drag the mc into the time line right click on it..go to panels..then instance..behavior should be movieclip, and then just name the movieclip mc1..thus applying the x_scale property to instance "mc1"..

i think..if not i'm sure someone will correct me..

hope that helped..
e.gif


carlsatterwhite@endangeredgraphics.com
 
Right again!
You're getting good at this Carl!

I might just add, that when you name an instance of a mc, you're giving a specific name to a copy (or 1 instance) of one particular mc. It can be the same name as the mc itself, but it really should be different so that you can use different instances of the same mc and target them specificly. Note however, that if you edit one instance of a mc, you'll be editing all the instances of that movie clip.

;-)
 
have good teachers!! :)
e.gif


carlsatterwhite@endangeredgraphics.com
 
If I could throw in my two-cents...

If you are a new user to Flash, then forgive me for going over some basics in order to make sense of this.

One you have created a symbol (any symbol: graphic, button, or MC), you drag it onto the stage. What you have is a copy of that symbol onstage, an 'instance' of the symbol. Consider the symbol the manuscript and the instances are copies of that manuscript, like paperbacks. They are exactly the same as the original symbol, but they are their own entities.

Many times, symbols are used in multiple functions on stage, so that you may have many instances of the same symbol but coded or designed for different purposes. Buttons are much this way. Many designers create a generic button symbol and use multiple instances of it for design consistency. Exact same symbol, but each instance is coded for a different purpose. Or perhaps you may like a certain shape, but you want it in different colors. You may drag many instances of a symbol onstage and tint them each a different color. Personally, I've used several instances of the same movie clip, but each named differently to be triggered by different buttons. So I can tell-target instance 'movie1' to play only when button1 is pushed, and 'movie2' with button2, etc., so the program can tell each instance apart. As long as these changes are applied only to the instance, it will not affect the original symbol. (Just dont go inside and change the innards of the symbol, or it will affect all the instances everywhere.)

Knowing the how to effectively use existing symbols and what you can do with instances can save you tremendous filesize and is worth looking into if you intend on designing Flash animation for the web.

Does that make sense? Hope it helps... Good luck with it all!

Boomph
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top