Topic: alpha instead of brightness..... Is there a way to do this?

Hi,

Does anyone know how to make it so the offset images have an aplha applied to them instead of the default (-255 -> 255) brightness varient?

I'm going t have a play with the .as, but if anyone already knows that would be really helpful.

Thank you,
Paul.

Re: alpha instead of brightness..... Is there a way to do this?

This fades images to transparency.


go to image.as and find the lines containing:

    function setColorOffset(){        
        mColorTrans.redOffset = mcLoader.offset;
        mColorTrans.blueOffset = mcLoader.offset;
        mColorTrans.greenOffset = mcLoader.offset;
        mClipTrans.colorTransform = mColorTrans;
    }

and insert this:

        mColorTrans.alphaOffset = mcLoader.offset;

3

Re: alpha instead of brightness..... Is there a way to do this?

brxnd can you give any more details,  my flash knowledge is quite basic if you dont mind doing a more complete walkthrough I would be very appreciative.

Re: alpha instead of brightness..... Is there a way to do this?

Hi, follow these steps to make the change described above:

- Find the file 'Image.as' in the 'source' folder of the PRO download.
- Open the file in a text editor. Do the find and replace described above.
- Open sourceautoviewer.fla using Macromedia Flash 8.
- Do File->Publish to publish your updated swf. The new swf will be created as: deliverviewer.swf

Felix Turner
SimpleViewer Support Team.

Re: alpha instead of brightness..... Is there a way to do this?

I don't get it, if I understand well, I modified this in image.as :

    function setColorOffset(){       
        /*mColorTrans.redOffset = mcLoader.offset;
        mColorTrans.blueOffset = mcLoader.offset;
        mColorTrans.greenOffset = mcLoader.offset;*/
        mColorTrans.alphaOffset = mcLoader.offset;
        mClipTrans.colorTransform = mColorTrans;
    }

but in option.as :

    //image options
       (…)
    static var fadeBrightness:Number = 10; //Brightness applied to non-current image (-255 = black, 255 = white) original=-120


I tried w/ 10, 120, 240… don't see any change, images are 100% like in the middle (no filter effect) sad
help please… THX!!

stephan

Re: alpha instead of brightness..... Is there a way to do this?

I have issues with the transparency thingie too.

At first I thought that I should replace the lines in the setColorOffset() function with mColorTrans.alphaOffset = mcLoader.offset; like this

    function setColorOffset(){        

        mColorTrans.alphaOffset = mcLoader.offset;
        
    }

but got the same problem as stephz55, all images were the same transparency and brightness.

Then i just pasted mColorTrans.alphaOffset = mcLoader.offset; after those lines like this

    function setColorOffset(){        
        mColorTrans.redOffset = mcLoader.offset;
        mColorTrans.blueOffset = mcLoader.offset;
        mColorTrans.greenOffset = mcLoader.offset;    
        mClipTrans.colorTransform = mColorTrans;
        mColorTrans.alphaOffset = mcLoader.offset;
        
    }

and it worked... somehow, but not as I expected it. The "unfocused" images look strange, not as if a transparency setting has been applied to them (blacks, don't look black but rather a mid-gray, much lighter than the background). I then thought (a wild guess) that there was some wight/light-gray background showing throught the transparency of the images and changed the flash movie background color to match the one in index.html (#222222) but no luck.

I really need anyone's help. I'm due with my website this week and can't go on without this fixed as some of my images look bad with the brightness change.

Thank you.

I have made an example in Photoshop to show what the differences are.
www plusminus ro/autoviewer_transparency.jpg

ps: and I know it can be done because I've seen a site which does 50% transparency. Even tested it in photoshop to be sure it's not just some brightness setting.

later edit: I tried Brian Chapman's method (here on the Autoviewer Pro forum - Transparent Frame pt. 2 - making the image transparent) and changed the 50 with 0 transparency and the "unfocused" images are all white  :?: The framecolor in gallerydata.xml is the same as the page background (#222222) and the last parameter of the new FlashObject function is #222222.

HELP :cry:

another later edit: Ok, there was another post of Brian's on making the frame a hollow rectangle. It seems the frame is a solid rectangle which sits behind the image... and it was showing up behind it when the "unfocused" images had transparency applied. I made the changes and voila... all is well now.

Thank you Brian.

The threads are (sorry for the links, but there seems to be a limit to these):
post 1 on making the frame hollow: www[dot]airtightinteractive[dot]com/forum/viewtopic.php?t=2487
post 2 on making the image transparent: www[dot]airtightinteractive[dot]com/forum/viewtopic.php?t=3420


Cheers.


ps: Felix, I would still like to know which one of the methods is safer(regarding compliancy with future releases) and if the frame was to blame on the first method not working as expected? Thank you