function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
LeonardLeonard 

full width & height for static resource

I have a flex based static resource that I'd like to take the full width and height of the visualforce page. Setting 100% values in apex doesn't do the trick.

imuino2imuino2

I think if you do that, the flex wont "stretch" to fit the page, the flex should have its own height and width. Post some of the code to se if i can give more details

LeonardLeonard

Here's my height and width specified on the Flex side:

 

 

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%" layout="vertical">

 

 

and then in my Visualforce page

 

 

<apex:pageBlock title="My Control">
      <apex:flash src="{!$Resource.My_Control}" 
          width="100%" 
          height="100%"
          flashvars="sid={!MySessionId}&surl={!$Api.Partner_Server_URL_150}"/>
          <apex:detail subject="{!subject}" relatedList="false" title="false"/>
    </apex:pageBlock>

 

The 100% values in Visualforce don't render the .swf at all. I need to hardcode values to render it. I'd prefer an elastic 100% fill of the available space.

 

imuino2imuino2

Try embedding it as ussual in html

And see if that works

LeonardLeonard

Even with html, I'd still need to embed the Static Resource with a <apex:flash> tag and I'd have to specify a height and width.

imuino2imuino2

According to the documentation when you use percentage it takes the size retalivley to the parent. Check the size of the parent where it is, which i think its the pageblock.