Copy link to clipboard
Copied
This question was posted in response to the following article: http://help.adobe.com/en_US/as3/components/WS5b3ccc516d4fbf351e63e3d118a9c65b32-7f1b.html
Copy link to clipboard
Copied
"You can transform a RadioButton component horizontally and vertically while authoring and at run time. While authoring, select the component on the Stage and use the Free Transform tool or any of the Modify > Transform commands. At run time, use the setSize() method.".
No, both methods don't work. There is a reason why Flash is losing ground to other solutions. First and forthmost, even the documentation itself is incorrect.
I can't imagine having a setSize() method and propertiies like scaleX and scaleY when all these don't work (to make the radio button bigger).
Copy link to clipboard
Copied
actually the bounding box of the radio button does get bigger ... but visual wise, it still looks the same! Seriously one may then ask - then what's the purpose???
Copy link to clipboard
Copied
Put the RadioButton Component inside a MovieClip and then scale the MovieClip, this should give you the desired (visible) effect
Copy link to clipboard
Copied
Thanks. Using a mc as a "wrapper" does work. But what's the purpose of providing methods and properties that don't work? Worst still, the documnetation is incorrect.
Copy link to clipboard
Copied
Components in AS3 are structural different from MovieClips even if they might have properties like scaleX etc. these properties work different than in MovieClips. Google AS3 slice-9 and you will get an impression why it makes sense if you want to avoid distortion and other nasty things.
Copy link to clipboard
Copied
No, if you have checked the AS3 reference, setSize is actually a method of UIComponent. Likewise, in the AS3 component framework, scaleX is a property of the UIComponent. The inheritance structure is
UIComponent Sprite
DisplayObjectContainer
InteractiveObject
DisplayObject
EventDispatcher
Object.
MovieClip is out of the picture here.
Copy link to clipboard
Copied
Yes, thats what I said. While Adobe might have a tendency to not always make their documantation crystal clear, your sentence:
But what's the purpose of providing methods and properties that don't work? Worst still, the documnetation is incorrect.
shows that you expected the components to behave like a Sprite/MovieClip (scaling should behave similar to these: all parts of say a RadioButton Component should scale visually)
You made the mistake to expect that the word "scale" could only have one meaning, the one that you are used to (from working with normal MovieClips/Sprites).
Read this article: then the reason why components need to use another "context" to control their size will become clear.
By using MovieClip as a wrapper class you can "override" this behaviour if you want to use components in an non-standardconform way. So I really don`t see your problem here.
And why you would use that to criticize Adobe/Flash as being unprofessional, where your rant only shows that you maybe have missed the basics how to work properly with components.
Copy link to clipboard
Copied
While I appreciate your input, is the documentation ""You can transform a RadioButton component horizontally and vertically while authoring and at run time. While authoring, select the component on the Stage and use the Free Transform tool or any of the Modify > Transform commands. At run time, use the setSize() method." correct?
Copy link to clipboard
Copied
It is, actually. While you would expect the font and cirlce for the RBcomponent should transform visually if you use the tranform controls, the main purpose of components inside a componentframework is to work together with other components, and since the most common use case for radiobuttons is to be arranged aligned with other components it is useful to go the extra way of styling a component (via Textformat for example) or skinning it (if you want to change the look& feel) so that you can easily use the same textformat.
I can't imagine having a setSize() method and propertiies like scaleX and scaleY when all these don't work (to make the radio button bigger).
The component is a compiled clip, the visual part is by far not the most important part of it.
Sure Adobe could have invented a new property like scaleOnlyTheBoundingBoxX but hopefully you see while in the long run that wouldn`t be helpful.
Its a similar thing to say about a displayObjects x/y properties:
I can't imagine having a setPosition() method and propertiies like x and y when all these don't work (setting the display objects position where I want it).
Because the unexperienced user expects that a stage has only one absolute coordinate system where in fact every display object has its own.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now