# Weird flickering problem

**URL:** https://forum.kirupa.com/t/weird-flickering-problem/172089
**Category:** Uncategorized
**Created:** [December 11, 2005, 3:38am UTC](https://forum.kirupa.com/t/weird-flickering-problem/172089 "2005-12-11T03:38:17Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![dstort1](https://avatars.discourse-cdn.com/v4/letter/d/77aa72/32.png) [@dstort1](https://forum.kirupa.com/u/dstort1)
#### Post date: [December 11, 2005, 3:38am UTC](https://forum.kirupa.com/t/weird-flickering-problem/172089/1 "2005-12-11T03:38:17Z")

</div>

hmm, i’m having this problem and i’m not sure how to solve it, (see code below) basically what happens is, information from a main.swf file is passed to a 2nd swf file, and that 2nd file creates a resizing box everytime a new thumbnail in the main.swf file is clicked on. i have the resizing and stuff working properly, the only problem i have now is loading the jpg of the image to be displayed. i made it so theres 2 frames, to keep updating itself, but when i do that it causes this annoying flickering, i think cuz it keeps trying to load the jpg constantly or something, does anyone know how to solve this?

i’ve tried doing it on 1 frame, but when i do that, the jpg doesnt load.

this code is from my 2nd file:

onEnterFrame = function() {

//Calculates How Large to Resize  
new\_image\_width = \_root.image\_width - mc\_boundry\_box.\_width;  
new\_image\_height = \_root.image\_height - mc\_boundry\_box.\_height;

//Easing Motion Tween  
mc\_boundry\_box.\_width += new\_image\_width/10;  
mc\_boundry\_box.\_height += new\_image\_height/10;

}

//Loads Image After Boundry Box is Done Resizing and Centers It  
if (Math.ceil(mc\_boundry\_box.\_width) == \_root.image\_width) {

mc\_image.loadMovie(\_root.file\_name);  
mc\_image.\_x = (500 - \_root.image\_width) / 2;  
mc\_image.\_y = (450 - \_root.image\_height) / 2;

}

\_root.file\_name is from the main.swf file, and is basically just something.jpg  
\_root.image\_width is the image width of something.jpg,  
\_root.image\_height is the image height of something.jpg,

if anyone can help me it’d be greatly appreciated, thanks a lot

edit: sorry for the double post but i didnt realize i posted this in the wrong forum earlier

edit2: heres an actual example of what i mean, [www.dstort1.com/preview/main.html](http://www.dstort1.com/preview/main.html) if you click on the photography and experimental section sections of the site you’ll see the problem
