[flexcoders] Configuring RemoteObject destinations (Flex 2)

2006-03-15 Thread Jason Y. Kwong
This came up cause I was configuring my Flex 2 app to communicate with ColdFusion, but I suppose it applies to RemoteObject in general. In order to tell your app the location of a web service destination, we're told to add something like this to the compiler command line:

Re: [flexcoders] Flex2/ColdFusion connectivity : session scope problem

2006-03-19 Thread Jason Y. Kwong
I hope someone is actually looking into this. Here's a log of the null pointer exception when trying to use J2EE sessions. It's not terribly useful as the stack trace is not shown, but it does show that the exception occurred when trying to access the ColdFusion service, most likely the adapter

Re: [flexcoders] Is there a way to change the default error color of the TextInput border?

2006-03-22 Thread Jason Y. Kwong
It's controlled by a global style as it's not specific to the TextInput component:mx:Style.ErrorTip { borderColor: #00FF00 }/mx:StyleorStyleManager.getStyleDeclaration (ErrorTip).setStyle(borderColor, 0x00FF00);On 3/22/06, Libby [EMAIL PROTECTED] wrote:I've been messing with StyleName,

Re: [flexcoders] Re: Is there a way to change the default error color of the TextInput border?

2006-03-22 Thread Jason Y. Kwong
Sorry, I thought you meant Flex 2. I haven't used Flex 1.5 so I'm not much help there.On 3/22/06, Libby [EMAIL PROTECTED] wrote:Is this code Flex 2.0? My StyleManager (v1.5) doesn't seem to have the method getStyleDeclaration().Thanks,Libby--- In flexcoders@yahoogroups.com, Jason Y. Kwong

[flexcoders] Flex 2 B2: @ operator resolving to local variables?

2006-03-30 Thread Jason Y. Kwong
I'm seeing some strangeness with the @ operator: var foo: String = hello; @foo = goodbye; trace(foo); //Traces out goodbyeWhy does @foo resolve to foo? Is this expected behaviour? If foo is a property and not a local variable, I get a compiler error (as expected). -- Flexcoders Mailing

Re: [flexcoders] Run shortcut

2006-04-03 Thread Jason Y. Kwong
I go to the Modify tab of the Keys preferences screen and do this:- select Run/Debug from Category dropdown- select Run Flex Application from Name dropdown- click the Name edit box under the Key Sequence section - press the key-combo I want (eg. Ctrl-Enter)- click Add then click Ok.This worked

Re: [flexcoders] Configuring RemoteObject destinations (Flex 2)

2006-04-03 Thread Jason Y. Kwong
For our production environment, our SWFs are served from the same machine that our ColdFusion server resides on, so using {server.name} or {context.root} works fine when configuring destinations. During development, I compile and test SWFs locally. I don't run ColdFusion locally--we have a

[flexcoders] Flex 2 B2: Menu interfering with Alert popup

2006-04-03 Thread Jason Y. Kwong
Ok, this is a pretty obscure bug, but the scenario isn't so weird. The following app creates a menu and has a button that causes it to be shown. When the menu item is clicked, it pops up an alert box: ?xml version= 1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml

[flexcoders] Flex 2: height and width of Loader when loading SWF

2006-04-03 Thread Jason Y. Kwong
When the Loader loads a Flash 7/8 SWF, its height and width properties are set to the SWF's stage height and width. The thing is, the SWF could size its content dynamically so that it's actually larger than specified. The larger SWF is displayed properly in the Flex app and the contentHeight

Re: [flexcoders] Few issues

2006-04-04 Thread Jason Y. Kwong
An IP address like 192.168.1.103 is a local IP address assigned by a router (most likely a Linksys, right?). An outside machine (not on your LAN) won't be able to see your machine via that IP. At least that's my take on the situation...On 3/28/06, angelosalsa [EMAIL PROTECTED] wrote: Hi

Re: [flexcoders] Flex beta 2 - add, remove and moving DataGridColumn

2006-04-04 Thread Jason Y. Kwong
I've noticed that you can't actually manipulate the columns property directly cause it looks like the grid returns a copy of its internal columns array. eg: trace(grid.columns == grid.columns); //outputs false So doing things like grid.columns.push(...) doesn't change anything, even if you call

Re: [flexcoders] What is Incompatible override??

2006-04-04 Thread Jason Y. Kwong
The function signatures have changed. eg:callProperty(name:Object, ... args):*has changed to:callProperty(name:*, ... args):* On 4/4/06, sn197412 [EMAIL PROTECTED] wrote: Hi.I'm trying to compile a [EMAIL PROTECTED]But I got errors every override lines.What is Incompatible

Re: [flexcoders] in operator (F2B2)

2006-04-04 Thread Jason Y. Kwong
In AS3, the in operator will iterate only through dynamically added properties. Properties/methods that are declared as part of the class are not included, so it will show nothing for the Label. On 4/4/06, David Moylan [EMAIL PROTECTED] wrote: I want to clone an mx:Label object.I thought I

Re: [flexcoders] Re: Few issues

2006-04-06 Thread Jason Y. Kwong
@yahoogroups.com , Jason Y. Kwong [EMAIL PROTECTED]wrote: An IP address like 192.168.1.103 is a local IP address assigned bya router (most likely a Linksys, right?).An outside machine (not on your LAN) won't be able to see your machine via that IP. At least that's my take on the situation... On 3/28/06

Re: [flexcoders] Accessing methods/properties (Flash 8 movies in Loader component)

2006-04-10 Thread Jason Y. Kwong
Ok, say the Flex side needs to call methods on the Flash side. We set up a LocalConnection so that the Flash side acts as a server and the Flex side connects to it. In Flash 8: lc = new LocalConnection(); lc.connect(MyFlashServer); //Give it a unique name//Define callable methods

Re: [flexcoders] Re: Tree drag drop: how to get node where item is dropped

2006-08-18 Thread Jason Y. Kwong
I've running into this myself right now as well. If you look at the Tree code, you can see that the drop parent is being tracked in the variable _dropData.parent. It gets calculated in the method updateDropData(). Unfortunately, both the variable and the method are private, so they're useless

Re: [flexcoders] Re: Tree drag drop: how to get node where item is dropped

2006-08-21 Thread Jason Y. Kwong
: I'm glad it's not just me! So, were you able to get something working for your scenario? Anyone from the Adobe team want to confirm this and/or offer alternative solutions? thanks, Thunder --- In flexcoders@yahoogroups.com, Jason Y. Kwong [EMAIL PROTECTED] wrote: I've

Re: [flexcoders] FlexPrintJob problem: application background colors showing in margins

2007-01-17 Thread Jason Y. Kwong
Since there doesn't appear to be any follow-up to this topic, I'll provide an example. I recently started working with printing (using 2.0.1) and noticed this problem of the background colour bleeding through into the margin of the printed output. This might be printer/driver specific, though.

Re: [flexcoders] Re: remoting with public access modifier in cfc

2007-01-25 Thread Jason Y. Kwong
I've been tinkering with the services-config.xml file in the wwwroot/WEB-INF/flex/ directory, specifically the method-access-level switch. The thing is, it doesn't seem to do anything (yes, I did restart the CF server). Whether it is set to public or remote, any Flex app can access both public

[flexcoders] Runtime CSS problem with SWFLoader

2007-09-29 Thread Jason Y. Kwong
I've got an app which loads different runtime CSS SWFs to change its appearance at runtime. Everything works fine. However, if I load this app inside another app using SWFLoader, the style changes don't happen. At best, some of the new styles are applied, but never all. I can confirm that the

Re: [flexcoders] Runtime CSS problem with SWFLoader

2007-09-29 Thread Jason Y. Kwong
[mailto:[EMAIL PROTECTED] *On Behalf Of *Jason Y. Kwong *Sent:* Saturday, September 29, 2007 1:05 PM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] Runtime CSS problem with SWFLoader I've got an app which loads different runtime CSS SWFs to change its appearance at runtime

Re: [flexcoders] Runtime CSS problem with SWFLoader

2007-09-30 Thread Jason Y. Kwong
to be ApplicationDomain.currentDomain. If you care why, see my modules presentation on my blog (blogs.adobe.com/aharui) -- *From:* [EMAIL PROTECTED] ups.com [mailto:[EMAIL PROTECTED] ups.com] *On Behalf Of *Jason Y. Kwong *Sent:* Saturday, September 29, 2007 1:05 PM

[flexcoders] Flex 2: Component inheritance?

2005-12-30 Thread Jason Y. Kwong
I'm relatively new to Flex 2 and what I'm trying to do is to create a set of custom MXML components that share the same AS base class. So I start with the base component, an empty container to which I add properties/methods via AS. Call it Base.mxml:?xml version=1.0 encoding=utf-8?mx:Canvas

Re: [flexcoders] Flex 2: Component inheritance?

2006-01-02 Thread Jason Y. Kwong
Base.mxml to be Base.as if there weren't visual children Public class Base extends Canvas { //declare properties and methods } Matt From: flexcoders@yahoogroups.com [mailto: flexcoders@yahoogroups.com] On Behalf Of Jason Y. Kwong Sent: Friday, December 30, 2005 10:44 AM

Re: [flexcoders] Custom Tree Icons Flex 2.0

2006-01-30 Thread Jason Y. Kwong
This works for me: mx:Script ![CDATA[ [Embed('item_bullet.png')] private var ITEM_BULLET_ICON: Class; ]] /mx:Script mx:Canvas width=100% height=100% mx:Tree defaultLeafIcon=ITEM_BULLET_ICON /mx:Tree /mx:CanvasOr you can short-hand it a bit: mx:Tree

Re: [flexcoders] Re: Custom Tree Icons Flex 2.0

2006-01-30 Thread Jason Y. Kwong
... the documentation for 2.0 still states that the embedded asset be typed as String.So it works as a String in 1.5,but I've tried both String and Class in 2.0 with no luck.Thanks,Brendan--- In flexcoders@yahoogroups.com, Jason Y. Kwong [EMAIL PROTECTED]wrote: This works for me: mx:Script ![CDATA[ [Embed

[flexcoders] Creating that Validator popup message? (Flex 2.0)

2006-02-01 Thread Jason Y. Kwong
The Validator objects are not appropriate for what I'm doing, but I do like the way they popup that text bubble message when validation fails. Is there a way to manually create/show/hide such popup messages? -- Flexcoders Mailing List FAQ:

Re: [flexcoders] Creating that Validator popup message? (Flex 2.0)

2006-02-02 Thread Jason Y. Kwong
Ah yes... This led me to discover the ToolTipManager class. Its createToolTip() method can be used to arbitrarily create both regular and error tooltips. Very handy. On the down side, the class doesn't seem to offer up its tooltip placement algorithm. Oh well. On 2/1/06, Stephen Gilson [EMAIL

Re: [flexcoders] Closable Panel? (flex2)

2006-02-03 Thread Jason Y. Kwong
I ran into a similar situation a while ago where I needed to add stuff to the panel's title bar. While it's possible to use a Canvas to lay stuff on top of a Panel, this doesn't work if you're trying to create a re-useable custom Panel because the resulting component is a subclass of Canvas,

Re: [flexcoders] flex string to interger

2006-02-03 Thread Jason Y. Kwong
In AS3 you can now cast directly to int too. eg:var s: String = 123;var i: int = int(s);And, you know, it's interesting that the following works:var s: String = 123;var i: int = s * 10; //You get 1230 But this doesn't:var s: String = 123; var i: int = s;You get a compiler error: Implicit

[flexcoders] Passing nested objects to ColdFusion via WebService

2006-02-04 Thread Jason Y. Kwong
I'm attempting to call a CFC from a Flex 2.0 app. I would prefer to use RemoteObject but our ColdFusion server is running on Linux so we've got no Flex Connectivity. So I'm still using the WebService object to make calls via SOAP. This works fine normally, but things mess up if I try to pass a

Re: [flexcoders] Re: Tree control in Flex 2 Beta 1

2006-02-06 Thread Jason Y. Kwong
I'm really at a lost as to how we're supposed to work with the hierarchical data that's used with the Tree component. The XML approach seems to be the most supported at the moment, so consider this simple XML: var rootNode: XML = node label=Root node label=Child1/ node label=Child2/

Re: [flexcoders] Re: Tree control in Flex 2 Beta 1

2006-02-07 Thread Jason Y. Kwong
Michael,Thanks for your timely response. It does clear up a few things. My comment about the XML approach being more supported was an (admittedly) obscure reference to my own experiments with the ITreeDataDescriptor interface. It again goes back to visually updating the Tree. If the

Re: [flexcoders] Re: Tree control in Flex 2 Beta 1

2006-02-07 Thread Jason Y. Kwong
Hari,Thanks for the code sample. It has given me a couple of ideas.Cheers! -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com SPONSORED LINKS

[flexcoders] Bug with Tree disclosure icon

2006-02-07 Thread Jason Y. Kwong
It worked fine in the Alpha, but with Beta 1, setting a Tree's disclosure icon makes the icon unresponsive to mouse clicks. My example:mx:Tree width=294 height=262 disclosureClosedIcon=@Embed('blue_icon.png') /mx:TreeNow when you click on the disclosure icon, the node does not expand. My icon

Re: [flexcoders] Flex 2 addTreeNode

2006-02-07 Thread Jason Y. Kwong
To answer your specific question about adding nodes... Since you have an XML dataProvider, the selectedNode property will return an XML object. You can then use the appendChild() method to add child nodes. eg: var node: XML = XML(tree.selectedNode); node.appendChild(node label=newchild); On

Re: [flexcoders] embed a movieclip

2006-02-08 Thread Jason Y. Kwong
I'm actually trying to do something similar. What I've found so far should be able to help you. You need to load the SWF via the Loader component and then use its content property:mx:Loader id=myloader source= SimpleSWF.swf complete=onComplete()/private function onComplete(): void{ var swf:

Re: [flexcoders] embed a movieclip

2006-02-08 Thread Jason Y. Kwong
to go. It's a useable workaround at this point. On 2/8/06, Jason Y. Kwong [EMAIL PROTECTED] wrote: I'm actually trying to do something similar. What I've found so far should be able to help you. You need to load the SWF via the Loader component and then use its content property:mx:Loader id=myloader

Re: [flexcoders] embed a movieclip

2006-02-08 Thread Jason Y. Kwong
] wrote: Have you successfully set a getter/setter property? - Original Message - From: Jason Y. Kwong To: flexcoders@yahoogroups.com Sent: Wednesday, February 08, 2006 3:08 PM Subject: Re: [flexcoders] embed a movieclip Ok, I found something interesting about this. You can

Re: [flexcoders] embed a movieclip

2006-02-08 Thread Jason Y. Kwong
For what it's worth, here's a quick little example:http://corefile.net/LoadSimpleSWF.zip -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com

Re: [flexcoders] Flex2 Tree

2006-02-10 Thread Jason Y. Kwong
I have noticed that the following two lines are not equivalent: dataProvider = classpaths label=Class Paths/classpaths; dataProvider = XMLList(classpaths label=Class Paths/classpaths);The first results in an ArrayCollection dataProvider while the second one results in an XMLListCollection.

[flexcoders] Re: Passing nested objects to ColdFusion via WebService

2006-02-13 Thread Jason Y. Kwong
*BUMP*Sorry for the repost, but I know that the Adobe folks were pretty occupied last week. Trying this one again...On 2/4/06, Jason Y. Kwong [EMAIL PROTECTED] wrote:I'm attempting to call a CFC from a Flex 2.0 app. I would prefer to use RemoteObject but our ColdFusion server is running

Re: [flexcoders] Re: Passing nested objects to ColdFusion via WebService

2006-02-14 Thread Jason Y. Kwong
Thanks for your response. I know this is a pretty obscure problem.Unfortunately, I've turned on all the logging I can for the CF server. CF has no problems with nested objects and the like. I did these kind of calls all the time using remoting with Flash. Perhaps it isn't a Flex issue but a

[flexcoders] Problem binding to ColorPicker.selectedColor (Flex 2.0)

2006-02-14 Thread Jason Y. Kwong
It's not a huge problem, but it's good to get these things fixed...When binding to ColorPicker.selectedColor, it works fine if the user manually changes the selected colour. However, if the property is changed programmatically, the binding does not execute. It has caused some minor headaches on

[flexcoders] Uncaught exceptions in Flex 2.0

2006-02-14 Thread Jason Y. Kwong
When using the Loader component to load a Flash 8 swf, I normally get a couple of uncaught exceptions that appear via a pop-up window:ReferenceError: Error #1056: Cannot create property __OnEnterFrameBeacon on _TestApp_mx_managers_SystemManager ReferenceError: Error #1056: Cannot create

Re: [flexcoders] Uncaught exceptions in Flex 2.0

2006-02-16 Thread Jason Y. Kwong
errors, you can't just muck with the root anymore. From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Jason Y. Kwong Sent: Tuesday, February 14, 2006 10:30 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Uncaught exceptions in Flex 2.0 When

[flexcoders] Problems with Tree and XML.setChildren() (Flex 2)

2006-02-16 Thread Jason Y. Kwong
I have a Tree with an XML dataprovider. I noticed a couple of problems when using the setChildren() method on the source XML object. First, if a branch has children and is open in the Tree, the player crashes if I call setChildren() and pass it an empty XMLList (to clear the children). Second,

[flexcoders] Code hint quirk in Flex Builder 2

2006-02-16 Thread Jason Y. Kwong
This is about editing files outside of the current project. Code hints/completion works fine if I open a file via the [classpath] classes folder hierarchy, but if I open a file via Go to Definition (or Ctrl-click an identifier), code hinting does not work. Again, passing this along... --

[flexcoders] Forced to use MoveEvent?

2006-03-10 Thread Jason Y. Kwong
My custom component broadcasts an event called move. So I declare it in the MXML: mx:Metadata [Event(name=move, type=flash.events.Event)] /mx:Metadata And then later dispatch it: dispatchEvent(new Event(move));But I get a runtime error when dispatching: Type Coercion failed: cannot convert

[flexcoders] Re: Forced to use MoveEvent?

2006-03-10 Thread Jason Y. Kwong
Actually, never mind. I think I figured it out. An event named move was already declared previously by the framework. I guess I should just call it something else. An interesting scenario, anyway... On 3/10/06, Jason Y. Kwong [EMAIL PROTECTED] wrote: My custom component broadcasts an event

[flexcoders] Flex 2 Beta 3: Move effect no longer respects layout constraints

2006-05-31 Thread Jason Y. Kwong
I have a Canvas with a border and it contains a TextArea. The Canvas is intentionally made larger than the TextArea via layout constraints. I then apply a Move effect to the Canvas. While the Canvas is moving, the size of the Canvas gets reduced to the minimum size required to contain the

[flexcoders] Re: Flex 2 Beta 3: Move effect no longer respects layout constraints

2006-06-06 Thread Jason Y. Kwong
I know this isn't an overly critical issue, but it's real ugly. Does anyone have a workaround for this? Or at least confirm that it'll be fixed in the production version? Thanks.On 5/31/06, Jason Y. Kwong [EMAIL PROTECTED] wrote: I have a Canvas with a border and it contains a TextArea

Re: [flexcoders] Re: F2b3: e4x XML object as Tree dataprovider, how to refresh tree display?

2006-06-06 Thread Jason Y. Kwong
I've noticed one other problem: If a Tree's showRoot property is set to false, not even calling invalidateList() will refresh the display. In fact, I can't find any way to get the Tree to refresh in such a case. Any ideas? On 5/25/06, Michael Montagna [EMAIL PROTECTED] wrote: Post beta3,

Re: [flexcoders] Re: F2b3: e4x XML object as Tree dataprovider, how to refresh tree display?

2006-06-06 Thread Jason Y. Kwong
children are in the XML. Must be a problem with the Tree's refresh logic. On 6/6/06, Jason Y. Kwong [EMAIL PROTECTED] wrote: I've noticed one other problem: If a Tree's showRoot property is set to false, not even calling invalidateList() will refresh the display. In fact, I can't find any way to get

Re: [flexcoders] Re: F2b3: e4x XML object as Tree dataprovider, how to refresh tree display?

2006-06-06 Thread Jason Y. Kwong
definitely cause the tree to refresh. In 1.5, we could do myTree.dataProvider = myTree.dataProvider; Tracy From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Jason Y. Kwong Sent: Tuesday, June 06, 2006 3:46 PM To: flexcoders@yahoogroups.com Subject: Re

[flexcoders] F2B3: Error when passing single object to CF function

2006-06-07 Thread Jason Y. Kwong
I'm not sure if this is an entirely Flex problem, but I don't recall seeing this when using Flash Remoting. The problem arises when trying to do a RemoteObject call to a CF function that has one required argument that's a struct. eg: cffunction name=CallMe access=remote returntype=struct

[flexcoders] F2B3: Custom event type not used/recognized in MXML

2006-06-07 Thread Jason Y. Kwong
I have a very simple MXML component with a custom event:-?xml version=1.0 encoding=utf-8?mx:Canvas xmlns:mx= http://www.adobe.com/2006/mxml width=400 height=300 mx:Metadata [Event(jump, type=MyNewEvent)] /mx:Metadata mx:Button x=10 y=10

[flexcoders] F2B3: DataGrid bugs

2006-06-13 Thread Jason Y. Kwong
1. When editing a cell, pressing the Esc key should close the editor and cancel the edit. Currently, the editor is closed but changes made by ther user is written back to the dataprovider.2. The verticalScrollPosition property is not bindable. If you try to bind to it, you get the compiler

[flexcoders] F2B3: Editable DataGrid focus problem

2006-06-15 Thread Jason Y. Kwong
With an editable DataGrid, select a row to give the grid focus. On the desktop, bring some other application to the foreground. Then go back and click on the Flex app that's running in the browser (click on the app, not on the browser window title bar). The grid will then put a cell into edit

[flexcoders] Flex2B3: Bug when setting htmlText in TextInput

2006-06-15 Thread Jason Y. Kwong
If you set the htmlText property of a TextInput control, any changes you make to the text property is ignored afterwards. This is a bug in the commitProperties() method. There's a block of code that looks like this: if (htmlTextChanged) { textField.htmlText = _htmlText;--- textChanged =

Re: [flexcoders] Re: TextInput and ESC key **bug**

2006-06-19 Thread Jason Y. Kwong
This is actually caused by this bug I posted a few days ago:http://groups.yahoo.com/group/flexcoders/message/39749When you hit Escape, the TextInput control reverts to the previous value by assigning it to the htmlText property. Once it does that, the text property is no longer useable. You can

Re: [flexcoders] Re: Flex2B2 - cut off any gui controls that appear outside of parent container

2006-06-20 Thread Jason Y. Kwong
=number2/ /mx:Canvas /mx:HBox thanksbod--- In flexcoders@yahoogroups.com, Jason Y. Kwong [EMAIL PROTECTED]wrote: Have a nested container do the clipping for you. eg: mx:HBox width=300 height=100 backgroundColor=yellow mx:Button label=number1 width=75%/ mx:Canvas width=25% horizontalScrollPolicy=off

Re: [flexcoders] Re: Flex2B2 - cut off any gui controls that appear outside of parent container

2006-06-20 Thread Jason Y. Kwong
=100% label=number2//mx:Canvas/mx:HBox/mx:Applicationif i was using a Canvas instead of an HBox in the above example. it works.but then i'll have to position the children.--- In flexcoders@yahoogroups.com, Jason Y. Kwong [EMAIL PROTECTED]wrote: I'm not sure exactly what effect you want.Do you

Re: [flexcoders] Re: Keeping DataGrid from scrolling to top on update to dataProvider

2006-06-28 Thread Jason Y. Kwong
>From my experiences, the grid takes a beat to update its visual appearance when its data gets updated. After I know that the data has been updated, I normally use callLater() to set the scroll position. On 6/28/06, djbrown_rotonews [EMAIL PROTECTED] wrote: I'm still not having any luck. The

[flexcoders] Odd behaviour with scaleX/scaleY when only minWidth/minHeight is set

2009-02-06 Thread Jason Y. Kwong
Consider this VBox: mx:VBox id=mybox borderStyle=solid minWidth=400 minHeight=300/ There's no explicit width or height, only the minimums are set. When the app runs, we get a 400x300 box. All good. However, if we try to scale this box: mybox.scaleX = mybox.scaleY = 0.5; I would think that