# Fade-in for Pic Gallery Using URLRequest

**URL:** https://forum.kirupa.com/t/fade-in-for-pic-gallery-using-urlrequest/273778
**Category:** flash
**Created:** [October 20, 2008, 7:34pm UTC](https://forum.kirupa.com/t/fade-in-for-pic-gallery-using-urlrequest/273778 "2008-10-20T19:34:01Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![txnyriny](https://avatars.discourse-cdn.com/v4/letter/t/838e76/32.png) [@txnyriny](https://forum.kirupa.com/u/txnyriny)
#### Post date: [October 20, 2008, 7:34pm UTC](https://forum.kirupa.com/t/fade-in-for-pic-gallery-using-urlrequest/273778/1 "2008-10-20T19:34:01Z")

</div>

Hi – I don’t have the AS3 wherewithal to figure this out on my own, unfortunately. I’m using the below code to call up external jpegs via thumbnails placed on the stage (“guatTnails.boatAtDuskTh” being a sample thumbnail). I’m calling them into a component loader (“loader”).

I slapped the tween fade code into the function to see if it would work, and lo and behold it did. But only when I preview the swf in Flash, where it works nicely. When I run “simulate download” or when I upload to the web, it’s as if the code isn’t there – no fade-in at all.

Any idea why it works in Flash but not in real life, and/or is there another simple way to achieve a fade in for each image in my photo gallery?

Thanks!!

import fl.transitions.Tween;  
import fl.transitions.easing.\*;

guatTnails.boatAtDuskTh.addEventListener (MouseEvent.CLICK, ldr1)  
function ldr1 (e:Event) {  
loader.load(new URLRequest(“pictures/boat at dusk.jpg”));  
var myFadeIn:Tween = new Tween(loader, “alpha”, Regular.easeIn, 0, 1, 1, true);  
}
