User Tag List

Results 1 to 8 of 8

Thread: Replace color conditions run slower in SWF, why?

  1. #1
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCSWF Export Module
    N64Mario's Avatar
    Join Date
    Nov 2008
    Location
    USA
    Posts
    1,308
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)

    Replace color conditions run slower in SWF, why?

    Whenever I use replace color option to change the colors of my character, it seems to run fine in EXE format. There are no FPS slowdowns here.
    However, when I export the app as SWF format, whenever I use replace the color in game, it slows the FPS rate down. Is there any way to fix this? If not, can you tell me why this slowdown happens in SWF, but not in EXE?

    I seem to have had this problem before, but I can't remember what the situation was. Also, I am wondering if maybe there is a workaround that can work in SWF format if the slowdown issue can't be fixed?

    Currently using MMF2Dev v2.0 R251.

  2. #2
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Francois's Avatar
    Join Date
    Jul 2006
    Location
    Montpellier, France
    Posts
    6,920
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)

    Re: Replace color conditions run slower in SWF, why?

    Replace color in Flash is a slow operation. There is nothing really that can be done, except avoid replace color at every loop

  3. #3
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleSWF Export ModuleUnicode Add-on
    Looki's Avatar
    Join Date
    Aug 2006
    Location
    Karlsruhe, Germany
    Posts
    3,741
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)
    Francois, you should have a look at BitmapData::threshold() instead of looping through the image manually. I'm sure it will be a lot faster.

    EDIT: Actually, to save you some time, this should basically do it (CServices ~216):

    var newImage:BitmapData=new BitmapData(oldImage.width, oldImage.height, true, 0);
    newImage.threshold(oldImage, r, new Point(0,0), "==", oldColor, newColor, 0xffffff, true);


  4. #4
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCSWF Export Module
    N64Mario's Avatar
    Join Date
    Nov 2008
    Location
    USA
    Posts
    1,308
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    But it is necessary for what I need it to do. Most common games use palette features that can swap out colors. Examples like NES games use flashing palettes on characters, fighting games have selectable colors for characters. Sometimes an in-game color swap is called in a fighting game. Color swapping should be the most common thing in a video game where it shouldn't have to slow down the frame rate that bad.

    Maybe flash has an alternate solution for this kind of thing? I don't think different sprite layering just for a new color will quite cut it. Is there something else that flash uses that does the same effect as replace color, but a lot faster? Is there perhaps a load palette/colors option on to the object?

  5. #5
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Francois's Avatar
    Join Date
    Jul 2006
    Location
    Montpellier, France
    Posts
    6,920
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Thanks Looky. I did not know about this function. It seems great!

  6. #6
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCSWF Export Module
    N64Mario's Avatar
    Join Date
    Nov 2008
    Location
    USA
    Posts
    1,308
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    So, does this mean that we may see an update much later to the SWF exporter that will use Looki's expression function?

  7. #7
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleSWF Export ModuleUnicode Add-on
    Looki's Avatar
    Join Date
    Aug 2006
    Location
    Karlsruhe, Germany
    Posts
    3,741
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)
    Yeah, but not before build 253. Maybe I'll add it to Flash Fx for you sometime

  8. #8
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCSWF Export Module
    N64Mario's Avatar
    Join Date
    Nov 2008
    Location
    USA
    Posts
    1,308
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    Oh really? That long? I thought it should be a really simple fix. Considering they are still working on build 252, which is still in the beta testing phase. I don't see why they wouldn't be able to include this fix in the final version of 252, if not another beta build of 252. :-/

    Well, I suppose any help would be appreciated.

Similar Threads

  1. [BUG 256.34] Replace color doesn't always work in standard 256 color mode
    By Corlen in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 26th October 2014, 10:21 AM
  2. Replace color: bug?
    By Pineapple in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 10th January 2012, 11:53 PM
  3. Color bug in 'replace color' option
    By N64Mario in forum Multimedia Fusion 2 - Technical Support
    Replies: 27
    Last Post: 7th June 2009, 03:18 AM
  4. Replace color
    By kornelijepetak in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 15th June 2008, 01:35 PM
  5. replace color
    By ayejes in forum File Archive
    Replies: 7
    Last Post: 23rd February 2008, 12:26 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •