A Flash Developer Resource Site

Results 1 to 10 of 10

Thread: [RESOLVED] Actionscript help with line that's not working

  1. #1
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244

    resolved [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

  2. #2
    Senior Member
    Join Date
    Dec 2002
    Location
    Netherlands
    Posts
    1,632
    Bret, Does it work when you change it to this ?

    target_mc._x = hit_left._x+(this["thumbnail_mc.t"+k]._width+5)*k;

  3. #3
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244
    Yes.. Thanks. Now to find what else is wrong

    LOL

  4. #4
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244
    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);
    
    }

  5. #5
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244
    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

  6. #6
    Senior Member
    Join Date
    Dec 2002
    Location
    Netherlands
    Posts
    1,632
    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 ?

  7. #7
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244
    No it's not working. What should be happening is thumbnails loaded into created clips but they are not loading or not being created.

  8. #8
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244
    <bump>
    Still not working.. Any ideas!

  9. #9
    Senior Member
    Join Date
    Jun 2000
    Posts
    3,512
    Function within a function may not be supported.

  10. #10
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244
    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
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center