PDA

View Full Version : movieClipRef


cmcginnis
05-17-2004, 03:27 PM
I'm currently upgrading my LPS 1.0 application to LPS 2.1.2 and havent found anything in the release notes about how you handle the movieClipRef property that used to be available for views.

This is what I currently have:

<view name="some_color" resource="colorbox.swf">

<method name="applyColor" args="someRGB">
var thisClass = this.parent;
this.colorControl=new Color(this.movieClipRef);
this.colorControl.setRGB(someRGB);
</method>

</view>

I am currently getting the following error in the debug window:
reference to undefined property 'movieClipRef'

Am I doind this correctly or is there a better way to do this?


Thanks

antun
05-17-2004, 03:36 PM
Is that method supposed to tint the view? If so, you'd probably want to rewrite applyColor and use view's setColorTransform() method instead.

http://www.laszlosystems.com/lps-2.1.2/docs/lzx-reference/?view.html#meth-setColorTransform

That would probably mean not needing the Color object either.

-Antun

cmcginnis
05-17-2004, 03:53 PM
No, what the method is supposed to be doing is setting the SWF asset assigned to the view to be the color passed in. To reword it, the someRBG argument that is passed in is used to set the color of the SWF resource.

Again, this used to work in LPS 1 and I need to know if I can still do something like this in 2.0+.

The method that you suggested looks like it is only for the actual view, not the SWF resource.

Thanks in advance for the help.

antun
05-18-2004, 08:36 AM
I see - use the setColor (http://www.laszlosystems.com/lps-2.1.2/docs/lzx-reference/?view.html#meth-setColor) method instead in that case. That will do the exactly the same thing as the code you posted.

-Antun

dheon09
01-04-2006, 06:14 PM
Hi Guys,

Can I have a sample of tinting(setColorTransform()) a swf/image file. I did try using the setColor, it does change the color of the image but the details became less descriptive.

Hope you can help me on this cause I badly need it for our demo app (user can change the appearance of the app).

Thanks!
-dheon09-