#1 (permalink)  
Old 08-03-2008, 02:17 AM
Junior Member
 
Join Date: Aug 2008
Posts: 2
Default Transparent background on images...

I am trying to modify the HScroller I purchased through FlashDen and I am getting a strange problem with the images that are being loaded into the scroller. I have attached one of the images. As you can see, it has a pattern along the edges that show a small bit of background through if loaded on a dark background.

My question : When I load the image, the transparent parts of the image are loaded as WHITE. Can I change this to stay transparent?

Thanks for your help. It is a great piece of work and this is the only hiccup I have encountered while using it.
Attached Images
File Type: jpg 1.jpg (3.1 KB, 4 views)
Reply With Quote
  #2 (permalink)  
Old 08-04-2008, 10:30 AM
Super Moderator
 
Join Date: May 2008
Posts: 518
Send a message via Skype™ to Adrian
Default

Hello,
Try this - open Thumbnail.as file, line 243:

Code:
var bd:BitmapData = new BitmapData(iw, ih);
- change this line to:

Code:
var bd:BitmapData = new BitmapData(iw, ih, true, 0x000000);
- open HScroller.fla and republish the swf to see the results.

Please let me know if it works.

All the best,
Adrian
Reply With Quote
  #3 (permalink)  
Old 08-04-2008, 04:07 PM
Junior Member
 
Join Date: Aug 2008
Posts: 2
Default

Adrian,

Works great! Thanks for the help.

Cheers.
Reply With Quote
  #4 (permalink)  
Old 10-06-2008, 05:19 AM
Junior Member
 
Join Date: Oct 2008
Posts: 3
Default

I am trying to do the same thing for the vertical scroller with no results. I have changed the following line (#245 in Thumbnail.as)

var bd:BitmapData = new BitmapData(ow, oh);

to

var bd:BitmapData = new BitmapData(ow, oh, true, 0x000000);

republished the VScroller.fla - the white background is still showing. Any ideas?

BTW, I am using version 2 of the scroller, with fading.

Last edited by unata; 10-06-2008 at 06:10 AM.
Reply With Quote
  #5 (permalink)  
Old 10-06-2008, 05:09 PM
Junior Member
 
Join Date: Oct 2008
Posts: 3
Default

I've now tried changing


Bground._width = w-2*(bw+margin);
Bground._height = h-2*bw;

to

Bground._width = w-2*(bw+margin);
Bground._height = h-2*bw;
Bground._alpha = 0;

The space around the image changes to grey instead of white and on rollover becomes purplish. I am taking it's the colour of the "border" movie clip. I'll try to play with it next.

I strongly suggest to make a variable at the top of the script turning the border and background on or off. Transparent pngs load fine in Flash, so when this function disappears in an add-on like horisontal or vertical scroller, it's a very unpleasant surprise. My thumbnails are in a shape of a little folder with a tab, so I need the transparency, or I can't use the script.

I also recommend to take any colour customization out of the variable settings and put them in VScroller.fla movie clips so people can modify them easier.

Last edited by unata; 10-06-2008 at 06:18 PM.
Reply With Quote
Reply

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


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.