Announcement

Collapse
No announcement yet.

Scaleform flash.filters causes swf images and shapes to not display when alt-tabbing back into game

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Scaleform flash.filters causes swf images and shapes to not display when alt-tabbing back into game

    I've just started using a lot of flash.filters (such as DropShadowFilter and BlurFilter) in my UI.

    Looks great, but I've noticed that while in game, if I alt-tab out of the game, and then alt-tab back in, images and shapes that are using the dropshadow no longer show at all.

    Moving the player around causes them to pop back in. However if I just sit still and give no input they remain invisible.

    Has anyone else experienced this? I would be a massive shame if I couldn't use these awesome libraries because of this small glitch.

    #2
    Effects Drop Shadow, Outer Glow, and others, need to be in raster graphics. Text elements keep in vector graphics.

    Adobe Flash menu bar Modify\Convert to Bitmap.
    my website https://ggbot.net

    Comment


      #3
      GGBotnet Thanks for the response. Do you know if there is much overhead in converting display objects to bitmap?

      When I attempt to convert an image into a Bitmap via AS3, using this method:
      Code:
      public static function ConvertDisplayObjToBitmap(displayObj:DisplayObject):Bitmap
      {
          var bitmapData:BitmapData = new BitmapData(displayObj.width, displayObj.height);
          bitmapData.draw(displayObj);
      
          var bitmap:Bitmap = new Bitmap(bitmapData, "auto", /*smooth*/true);
          return bitmap;
      }
      The scaleform media player spits out this error:
      Code:
      Warning: The method BitmapData::draw() is not implemented
      I'm guessing scaleform doesn't support this...?
      Last edited by Coldscooter; 01-24-2020, 06:41 PM.

      Comment


        #4
        I've just implemented a REALLY nasty hack that appears to address the issue:

        I render an invisible square at the top left of the movie, and move back and forth by 1px every second. Each time it moves it restores any invisible display objects that are using drop-shadow filters.

        I'm unsure at this point what overhead this comes with (if any). Either way, it at least allows me to use flash.filter fx in my game.

        I'd welcome any insight into better solutions or reasons why this is occuring in the first place. It could be isolated to the Scaleform wrapper that the game engine is using.

        Comment


          #5
          One solution is convert to Bitmap in Adobe Flash without script, and check in UDK console command "stat gfx".
          my website https://ggbot.net

          Comment


            #6
            GGBotnet Unfortunately doing it manually in the Flash editor won't work for me as I have hundreds of items images that I sometimes want to use without drop-shadows.

            Comment

            Working...
            X