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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Components & Live Preview.

Status
Not open for further replies.

fireburner69

Programmer
Aug 22, 2002
108
GR
Hello,
I am trying to make a small component in FlashMX 2004 and I have a problem with Live Preview.
I have followed some tutorials on how to make a simple component. Everything is fine.
I have made a swf that holds the live preview of the component and I am using this code to make the livepreview to work:
function onUpdate() {
this.main_box._width = _root.xch.Umw;
this.main_box._height = _root.xch.Umh;
}

Everything is working fine.

Now for the problem.
When I am using the component for a second time on the scene and change the properties both instances of the component changes.
I setup the width and the height of the mc and everytime i change the value to the component a in the live preview I can see that it changes the b also.
Although the component works fine.
In the final preview I can see that each instance of the component takes the correct value.

Any ideas of how I can make the live preview work fine and not mix up the values?
Thanks in advance.

 
Sounds like you copied the component you had on the stage and pasted that for your second instance. Instead drag a new instance of your component from the Library. That should take care of it for you.

Hope it helps.

Wow JT that almost looked like you knew what you were doing!
 
Nope this does not work.
I have search the internet and the only thing I found is that other ppl have the same problem but without any solution about it.

The strange thing is that when I do the same procedure to the main fla file that I have created the comp this problem does not happen.
This is strange I think but when I am using it from the compo library always the same.

Anyway if some one really knows anything about that It will be great help.
Thanks again for your time ppl.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top