Click to See Complete Forum and Search --> : [RESOLVED] Actionscript help with line that's not working
blanius
12-08-2007, 12:41 PM
Anyone have any ideas why this line of code won't work?
target_mc._x = hit_left._x+(eval("thumbnail_mc.t"+k)._width+5)*k;
It's driving me crazy...... I suspect it's the eval statement. and I may need a work around. KM complains
"expecting a varible for the property target"
and yes it says varible, not variable
w.brants
12-08-2007, 02:05 PM
Bret, Does it work when you change it to this ?
target_mc._x = hit_left._x+(this["thumbnail_mc.t"+k]._width+5)*k;
blanius
12-08-2007, 03:18 PM
Yes.. Thanks. Now to find what else is wrong
LOL :)
blanius
12-08-2007, 03:43 PM
Here that line is in context and while that fix keeps it form not parsing It's not working yet. Looks like the function is failing somewhere.
function thumbnails_fn(k) {
thumbnail_mc.createEmptyMovieClip("t"+k, thumbnail_mc.getNextHighestDepth());
tlistener = new Object();
tlistener.onLoadInit = function(target_mc) {
target_mc._x = hit_left._x+(this["thumbnail_mc.t"+k]._width+5)*k;
target_mc.pictureValue = k;
target_mc.onRelease = function() {
p = this.pictureValue-1;
nextImage();
}
target_mc.onRollOver = function() {
this._alpha = 50;
thumbNailScroller();
};
target_mc.onRollOut = function() {
this._alpha = 100;
};
};
image_mcl = new MovieClipLoader();
image_mcl.addListener(tlistener);
image_mcl.loadClip(thumbnails[k], "thumbnail_mc.t"+k);
}
blanius
12-08-2007, 03:45 PM
fyi I'm trying to adapt the gallery from
http://www.kirupa.com/developer/mx2004/thumbnails.htm
Combining it with PHP code that generates the xml
w.brants
12-10-2007, 06:51 AM
Did you get it to work Bret ?
If not, it might have to do with using a function within a function.
Did you try to look at the generated swf file with an actionscript viewer to see if everything looks fine ?
blanius
12-10-2007, 11:55 AM
No it's not working. What should be happening is thumbnails loaded into created clips but they are not loading or not being created.
blanius
12-20-2007, 10:41 AM
<bump>
Still not working.. Any ideas!
Bob Hartzell
12-20-2007, 10:49 AM
Function within a function may not be supported.
blanius
12-20-2007, 11:06 PM
Actually it was working, stupid me I didn't have the thumbnails in place so it didn't load them.... working now.
flashkit.com
Copyright WebMediaBrands Inc., All Rights Reserved.