> If these methods can be overrided in my application ,then how ?
ActionScript "Monkey Patch"
Much easier than recompiling the Flex source.
Thank you McCarroll ! It worked! I have already get it done ! hah
I have the same problem than you, good although I see you've solved ...
Can you give me specific instructions how i must to do?
say, if you wanna change the current class xxx.as in mx.core in framework.swc ,then just add a new package mx->core in your src folder ,add a class exactly named xxx.as then edit that class to do whatever you want . flex will read and execute your new class instead of the swc's when running. if you have problem making a new folder and class which has the same name as classes in swc's directly , try do it outside the flash builder. hope it will help .
Ok. First many Thanks for your patience.
But I need to put all the code in SystemManager.as, and for the other: DensityUtils.as , RuntimeDPIProvider.as and DPIClassification.as and after make your corrections?
Can yo send me by email this folder.
I will be obliged greatly.
Thank you again.
In DPIClassification.as ,I added two varieble:
public static const DPI_400:Number = 400;
public static const DPI_480:Number = 530; //480 is not enough in my app...
if(tempDPI <= 360)
if(tempDPI <= 440)
And then you have to change getDPIScale method in DensityUtil.as file to make them work:
public static function getDPIScale(sourceDPI:Number, targetDPI:Number):Number
// Unknown dpi returns NaN
if ((sourceDPI != DPIClassification.DPI_160 && sourceDPI != DPIClassification.DPI_240 &&
sourceDPI != DPIClassification.DPI_320 && sourceDPI != DPIClassification.DPI_400 &&
sourceDPI != DPIClassification.DPI_480) ||
(targetDPI != DPIClassification.DPI_160 && targetDPI != DPIClassification.DPI_240 &&
targetDPI != DPIClassification.DPI_320 && targetDPI != DPIClassification.DPI_400&&
targetDPI != DPIClassification.DPI_480))
return targetDPI / sourceDPI;
all you have to do is just telling the application.as to scale your app just as you want.
Many, many Thanks.
It works perfectly.
Now I must to do all the modifcations in App (resources), but detection of DPI works correctly.
Best Regards and Thank you again.
There is another thing to do and is to modify MultiDPIBitmapSource.as inside spark/utils the same mode.
Note: There is a small error in name of DensityUtils.as -> DensityUtil.as at the beginning of post.
Thanks a lot again.