Share Posted November 3, 2010 Hi. Trying to get some transform items in place. I've noticed that TransformManager SCALE (scaleX,scaleY) and NOT sets the width / height. problem here is with for e.g. video, I've attached some code for Flash Builder 4. When instead of using Matrix I tried to get TransformItem (x,y,width,height) and then set these values. The problem is here that the item puts itself to x: -6709886 y: -6709886 width: 0 height; 0 How can I use width and height instead of scale? /cheers <?xml version="1.0" encoding="utf-8"?> xmlns:s="library://ns.adobe.com/flex/spark" creationComplete="init()" xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" xmlns:transform="com.greensock.transform.*"> Link to comment Share on other sites More sharing options...
Share Posted November 3, 2010 One problem I see right away is that you didn't give your FlexTransformManager a width or height (so it's 0/0). Also, FlexTransformManager sets its bounds to its width and height by default in order to avoid bugs in the Flex framework that cause the Canvas not to update its size and scrollbars appropriately. I noticed you set the bounds to something completely different which you're welcome to do but beware of the potential problems. Again, these are bugs in Flex (confirmed by Adobe), not TransformManager. The VideoPlayer appears to not report its size/bounds correctly either which causes the selection box to be off by as much as the drop shadow. Gotta love Flex. If you want TransformManager to edit an object's width and height properties instead of its transform.matrix (scale), all you need to do is set the scaleMode parameter of the addItem() method to TransformManager.SCALE_WIDTH_AND_HEIGHT like this: manager.addItem(myObject, TransformManager.SCALE_WIDTH_AND_HEIGHT); Link to comment Share on other sites More sharing options...
Author Share Posted November 4, 2010 ah, great. Thanks for the reply. I agree with Flex, sometimes really really frustrating. Fast to get far but last percentage takes same amount of time to do it in Flash IDE from the beginning. Now it works more as I want, just a weird offset for the video. thanks <?xml version="1.0" encoding="utf-8"?> xmlns:s="library://ns.adobe.com/flex/spark" creationComplete="init()" xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" xmlns:transform="com.greensock.transform.*"> Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now