Jump to content
Search Community

Problem with using AutoFitArea in Flex

D0m3n1c test
Moderator Tag

Recommended Posts

Hi!

 

I would like to scale my main content components in Flex 4.5 using AutoFitArea.

 

For example i tried:

 

public var area:AutoFitArea = AutoFitArea.createAround(contactM);

 

private function addedComplete():void{

 

area.attach(contactM, {scaleMode:ScaleMode.PROPORTIONAL_INSIDE});

 

}

 

<components:Contact id="contactM" includeIn="KONTAKT" resizeMode="scale" x="0" y="0" width="100%" height="100%" horizontalCenter="0" verticalCenter="0">

</components:Contact>

 

This is not working. I am new in flex/flash. I would be happy for any guidance! Thank you!

Link to comment
Share on other sites

It sounds to me like you're running into an issue where Flex's auto-resizing behaviors are conflicting with AutoFitArea's - you shouldn't be using both.

 

Disclaimer: I'm not a Flex expert. I try to avoid it as much as possible (I strongly dislike it and it has quite a few bugs).

 

My understanding is that quite a few (if not the majority) of Flex components have auto resizing/positioning features built-in (and turned on by default). I'd recommend using the Flex ones. Technically AutoFitArea will work on virtually ANY DisplayObject, but if the Flex components are fighting with it for positioning/sizing, that'd certainly explain the problems. See what I mean?

  • Like 1
Link to comment
Share on other sites

Yes, I understand. Issue is that I dont now how to proportional (without loosing aspect ration) scale component with flex options, because there is nothing that kind nowhere. I was searcing on every possible forum, googling ..finding no useful things. I dont know if I am almost alone with that kind of problem, or is it that simple that is not worth to mention. Anyway..

 

So what could you preffer me to learn in advance? You make sites with Flash an Dreamveawer?

 

Thank You and sorry about my english.

Link to comment
Share on other sites

Well for Flash, definitely learn Flash CS5 or later. As for HTML/JS development, that's less clear. Dreamweaver has some nice features, but it's also rather bulky and can be a bit cumbersome. I've heard good things about JetBrains WebStorm or PHPStorm. For editing code, Flash Builder and FDT seem to be tops for AS development (FDT can do JS and other stuff too). I'm sure other people have their favorites, so feel free to chime in here.

 

Good luck! Don't forget to have fun and experiment.

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.
×
×
  • Create New...