Skip navigation
Currently Being Moderated

Objects not scaling

Jan 18, 2013 7:03 PM

Tags: #flex_mobile #actionscript_mobile_project #actionscrpt3


I have an AS3 app that I put into a library which I'm referencing from a new Flex Mobile app. When I call one of the classes (which used to be the made class in the AS3 project), the background image scales but nothing else does,

It seems that anything that is tweened doesn't get scaled at all. If anything it seems that they're even larger than they should be.


In the old main class I have stage.scaleMode = StageScaleMode.SHOW_ALL; getting called in the addedToStage event.


The app works fine as a standalone but not when it's trying to be added here.


This is the code I'm using to call it.


var game:MyGame = new MyGame();
var container:UIComponent = new UIComponent();
this.actionBarVisible = false;


I've tried everything I can think of.


I am using greensock plugin for the tweening. I don't know if that matters at all.


Thanks for any help.

  • Currently Being Moderated
    Jan 22, 2013 4:54 PM   in reply to JBonavita

    UIComponent is not very smart.  It doesn’t know how to scale or size or position its children.

    Mark as:
  • Currently Being Moderated
    Jan 23, 2013 12:44 PM   in reply to JBonavita

    Canvas knows how to scale IUIComponents.  If your content doesn’t implement IUIComponent it will probably be easier for you to subclass UIComponent and override updateDisplayList and size the content there.

    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points