-
Complex AS question.
Hi,
I have created a gallery which loads in images from a another file, what I have at the moment is when the gallery auto-thumbnails the image it shrinks the whole image. What I want to have is when a thumb-nail creates it selects just a portion of the image rather than all of it.
Here is the code:
Code:
function loadThumbs(page)
{
var __reg5 = undefined;
if (arrPics.length > 12)
{
trace(Math.floor(arrPics.length % ((page - 1) * 12)));
__reg5 = page * 12 <= arrPics.length ? 12 : Math.floor(arrPics.length % ((page - 1) * 12));
}
else
{
__reg5 = arrPics.length;
}
var __reg13 = 3;
var __reg16 = 3;
var __reg14 = 151;
var __reg15 = 121;
var __reg3 = __reg13;
var __reg6 = __reg16;
var __reg1 = 1;
for (;;)
{
if (__reg1 > __reg5)
{
return;
}
var __reg2 = (page - 1) * 12 + __reg1;
var __reg4 = "pic" + __reg1;
clipPics.attachMovie("mc_picview", __reg4, 20 + __reg1, {_x: __reg3, _y: __reg6, _image: arrPics[__reg2 - 1]._location, _desc: arrPics[__reg2 - 1]._desc, _picNum: __reg2});
trace("picNum = " + __reg2 + " = " + arrPics[__reg2 - 1]._location);
if (__reg1 % 4 == 0)
{
__reg3 = __reg13;
__reg6 = __reg6 + __reg15;
}
else
{
__reg3 = __reg3 + __reg14;
}
if (__reg1 > 12)
{
trace("picCount = " + __reg5);
return;
}
++__reg1;
}
}
If anyone could show me what I would need to change I would really appreciate it.
Thanks
-
Oh, I am usign AS 1 for this as its the only good way I could get it to work!
-
Thought it might have been complicated, if any one would be willing to take a look at my file and see how to help that would be cool. Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|