|
-
KoolMoves Moderator
[RESOLVED] Actionscript help with line that's not working
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
-
Bret, Does it work when you change it to this ?
target_mc._x = hit_left._x+(this["thumbnail_mc.t"+k]._width+5)*k;
-
KoolMoves Moderator
Yes.. Thanks. Now to find what else is wrong
LOL
-
KoolMoves Moderator
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.
Code:
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);
}
-
KoolMoves Moderator
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
-
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 ?
-
KoolMoves Moderator
No it's not working. What should be happening is thumbnails loaded into created clips but they are not loading or not being created.
-
KoolMoves Moderator
<bump>
Still not working.. Any ideas!
-
Function within a function may not be supported.
-
KoolMoves Moderator
Actually it was working, stupid me I didn't have the thumbnails in place so it didn't load them.... working now.
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
|