Change/scaleX scaleY on parent puts children nationwide but don't update the height-to-width property?

created a custom component - MyImage - who has two children, a Bitmap, but also a Sprite.

My screen object hierarchy is as follows:-

mx:Canvas
  view
:MyImage
     mx
:Bitmap
    
my:Sprite

If I change the MyImage.scaleX, scaleY property, children at the level that I expect.

However when I try to place children at the centre using placeAgain() on obtaining a resize event:

    public function placeAgain():void
   
{
       
if (image==null) return;

       
var pCanvas:Canvas = this.parent as Canvas;
       
if (image.width <= pCanvas.width)
       
{
            pCanvas
.horizontalScrollPolicy="off";
            image
.x = (pCanvas.width -image.width)/2;
       
}
       
else
       
{
            pCanvas
.horizontalScrollPolicy="on";
            image
.x=0;
       
}
       
if (image.height <= pCanvas.height)
       
{
            pCanvas
.verticalScrollPolicy="off";
            image
.y = (pCanvas.height -image.height)/2;
       
}
       
else
       
{
            pCanvas
.verticalScrollPolicy="on";
            image
.y=0;
       
}
        alignKids
();
   
}

I find the image.height & width have not changed despite the image getting scaled!

Isn't the child supposed to have its bounds changed after scaling its parent ? Especially after the child has actually been scaled correctly ? Why are bounds of the child stuck at the same value as before scaling? I am not caching the Bitmap, have not turned on caching of bitmaps.

The getBounds() method shows the same dimensions.

It seems scaleX/Y only changes the display but does not update fields of any object with the exception of

parent where scaleX/Y has been changed.

Tags: Flex

Similar Questions

  • When Im in Lightroom 4 and make an edit in photoshop, after Im done making changes in photoshop that I do a backup, but does not load the file to lightroom. This just started happening. It was working before.

    When Im in Lightroom 4 and make an edit in photoshop, after Im done making changes in photoshop that I do a backup, but does not load the file to lightroom. This just started happening. It was working before.

    Please go to the location of your Lightroom Catalog, and there you will see the folder for Lightroom Catalog Previews.Lrdata

  • I've recently updated my Apple ID (including the change of password). However, could not connect to iTunes to update the applications or make purchases. Any help?

    I've recently updated my Apple ID (including the change of password). However, could not connect to the iTunes Store to update the applications or make purchases. Any help?

    Have you tried a forced reboot? Hold down the home and Sleep/Wake buttons simultaneously for about 15-20 seconds , until the Apple logo appears. You won't lose anything.

    Then sign out of the iTunes Store and reconnect.

  • DAQ Assistant don't update the buffer size to change the frequency

    Hi all

    I use DAQ Assistant inside a loop to write a signal in a module output best 9262 OR a cDAQ-9174.  I generate the signal with the express vi simulate Signal or with a simple loop using indexing.  The problem is that when I change the frequency, using the same sampling frequency, I have a different number of samples to write the cDAQ does not seem to update the size of the buffer, so no my signal gets written in.  The result is the first sine wave is nicely written, but each after that gradually get cut off on the edges.  I traced imput signal that I generate, so I know that it is generated with the right size and frequency of departure, what ever it is, still works, it is those more later in the loop who have the wrong size aparently buffer.  I tried to reset the cDAQ by adding a different DAQ Assistant at the end of the outer loop with the stop bit the true value, it makes me just the error "resource not available.

    Any ideas?

    I'm using LabVIEW Base development system new V12.0 32 bit.

    Thank you

    Matt

    Idea:

    Get rid of the DAQ assistant and use the DAQmx API.  The DAQ Assistant is there to support the limited functionality and base up a dirty experience and running quickly.  The report of the API offers more funcionallity and DAQmx property nodes allow greater flexibility.  DAQ Assistant is just too limited for your needs.  (you can't paint a masterpiece with crayons)

  • New computer, put a password on my account, but don't remember the password even with the trick, I'm the owner and administrator of the computer

    new to computer.put a password on my account don't you remember the password even with the owner of suspicion of computer im also the u only administor.thank

    * original title - activate my password account.changed newspaper even cant account with suspicion am owner have only n *.

    Hi Michelle,

    You can read the following article and check.

    How to connect to your Windows XP-based computer if you forget your password or if your password expires

    Please see the following articles for more information:

    Microsoft's strategy concerning lost or forgotten passwords

    Keep secure passwords - Microsoft strategy on move the passwords

  • my computer asked for to change me my administrative password and I did, but don't remember what I can do

    It wont let me install the updated flash player versions or anything else or go to an earlier era, unless I put the password which I don't remember anyone can help

    Hello

    1. what operating system do you use?

    2. are you connected standard user?

    I suggest you to follow the links and check out them.

    How to use system restore to log on Windows 7 or Windows Vista when you lose access to an account

    http://support.Microsoft.com/kb/940765/en-us

    How to connect to your Windows XP-based computer if you forget your password or if your password expires

    http://support.Microsoft.com/kb/321305

  • Change the height and width of the video image...

    In Adobe Premiere Pro CS 5, I can't produce a video larger than the width of the frame (of output): 720 and frame height: 480. The video is recorded in full HD 1920 x 1080 p, but after editing and adding effects in first Pro CS5, changes in video for only 720 x 480.

    (1) where the settings in Premiere Pro are modified to produce a video size of the width of the frame: 1280 and frame height: width 720 frame or even: 1920 height: 1080?

    (2) is it possible to produce 1920 x 1080 or 720 x 480 max video?

    Your time is appreciated.

    File > new > sequence, then:

    1. Choose a preset that matches or is less similar to your videos, or,
    2. Click the general tab, change the editing for "Desktop" Mode and set the parameters as you need for your videos

    Otherwise, drag a film clip to the button new item at the bottom of the project Panel (it looks like the dog-swamp of paper sheet) and created a sequence corresponding to your images.

  • I can't change a PNG of a watermark file, because I don't have the little wand on my tools screen to select the white background to delete?

    If someone has had the problem of trying to convert a PNG image to a watermark and when I do the tutorial on youtube I don't even have the little wand they say select you on the left side of your screen so that you can remove the white background. I'm stuck.

    This is probably due to the icon tools being hidden by default. Both the wand and the quick selection tool share the same space. Place your cursor on the icon of the tool Quick Selection press the button of the mouse and hold the button for about 2 seconds and a passage outwards menu will appear. (this can be done with any tools that have a small triangle in the lower right corner)

  • How can I change the password on the computer when I don't remember the original?

    Original title: How can I change my password if I don't remember but don't know the pin code and I know the password to my e-mail attached?

    I don't remember the password to my computer as an administrator, but I don't know the pin code. I know my connected Hotmail account information and also the password but I don't remember the password so cannot download certain applications.

    So I would like to know how to change the password.

    Any assistance would be much appreciated!

    Thank you.

    You need the password to another one administrator-level account, or to the real real 'administrator' account?

    If you use an administrator level account, you can enable the built-in true ' administrator' account, connect on it (she has no default password because it is disabled by default) and reset the password of another account from there.

    To do this:

    1. Press + X to display the context menu, and then click computer management.
    2. On the left, click local users and groups, and then select the users folder.
      On the right, you will see the account named Administrator.  There must be an arrow down to this topic icon, indicating that the account is disabled.
    3. Double-click the administrator account, and then uncheck the "account is disabled".  Click OK to save your changes.
    4. Close the computer and connection to the administrator account.
    5. Back to the same page of user management.  Right-click on the account with the unknown password and choose set password to set a new.
    6. Open log on to the administrator account and your regular account.
    7. Go back once more on behalf of users and disable the administrator account.  You want to book it only in an emergency - if something had to get changed or broken in the administrator account, you have a downturn in the future to use.

    I hope this helps!

  • How can we stop Member of "attribute" inheritance from parents to children?

    Dear all,

    Do you know how I can stop sharing the attribute member between parents and children?

    In the case, I need to change the currency of the parent (CAD $) entity, but I want children to keep the currency CAD.

    In my case, when I change the attribute of the entity, the children inherit the mother.

    For me, the legacy is applied automatically to all members of the sub of the parent.

    Thanks in advance for your support.

    Jean Daniel

    Hyperion Planning 11.1.2.3

    As described in the Administrator's Guide

    If a parent has several children, of whom only one child has a currency that is overridden, the mother inherits code currency overridden in Essbase (which is not displayed on the forms of data).

    I think that is what is happening with you... I guess nothing can be done to avoid this, as it is written in the bible of the oracle!

  • parents and children of the same table records

    I want to create a query that is a union such that 2nd resultset is based on the game of results 1. I have a table that has parent and child records in the same table.

    Table: EVENTS
    EVENT_ID
    PARENT_EVENT_ID
    CREATED_DATE
    (other columns)

    If PARENT_EVENT_ID is null, then this is a parent record, otherwise it is a book of the child. I want to select all parent records then union them with all the related child records... something like this:

    Select * from EVENTS where CREATED_DATE < sysdate - 90 and PARENT_EVENT_ID is null - all parents
    Union
    Select * event where PARENT_EVENT_ID in (select EVENT_ID of EVENTS where CREATED_DATE < sysdate - 90 and PARENT_EVENT_ID is null)-include all children selected from the top parent

    It works but it of kind of ugly, I want to avoid using the subselect in the 2nd because it is a repeat of the 1st statement, is there a way to alias the first statement and only refer to him in the 2nd query?

    Hello

    CONNECTION is very similar to a UNION on the same table. How is this:

    SELECT     *
    FROM     events
    WHERE     created_date     < SYSDATE - 90
    START WITH     parent_event_id     IS NULL
    CONNECT BY     parent_event_id     = PRIOR event_id
         AND     LEVEL          <= 2    -- Maybe
    ;
    

    ?

    To answer your question: Yes, you can still keep the result set of a query and the Treaty as if it were a table or vew, like this:

    WITH     roots     AS
    (
         SELECT     *
         FROM     events
         WHERE     created_date     < SYSDATE - 90
         AND     parent_event_id     IS NULL
    )
    SELECT     *
    FROM     roots
         --
    UNION ALL
            --
    SELECT     *
    FROM     events
    WHERE     created_date     < SYSDATE - 90
    AND     parent_event_id     IN (
                          SELECT  event_id
                          FROM    roots
                      )
    ;
    

    It's always a bit ugly, however. I would use CONNECT BY or from Oracle 11.2, a recursive WITH clause (which is explicitly a UNION), or, in any version, a self-join, like this:

    SELECT     c.*
    FROM          events  c
    LEFT OUTER JOIN     events     p  ON   p.event_id  = c.parent_event_id
    WHERE   p.parent_event_id  IS NULL
    ;
    

    I hope that answers your question.
    If not, post a small example of data (CREATE TABLE and only relevant columns, INSERT statements) for all of the tables involved and the results desired from these data.
    Report where the queriy above (the one you decide to use) is producingthe bad results and explain, using specific examples, how you get the right results from these data in these places.
    Always say what version of Oracle you are using (for example, 11.2.0.2.0).
    See the FAQ forum {message identifier: = 9360002}

  • Time series Question - how avg for children period but no parent

    I have a calculated account, trying to get the average to the level of the child of the period, but have the Parent period level make a right calc on the totals. My cube is configured like this:


    Period
    -Jan
    -JanWeek1
    -JanWeek2
    -JanWeek3
    -JanWeek4
    -JanWeek5
    Account
    -Hours billed
    -Revenue
    -Avg Houly rate = 'Recipes' / 'Billed hours' (I have time series data, the average value)

    My problem is that during the week level things are on average correctly, but at the level of the month, that is by taking the average of 5 weeks. How can I get if it just look at the total revenue for the month divided by the total number of hours billed (by having the weeks do everything an average?)

    Thanks in advance for any guidance.

    You probably don't need to use all balance of average time for this calculation. I suggest defining members in time balance zero, then label it as 'Dynamic Calc' and label it as "Two-Pass", ensure that the income / hours calculation after the period roll-up.

    I think that you would give the desired result.

  • Parent refresh after modal close when you use the .show_modal method

    I followed the method of '.show_modal' of manaul in this thread: Open the modal page report Skillbuilders

    My question ishow I update the parent when the modal closes?

    I just took a glance: you already put it in place for the most part correct. I changed the event 'close' event "auto close" If, as is most appropriate: the update does not occur when the dialog box is closed because there was a match for the selector autoclose (the message of success).
    What was wrong was the selection type. The event type for the Auto close (close/manual and close) of selection must be "Object DOM", and 'Object DOM' should be 'document '. The fence does not trigger on a specific region, such as you have specified.

    I also changed the scope of the action "open mode" dynamic static event: without it, the popup would not work once the paging occurs.

  • How to upgrade the parent table and child by updating the parent table

    I have a parent EMPLOYEE table that includes columns (sysid, serviceno, employeename...) sysid is the primary key, serviceno is the Unique key and I have DEPENDENT child table includes columns (sysid, employee_sysid, name, date of birth...) there still SYSID is a primary key for the table of dependants, employee_sysid is a foreign key in the EMPLOYEE table.

    Now I want to change SYSID (with the help of the sequence) in the EMPLOYEE table that they want an update in the table of people dependent

    Note: I have 10000 records in the EMPLOYEE table as I have 5 more children tables that need to update new SYSID.

    Please help me

    first disable FOREIGN KEY constraints.
    You can update Parent and child record with the help of the trigger.
    Here I give you an examlpe... It can help u.

    create a parent (id number primary key, name varchar2 (100)) table
    /
    create table child_1 (primary key id, p_id number number, date of birth, date)
    CONSTRAINT FK_id FOREIGN KEY (p_id) REFERENCES parent (ID))
    /
    create table child_2 (key primary id, p_id2, addr varchar2 number number (1000))
    CONSTRAINT FK_id2 FOREIGN KEY (p_id2) REFERENCES parent (ID))
    /

    Insert some test data for the parent tables and children.

    change the constraint to disable child_2 table FK_id2
    /
    change the constraint to disable child_1 table FK_id2
    /

    CREATE OR REPLACE TRIGGER delete_child
    BEFORE parent UPDATE ON
    FOR EACH LINE
    BEGIN
    UPDATE CHILD_1
    P_ID =:NEW.ID SET
    WHERE P_ID =:OLD.ID;
    UPDATE CHILD_2
    SET = P_ID2: NEW.ID
    WHERE P_ID2 =:OLD.ID;
    END;
    /

    then Upadte parent table primary key col and check the children tables.
    do enable constraints...

  • How can I update the children after a node in a tree?

    Hello world.
    I am updating a subtree programmatically using a bean managed as data source.
    I can find all the topics are about the use of your and JUCtrlHierNodeBinding.updateValuesFromRows.
    Now, I need to find a way to directly update the nodes without any line. What should I do?

    Here is the code:

    Tags:
                                    <af:tree id="tframe" initiallyExpanded="true"
                                             selectionListener="#{backingBeanScope.systemDataFrameBB.onSelectNode}" var="n"
                                             binding="#{backingBeanScope.systemDataFrameBB.tframe}"
                                             value="#{systemDataFrameMB.treeData}" expandAllEnabled="true"
                                             rowSelection="single" fetchSize="-1" contentDelivery="immediate"
                                             immediate="true" summary="summary">
                                        <f:facet name="nodeStamp">
                                                      <af:group>
                                                      <af:outputText value="#{n.is_system?'[SYSTEM]':''}" />
                                                      <af:outputText value="#{n.is_use?'':'[X]'}" />
                                                                     <af:outputText value="#{n.data_frame_name}"/>
                                                      </af:group>
                                        </f:facet>
                                    </af:tree>
    (systemDataFrameMB) bean managed:
         private ChildPropertyTreeModel treeData;
         public ChildPropertyTreeModel getTreeData() throws SQLException
         {
              if (this.treeData == null)
              {
                   AuthAMImpl authAM = this.getAppModule();
                   List<DataFrameNode> subTrees = authAM.getDataFrameTrees();    // load with JDBC and POJO
    
                   DataFrameNode root = new DataFrameNode();      // insert all sub-trees into a new tree
                   root.setData_frame_id(0);
                   root.setData_frame_name("[ROOT]");
                   root.setParent_data_frame_id(Integer.MIN_VALUE);
                   root.setIs_system(true);
                   root.setIs_use(true);
                   if (subTrees != null && subTrees.size() > 0)
                   {
                        root.setChildren(subTrees);
                        for (DataFrameNode n : subTrees)
                             n.setParent(root);
                   }
                   this.treeData = new ChildPropertyTreeModel(root, "children");      // I guess this is the simplest way to show hierachical data...
              }
              return this.treeData;
         }
    model:
    public class DataFrameNode
    {
         private int data_frame_id;
         private String data_frame_name;
         private int parent_data_frame_id;
         private boolean is_use;
         private boolean is_system;
    
         private DataFrameNode parent;
         private List<DataFrameNode> children;
    
            // getters/setters are omitted....
    }
    support bean (systemDataFrameBB):
            // edit event handler
         public void onEditResult(DialogEvent de)
         {
              String name = (String)this.getItName().getValue();
              boolean isUse = this.getSbcIsUse().isSelected();
              SystemDataFrameMB dfMB = (SystemDataFrameMB)JSFUtils.resolveExpression("#{systemDataFrameMB}");
    
              try
              {
                   node.setData_frame_name(name);
                   node.setIs_use(isUse);
                   dfMB.updateNode(node);                   // persist changes, this method will change all the children's 'is_use' field to FALSE when isUse == FALSE
                   AdfFacesContext.getCurrentInstance().addPartialTarget(this.getTframe());      // refresh the tree, only the edited node will be updated, but I want the tree to update the whole sub-tree to reflect the change on all its children
              }
              catch (Exception e)
              {
                            // omitted...
              }
            }

    Yes, you must use JUCtrlHierNodeBinding to update entire tree.

Maybe you are looking for