Share Posted August 2, 2010 Hi Jack, I see in the ASDocs of TransformManager that there are minScale and maxScale properties. But I am using scaleMode TransformManager.SCALE_WIDTH_AND_HEIGHT, would it be possible to add the properties minWidth, maxWidth, minHeight & maxHeight? I need that functionality for my current project. Thank you! A very satisfied TransformManager customer . Link to comment Share on other sites More sharing options...
Author Share Posted August 2, 2010 Another request; would it be possible to add a setting for the border width of a selection? Just like you can change the color? Link to comment Share on other sites More sharing options...
Share Posted August 3, 2010 It’s rather complex actually to do a minWidth/minHeight/maxWidth/maxHeight because typically in Flash, width/height are measured by an object's bounding box which changes based on the object’s rotation whereas scaleX/scaleY are always consistent regardless of orientation. I'd need to choose one way to go if I implemented the feature and if I choose to make width/height always be measured the same regardless of rotation, I think it'll help the most people but may frustrate others because of the expectation that width/height are always measured based on the bounding box. Either way I go it'll disappoint some users. I’ll consider tackling this sort of functionality in version 2 of TransformManager. As for the line width, you're the first to ever request such a think and I don't think it would be a popular option so I'm not sure I want to add to the API, but you're welcome to tweak the source code to accommodate that functionality. It shouldn't be terribly complex. Let me know if you need help with it. I appreciate the suggestions. Feel free to keep 'em coming. Link to comment Share on other sites More sharing options...
Share Posted September 4, 2010 I just posted version 1.92 which adds new minWidth, maxWidth, minHeight, and maxHeight properties to TransformItem. No need to wait for v2 Snag it in your GreenSock account at https://www.greensock.com/account/ Link to comment Share on other sites More sharing options...
Share Posted September 17, 2010 Hi, I am interactively drawing a horizontal line and have added it to a transform manager. All is working well except now I'd like to constrain the height so that I can stretch the line to be longer or shorter without making it fatter. I am not sure if this can be done. One approach might be to use something like: clip1Item.maxScaleY = 1; clip1Item.minScaleY = 1; Can this be done? If so, what would be the correct syntax? Thank you -mat Link to comment Share on other sites More sharing options...
Share Posted September 17, 2010 I'd need to see your code to know for sure, but yes, I believe you'd need to set the minScaleY and maxScaleY. Are you asking because that didn't work? Link to comment Share on other sites More sharing options...
Share Posted September 17, 2010 Here is some of the code. var manager:TransformManager=new TransformManager({targetObjects:[],allowDelete:true,autoDeselect:true,arrowKeysMove:true,hideCenterHandle:true}); MovieClip(parent).Layout.Lines.addChild(array[increm]); var clip1Item:TransformItem=null; clip1Item = manager.addItem(array[increm]); clip1Item.maxScaleY = 1; clip1Item.minScaleY = 1; Do you have examples of code somewhere so that I can see the sytax in use? Thanks Link to comment Share on other sites More sharing options...
Share Posted September 17, 2010 Well, I'm not sure I really understand what you're trying to do which is why I was asking for you to post an example Flex project. That way, I can quickly compile it and see exactly what the problem is visually and I can add trace() statements, etc. if any troubleshooting is necessary. Could you zip up a Flex project and post it here? (if it creates an fxp, just make sure you zip it otherwise the forum software won't allow it to be posted). Link to comment Share on other sites More sharing options...
Share Posted September 17, 2010 I'm not using Flex. I'm using Flash and exporting an swf Link to comment Share on other sites More sharing options...
Share Posted September 17, 2010 Ah, even better! (I'm not a fan of Flex). Can you post a simple FLA that demonstrates the issue? 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