0 Replies Latest reply on Feb 13, 2010 5:25 AM by timo888

    changing percentHeight of #flashContent area at runtime

    timo888 Level 1

      The code below to change the height of the Flash application region isn't working when (someCondition == false), at least I think it's not working, judging from the fact that the content injected into the DIV via ExternalInterface is below the bottom of the window and must be scrolled up into view. Maybe collapsing the size of the Flash app area from 100% to 60% is more complicated than this, and I'm not going about it in the right way?

       

       

      if (someCondition) {

         this.percentHeight = 100;

         myTextArea.visible=true;

         myTextArea.percentHeight=40;

         myTextAreaContainerPanel.percentHeight=40;

      } else{

        myTextArea.percentHeight=0;

        myTextArea.visible=false;

        myTextAreaContainerPanel.percentHeight=0;

        myTextAreaContainerPanel.visible=false;

        this.percentHeight = 60;

        // instead of using the TextArea we use a DIV in the wrapper HTML document

        // code here to inject content into a DIV in the wrapper HTML document via ExternalInterface.call ( ....)

      }

       

      Here is how the swfobject is created initially:

       

      swfobject.embedSWF(
                      "MyApp.swf", "flashContent",
                      "100%", "100%",
                      swfVersionStr, xiSwfUrlStr,
                      flashvars, params, attributes);

       

      Grateful for some guidance here.

      Thanks