Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-11-2008, 12:06 AM
Member
 
Join Date: May 2004
Posts: 78
Default Image substitution with SWFGen

Hi, when I use the following code:

Code:
var filter = "Image files(*.gif*,.jpg,*.png)|*.gif*;.jpg;*.png;|";
var filename = Dialogs.fileOpen(filter, ".gif;.jpg;.png;");
To load an image into my application, it works perfectly if it is a .jpg or a .png. However, when I run the swfgen commands below, it crashes if a .gif is loaded instead. I've experimented with this a lot and there seems to be a bug somehow.

Could this be looked into please?

Full code:
Code:
//loadImage

var filter = "Image files(*.jpg,*.png,*.gif)|*.jpg;*.png;*.gif|";
var filename = Dialogs.fileOpen(filter, ".jpg;.png;.gif");

if (filename)
{
FlashPlayer.setVariable("_level0.imagedata",filename);
FlashPlayer.targetGotoLabel("_level0","backgroundLoad")
}

// generate the final file
if (!output) return;
   if (object.id == 258)
  {imageinfo = FlashPlayer.getVariable("_level0.imagedata");
   object.image = imageinfo;
   object.quality = 200;
   object.needSub = true;
      }
  }
// Image replacement
zGen.OnSubImage = onSubImage;

Just to repeat, it works perfectly if it is a .jpg or a .png - but the application crashes if it is a .gif. Strange! ???
__________________
:)
Reply With Quote
  #2 (permalink)  
Old 03-11-2008, 06:32 PM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re: Image substitution with SWFGen

We will test it and fix it if it is a bug.
Reply With Quote
  #3 (permalink)  
Old 03-12-2008, 02:32 AM
Member
 
Join Date: May 2004
Posts: 78
Default Re: Image substitution with SWFGen

Thank you. I can send you a copy of my program if that is any help - but I believe you can replicate the issue with just the above code.

Basically, it works brilliantly with .jpg and .png, but crashes with .gif. :'(
__________________
:)
Reply With Quote
Reply

Was this information helpful?    Yes No



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 05:04 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.