Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
paulr

transform rectangle with stroke

Recommended Posts

Hello,

 

i want to add rectangles with an stroke as transform item for scaling rectangle size and change stroke weight about slider. But i have problems to set correct bounds and selection handles. When i use scale9grid there is a space between selection bounds and rectangle depends from scaling. When i set the stroke.scaleMode to none the stroke is not recognize by selection bounds. is there a way to realize scaling shapes strokes and correct bounds?

cheers

Link to comment
Share on other sites

Do you have an example FLA that demonstrates the issue that you can post? It would be super helpful to be able to see exactly what you're looking at and publish it for myself.

 

The simpler the better - no need to post your production files.

Link to comment
Share on other sites

For example use this little mxml Snippet, for sure its not a flex only problem. I played for a while with line joins and caps and i think thats the problem. Besides there are problems with rendering around the boundary. Has anybody an approach to deal with transform detailed line properties?

 

<?xml version="1.0" encoding="utf-8"?>


                   minimum="1" maximum="30" value="10"
                   dataTipPlacement="top" 
                   tickColor="black" 
                   snapInterval="1" tickInterval="10"
                   labels="{[hSlider.minimum, hSlider.maximum]}" 
                   allowTrackClick="true" 
                   liveDragging="true"
                   change="changeSize();"/>

Link to comment
Share on other sites

Yes, actually, this isn't an issue with TransformManager - it's just how Flash deals with strokes. I spoke with one of the senior engineers on the Flash Player team at Adobe recently and he said strokes are extremely complex to deal with and can be problematic for the player. I would suggest avoiding them if you can, and instead use fills. For example, you could reproduce that rectangle with the "stroke" by just doing a gray fill with a smaller rectangle inside of it that's red.

Link to comment
Share on other sites

thanks for your commitment. i will try to imitate strokes with fills, that sounds funny.....

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×