1 Reply Latest reply on Dec 8, 2009 8:47 AM by Paul Reilly

    Object/Embed BASE parameter and mx:Image


      I'm building a SWF in Flex which has an image upload (which is working fine), after I've uploaded the image I'd like to preview it before the next action. I'm also using the BASE parameter on both my object and embed tags which I thought should "specify the base directory or URL used to resolve all relative path statements in the Flash Player movie". I put the name of my image as the source for an mx:image tag and it looks in the same directory my SWF is running from and not the path given in the BASE parameter.


      Is this supposed to work or am I doing somthing wrong? It seemed quite simple on the face of it but it doesn't appear to work. Hope someone can help.

        • 1. Re: Object/Embed BASE parameter and mx:Image
          Paul Reilly Level 1

          It looks like the block of code at line 1814 in SWFLoader.as, Image's parent class, it making all relative URL's into absolute URL's relative to the loading SWF, which might not be the top level SWF.  This logic is probably causing the base parameter not to be used.  My suggestion is to log a bug, so we can investigate adding a new flag to support leaving the URL relative.  As a workaround, maybe you could pass a flashvar into the SWF via the Object/Embed tags and then use that to prefix your mx:Image source attributes.