3 Replies Latest reply on Jul 2, 2010 10:57 AM by iproano

    .swf media scale or size issue


      I am using a media player with media container and loading video, bitmaps or .swf files.  The .swf files are created by an outside design studio and they mask the content to cover assets that are animated from off stage.  This causes a scale issue when the .swf file is played even though I preload all files with the load trait.


      I tried switching to mediaPlayerSprite just to see if it handles it better (nope)? Can anyone offer other solutions?


      The second time media is played its width and height is correct.  This adds to my suspicion that the swf's properties are not fully set when it is added to the display list.  I tried adding a listener for added to stage inside the swf that sets scale properties to no avail.


      I am guessing I can't get arround adding them to the display list in order for these properties to be set but I am hoping there is another way.

        • 1. Re: .swf media scale or size issue
          bringrags Level 4

          You might be running into bug FM-80:




          There's a documented (non-trivial) workaround which you could try.

          • 2. Re: .swf media scale or size issue
            gregbown Level 1

            Hi Brian,


            Thank you for the prompt response. The workaround is to delay signaling of the display object trait until the scrollRect property has had a chance to propagate. This appears to be the example posted.


            I tried this SWFElementProxy workaround and it worked great accept for one huge problem... The first time it plays at the correct size however the second time I play the media it does not show up at all?


            I store all media elements in a vector that is referenced by index set by either by a timer or the user.  When indexed the media is set it is like so...

            mediaPlayerSprite.media = mediaCollection.contents[index].media.

            I used the debugger and it appears the SWFElementProxy is still in the vector so I am puzzled a to why it is not displaying? I have yet to figure out why it does not dispaly?  I need a way to filter the methods in SWFElementProxy when the media is unloaded or re-loaded.


            I worked on that for an hour or so... I ended up taking the proxy out and using a hidden MediaPlayerSprite which I load and then unload prior to loading into the main media player.  It is such a bad hack I had to go wash my hands when I was done.


            Any ideas?


            Thank you


            • 3. Re: .swf media scale or size issue

              Hi Greg,


              I am not able to reproduce the issue that you mentioned with the workaround. How are you playing the SWF the second time? Are you using a different code that the one in the example? If yes, do you mind sharing the code with us, please