Trying to make a flex application scalable in its display size by using a "Host-swf" - Problem

We created a flex application using Flex 3. What we are
trying to do is to make this application scalable in its display
size. That means we want the application to scale itself to exactly
fit the size of the browser window without using a scrollbar like
normal Flash-swfs do. Sadly flex application don't scale like a
normal flash swf.
To get a workaround for this we created a so called
"Host-swf" with flash CS3. This Host-swf loads the flex application
and adds it as a child. And voila: When calling the Host-swf our
application can scale.
We used this code to achive this:
var oUrlRequest:URLRequest = new
URLRequest("Flex-Application.swf");
var oURLLoader:Loader = new Loader();
oURLLoader.load(oUrlRequest);
addChild(oURLLoader);
This works perfectly as long the browser window is larger
then the resolution of the host-swf (900*600) when calling the url
for the application:
Picture showing the
scaling
But it doesnt't work out when the browser window is smaller
than 900*600. The application is then shown with a scrollbar, and
when resizing the browser window the scrollbar is still there:
Picture showing the
application with scrollbar
Maybe anyone already tried to achive the same thing and has a
different solution for us?
Thank you in advance!

"noby_95" <[email protected]> wrote in
message
news:gpsue6$rhh$[email protected]..
> We created a flex application using Flex 3. What we are
trying to do is to
> make
> this application scalable in its display size. That
means we want the
> application to scale itself to exactly fit the size of
the browser window
> without using a scrollbar like normal Flash-swfs do.
Sadly flex
> application
> don't scale like a normal flash swf.
>
> To get a workaround for this we created a so called
"Host-swf" with flash
> CS3.
> This Host-swf loads the flex application and adds it as
a child. And
> voila:
> When calling the Host-swf our application can scale.
>
> We used this code to achive this:
>
>
> --------------------------
> var oUrlRequest:URLRequest = new
URLRequest("Flex-Application.swf");
> var oURLLoader:Loader = new Loader();
> oURLLoader.load(oUrlRequest);
> addChild(oURLLoader);
>
>
> -------------------------
>
> This works perfectly as long the browser window is
larger then the
> resolution
> of the host-swf (900*600) when calling the url for the
application:
>
http://www.gansl-online.de/Bild1.jpg
>
> But it doesnt't work out when the browser window is
smaller than 900*600.
> The
> application is then shown with a scrollbar, and when
resizing the browser
> window the scrollbar is still there:
>
http://www.gansl-online.de/Bild2.jpg
>
> Maybe anyone already tried to achive the same thing and
has a different
> solution for us?
When I set the Application width and height to a percentage
number, it will
change its size based on the size of the window.

Similar Messages

  • HT5312 im trying to make a purchase on itunes and its asking for my security question and i dont remember them its been years since i made this account how can i reset them

    im trying to make a purchase on itunes and its asking for my security question and i dont remember them its been years since i made this account how can i reset them

    You need to ask Apple to reset your security questions; ways of contacting them include clicking here and picking a method for your country, phoning AppleCare and asking for the Account Security team, and filling out and submitting this form.
    (98991)

  • I am trying to make an Edge Animation work on a CMS. I used "AdobeEdge.loadComposition" to find the .JS file, but it is looking for the images in the "/image" folder. I would like to store the images in another place. Please help me accomplish this.

    Here's the code:
    <script type="text/javascript" charset="utf-8" src="http://animate.adobe.com/runtime/5.0.1/edge.5.0.1.min.js"></script>
    <style>
        .edgeLoad-EDGE-4084323 { visibility:hidden; }
    </style
    <script>
       AdobeEdge.loadComposition('/media/products/edge_script/channels', 'EDGE-4084323', {
        scaleToFit: "none",
        centerStage: "none",
        minW: "0",
        maxW: "undefined",
        width: "361px",
        height: "268px"
    }, {"dom":{}}, {"dom":{}});
    </script>
    <div align="center">
      <div id="Stage" class="EDGE-4084323">
      </div>
    </div>
    Thank you for your help.

    Ahhhhhh, ok. Figured this one out after digging more.
    Here's the answer from another post. Hope it helps someone!
    If you need to set an absolute folder url, or you are pulling the content from a server that does not host the content, you can manually update the <projectname>_edge.js file to specify the directory:
    (function($, Edge, compId){
    //images folder
    var im='<SERVER/FOLDER>/images/';
    Just beware that if you re-publish the files, you'll need to redo any custom modifications.  I do this for off-server projects and it works very well so long as you make all the changes in each JS file where you need to specify the exact path.

  • Air application loading flex applications(no Air) with flex linked as RSL.

    Hello
    I am trying to make an AIR application which loads number of flex applications(no AIR). The subapplications are using the Flex SDK as a RSL, and each of them can use different version of the SDK.
    The problem is that the subapplicationsare trying to load the needed SDK from local filesystem, which they are not permited.
    public class CrossDomainRSLItem extends RSLItem
         override public function load(progressHandler:Function,
                                      completeHandler:Function,
                                      ioErrorHandler:Function,
                                      securityErrorHandler:Function,
                                      rslErrorHandler:Function):void

    Hi again.
    Is there any way to reliably edit the trust files with AIR application?
    As I see it we have to make the user to add our folder to the trusted locations, or to use some application which can find and write in the FlashPlayerTrust (native for the specific OS installer for example.). (even finding this directory with an AIR application seems not 100% reliable).
    Thanks in advance for you help.
    Ps: Right now I am trying to patch this.
    I compiled some sub-applications using custom preloader class(the controlling class, not the UI), where I removed the RSL loading. After that in an ApplicationDomain I load all the RSLs with loaders. After that I load the sub-application in the same domain. On paper this should work, but the sub-application can't find the classes from the RSLs(the first exeption is that there is no definition for spark.components.Application)

  • Can not open flex application in IE

    Dears,
       I met a problem as below.
    I login a pc client which restricted to access D drive (no read permission) and can not access internet as well.
    But, it is able to access the intranet servers.
    However, I found that I can not open the flex application deployed in the intranet server by IE.
    I tried to open the flex application in Firefox, it is no problem.
    I do not know what's the constraint configued in IE by our windows administrator.
    I just know the IE's temporary files is configured to D:\Documents and Settings\pschung\...., and I have no D drive read permisson.
    Will flex application need to be downloaded to local drive?
    And since I have no read permission of D drive, so it is failed to download the application?
    Is there any settings I can set? Therefore I can successfully open the flex application in the intranet by IE.
    Really thanks for your help in advance.

    Today, I have a new test result that the user account is allowed to access internet, but still can not access D drive.
    The user can not change the IE's internet temporary files location.
    I can not open the flex application from yahoo server.
    Is there any method to execute flex application without temporary files support?
    Thank you very much.

  • Embedding Flex applications inside a portlet question

    I'm trying to embed a Flex application within a Java portlet on my WLP 10.3.2 portal. I'm able to display the Flex app in the portlet but now I'm trying to access data. Does anyone know of any documents that cover how to access Flex data from a portlet and how to access portlet data from the embedded Flex application?
    thanks

    When you mentioned you integrated Flex App inside a Portlet, are you using like iFrame tag or Browser Portlet where in iFrame tag you specify the Flex app url like that. If so, then you will not be able to share any data/information between this iFrame portlet and the actual other real portlets.
    If these Flex app has something like JSR based Flex portlets, then you can integrate them in WLP more easily. Another option is to consume these Flex Portlets as remote portlets using WSRP on WLP Side and the producer will be Flex Portal App (with flex portlets).
    See if this link helps: http://livedocs.adobe.com/livecycle/es/sdkHelp/programmer/lcds/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=wsrp_1.html
    Ravi Jegga

  • Installed CF8 and now Flex application throwing error

    HI,
    I've just installed CF8 developer edition, and now I've tried
    creating a new Flex application, which has nothing in it, just an
    empty Main.mxml file, I did set ColdFusion Remoting as the way the
    application will access data, through the project setup wizard.
    Now when I run the application I get this error message:
    VerifyError: Error #1053: Illegal override of subtopic in
    mx.messaging.Consumer.
    at frame2
    at [abc-decode]
    at flash.display::MovieClip/nextFrame()
    at mx.managers::SystemManager/private::deferredNextFrame()
    at
    mx.managers::SystemManager/private::preloader_initProgressHandler()
    at
    flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at mx.preloaders::Preloader/private::timerHandler()
    at flash.utils::Timer/flash.utils:Timer::_timerDispatch()
    at flash.utils::Timer/flash.utils:Timer::tick()
    Then if I click continue I get this error message:
    ReferenceError: Error #1065: Variable
    _CursorManagerStyle__embed_css_Assets_swf_mx_skins_cursor_BusyCursor_1386701310
    is not defined.
    at [abc-decode]
    at flash.display::MovieClip/nextFrame()
    at mx.managers::SystemManager/private::deferredNextFrame()
    at
    mx.managers::SystemManager/private::preloader_initProgressHandler()
    at
    flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at mx.preloaders::Preloader/private::timerHandler()
    at flash.utils::Timer/flash.utils:Timer::_timerDispatch()
    at flash.utils::Timer/flash.utils:Timer::tick()
    And then if I click continue once more I get the Initializing
    load screen start but never finish running so my application never
    loads.
    The other odd thing is I have some Flex apps which I built on
    CF7, which I then imported to CF8 and they work fine running on
    CF8, its only new projects which fail.
    If I create a new project which doesn't use ColdFusion
    remoting, the Flex application works fine. So something is a miss
    with the remoting connection I think.
    Any ideas?
    Thanks
    Stephen

    For me exactly the same problem. I need it to connect to my school's intranet.
    I think it means either waiting for an update, or somehow find a way to use the build in VPN functionality of Leopard instead.
    Good luck for us all!

  • Problems compiling Flex application

    I'm trying to compile a Flex application here but i'm getting a hell lot of errors:
    C:\STG\displays\RankingDisplay.as(47): col: 30 Error: Type was not found or was not a compile-time constant: Tween.
    C:\STG\displays\NameEntryDisplay.as(25): col: 26 Error: Definition fl.motion.easing:Bounce could not be found.
    C:\STG\utils\BitmapDataUtils.as(49): col: 4 Error: Access of undefined property MatrixTransformer.
    And lot's of others... I'm using the following command-line to compile:
    mxmlc ./src/MyProject.as
    I have the latest Flex SDK. What might be wrong?

    You dont have the imports correctly or they are missing

  • Prepopulating Flex application

    Hi,
    I am using flex applications for designing forms for Licecycle ES.
    I have a problem about prepopulation of forms.
    For XDP forms, I could prepopulate forms using render pdfform service.
    But for rendering Flex forms, I could only see Read resource content service which only gets the application from defined resource.
    And as I know, it has no capability of merging template and form data as I did for XDP forms.
    For example my current problem is when process creator opens a form to initiate a process, I want to prepopulate the form with some userss
    İnformation like name, departmet etc..
    Is there any method to propose to solve this problem?
    Note : As my flex form is opened in workspace (which is also a flex application ), and in workspace application I could see the username (commonname), may be it is possible to get this variable of parent applications from my flex form. If it is defined public..
    Anyone knows how can I reach this variable?
    Thanks in advance
    Regards
    Cihan

    There is a way to do that. This is an extract from an email one of my colleague on the subject:
    In your Flex form you will make use of the FormConnector (see Flex Language Reference under lc.core.FormConnector which is used to simplify communication between Flex app and Workspace ES) that exposes three events (formInitiallData, formSaveDataRequest, formSubmitDataRequest). This will let you run a function when the Flex form initializes in Workspace - -the goal of that function will be to make a call to retrieve the data required and merge it into the Flex form.
    In order to retrieve the data required for pre-population a common need would be to retrieve data related to the logged in user making the start form request. This information is not known to your Flex Form but is known to the Workspace ES Flex application that is hosting the form. So what you will need to do here is gain access into the Workspace application to retrieve the current session. From that current session you can extract the id (sessionManager.authenticatedUser.oid) of the current user. This will be an argument to your function calling some external source for data to be pre-populated.
    You can now make a call to the data source to retrieve the data you want. For example, call a LC process that is exposed as a Web Service taking as its input a users id (the oid you retrieved from the session) whose steps will make the call to the directory server and get the info you need (e.g. department, manager, employee id, etc.) to prepopulate and return it back to the Flex form.
    I do not have a working sample of this but below is a portion of sample code that would be in the Flex form and reflects what was discussed above.
    <mx:Application
    xmlns:mx="http://www.adobe.com/2006/mxml"
    xmlns:lc="http://www.adobe.com/2006/livecycle" creationComplete="connector.setReady()" width="100%" height="100%">
    <lc:FormConnector id="connector"
    formInitialData="initialData(event)"
    formSaveDataRequest="returnFormData(event)"
    formSubmitDataRequest="returnFormDataForSubmit(event)"/>
    <mx:Script>
    <![CDATA[
    import lc.domain.SessionMap;
    import lc.core.ISessionManager;
    private function getUserId():string
    var session:SessionMap = SessionMap(Application.application.session);
    var sessionManager:ISessionManager = ISessionManager (session.getObject("lc.core.ISessionManager"));
    return sessionManager.authenticatedUser.oid;
    Private function prepop(userId:String):XML
    \\add code to call Web Service and retrieve info to prepopulate (in our example à name, dept, mgr)
    private function initialData(event:DataEvent):void
    if (event.data != null && event.data != "")
    xmldata = new XML(event.data);
    else
    var myUID:String = getUserId();
    xmldata = prepop(myUID);
    ]]>
    </mx:Script>
    <mx:VBox horizontalCenter="0" verticalCenter="0" width="100%" height="100%">
    <mx:Form id="theForm" backgroundColor="0xffffff" width="100%" height="100%">
    <mx:FormHeading label="My form"/>
    <mx:FormItem label="Name" required="true">
    <mx:TextInput id="userName" text="{xmldata.name}" change="xmldata.name = userName.text; connector.setDirty()"/>
    </mx:FormItem>
    <mx:FormItem label="Name" required="true">
    <mx:TextInput id="userDepartment" text="{xmldata.dept}" change="xmldata.dept = userDepartment.text; connector.setDirty()"/>
    </mx:FormItem>
    <mx:FormItem label="Name" required="true">
    <mx:TextInput id="userManager" text="{xmldata.mgr}" change="xmldata.mgr = userManager.text; connector.setDirty()"/>
    </mx:FormItem>
    </mx:Form>
    </mx:VBox>
    </mx:Application>
    I hope that helps.
    Jasmin

  • Drag and Drop between Flex application

    Hello,
    Can we implement the Drag and Drop functionality between 2
    FLEX applications?
    Each flex application is in its own IE.
    Thank you,
    Thierry

    To my knowledge you can't drag and drop anything between 2
    windows in a browser using any technique in the way that you mean.
    In other words, I don't think you can even do this in javascript
    between 2 windows.
    You can use LocalConnection to simulate this though, by
    having the drag manager notify the other application when it leaves
    the stage, so that when you reach the other application it will
    start the drag effect again in that window.

  • Session Implementation in flex application

    Hi ,
    I m getting problem in how to implement session in flex
    application.
    Thanks in advance

    I'm not using Flex, but the following preserves session in Flash:
    var url = "http://" + WebServerIPAddress + "/" + ApplicationName + "?data=" + datavalue;
    var cmd:String = "window.open('" + url + "','win','height=768,width=1024,toolbar=no,scrollbars=yes');";
    var request:URLRequest = new URLRequest("javascript:" + cmd + " void(0);");
    navigateToURL(request, "_self");

  • HT1918 why do I keep getting error code 5002 when trying to make a purchase? Has been almost a week now!

      Why do I keep getting Error Code 5002 when trying to make a purchase from the Itunes store? I am using Vista Home edition> havent had any problems before. This has been going on for a week.

    This alert is often the result of an issue with verifying your billing.
    Quit iTunes.
    Open iTunes.
    Test the issue.
    If it persists, sign in to store.apple.com using your iTunes account
    Click on Change account information
    Modify or remove your credit card information.
    Click Continue.
    Test the issue.

  • Trying to make a button with a drop zone

    Since I can't find any of the template buttons that look the way I want, I want to make a simple button that includes a drop zone for an asset, a label, and a highlight. I am trying to make a chapter index menu. I can do it using the automated method and using a customized template - but I cannot find buttons that look the way I want. All I want is a simple rectangle, with the label underneath, and a highlight line under the label. There is one like that in which the asset is black and white (RectRoundEdgesBlue.pox), but I want one that is in color. Is there any way to do this?? I have studied some of the Photoshop tutorials, but I am missing how you put a drop zone in.

    Hi,
    Below is the AS3 code to navigate to adobe.com upon button(whose instance name is 'myButton') click
    myButton.addEventListener(MouseEvent.CLICK, gotoPageFunction);
    function gotoPageFunction(event: MouseEvent) {
    var request:URLRequest = new URLRequest("http://www.adobe.com");
    navigateToURL(request, '_blank');
    Thanks!
    ps: please mark this post as Answered if this is of help to you

  • HT4009 When im trying to make an in-app purchase, after I hit buy it says "your purchase could not be completed" My account is set up correctly so I dont know what the problem is"

    Im trying ti make an in-app purchase but its not allowing me even though my apple account is set up correctly

    Have you checked your Restrictions >   http://support.apple.com/kb/HT4213
    Kyskyhar3 wrote:
    ...  my apple account is set up correctly
    To Contact iTunes Customer Service and request assistance
    Use this Link  >  Apple  Support  iTunes Store  Contact

  • Trying to make a graph that actually works

    I’m trying to make a graph for my boss that displays
    the number of tickets each staff member have completed.
    I found this tutorial:
    http://www.flashkit.com/tutorials/Dynamic_Content/Creating-Zoubin_Z-61/index.php
    However when I finished it, I wanted to create a dynamic text
    box that would display the value for each graph when it said that
    the code used was written in Flash 4, so it can’t do that. :(
    So I started rebuilding the tutorial in flash 9 but then
    realized that the old code wouldn’t work with the new
    version!! ARGH!!
    So basically I’m a bit stuck.
    I’m a beginner to intermediate flash user. But
    don’t have much knowledge of the coding side of things.
    The main part I need converted is this:
    quote:
    Set Variable: "a"=1
    Loop While (A<29)
    Set Variable: "bar"&a = Random (100)
    Set Variable: "a" = a+1
    End Loop
    Set Variable: "a"=1
    Loop While (a<29)
    Begin Tell Target ("var"&a)
    Goto and Stop (Eval("_level0/:bar"&../:a))
    End Tell Target
    Set Variable: "a" = a+1
    End Loop
    Which was written for version 4, but needs to work with the
    latest which is 9 (?).
    All I know so far is that, the Set Variable, has been
    replaced with LoadVariable for the new version. Is that right?
    I’ve been stressing over this for hours last night and
    this morning, trying all different methods from forums and tutorial
    sites, but nothing is working. So as a last resort I’m
    reaching out for help from the experts.
    Thanks in advance!!

    I've been messing with your graph all day and I'm having a
    lot of fun just playing with the code
    It's nice to see some code made especially for this purpose.
    Really clears things up.
    So thanks again clbeech!
    If you don't mind, I've got 3 more questions, if you've got
    the spare time to look:
    Screenshot
    of what I've done so far
    Here is the
    modified action script:
    quote:
    stop();
    var chartScale = 300; //max scale number
    var xml = new XML();
    xml.ignoreWhite=true;
    xml.onLoad = function() {
    date_txt.text = updated;
    var xpos =graph._width /
    (this.firstChild.childNodes.length+1);
    for(var i=0; i<this.firstChild.childNodes.length; i++) {
    graph.attachMovie('bar','bar'+i, i, {_y:xpos*(i+0),
    _x:100});
    graph['bar'+i].name_txt.text = this.firstChild.childNodes
    .attributes.staff;
    graph['bar'+i].num_txt.text =
    this.firstChild.childNodes.attributes.tickets;
    graph['bar'+i].imp_txt.text = this.firstChild.childNodes
    .attributes.improvement;
    var pct =
    Number(this.firstChild.childNodes.attributes.tickets) /
    chartScale * 200;
    graph['bar'+i].bar_bg._yscale = pct;
    xml.load('graphData.xml');
    And this is the
    modified XML data:
    quote:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <graphdata>
    <data staff="david" tickets="300" improvement="12"/>
    <data staff="trent" tickets="267" improvement="9"/>
    <data staff="andrew" tickets="250" improvement="14"/>
    <data staff="nathan" tickets="2" improvement="22"/>
    <data staff="matt" tickets="274" improvement="2"/>
    </graphdata>
    <data date="9th June 2008"/>
    1.
    In the top right hand corner of the screenshot, you'll see
    there is a "Last Updated" static text box followed by a dynamic
    text box called "date_txt". But I wasn't sure where to put the
    code, in the XML file! If I put it between the <graphdata>
    tags then it creates a new graph bar called "UNDEFINED" lol
    Do I create a new tag called 'datedata' or something and put
    it in there? I tried various methods but none of which worked. Any
    idea how to make that work?
    I googled and found this page:
    Webby
    But it seems to write the code in a completely different way to
    you. Also their method doesn't work.
    2.
    Is it at all possible to make the graphs sort themselves and
    arrange from highest to lowest according to the ticket value?
    3.
    How difficult would it be to animate the graphs?? So that
    when you open the flash file, the bars go zooming across and stop
    at the right value?
    I'd imagine it'd be a fair amount of work. But I thought I'd
    ask anyway.
    Thanks showing me the ways guys!
    I'm learning a lot.

Maybe you are looking for