A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: [RESOLVED] What's so different about loading or attaching clips?

Hybrid View

  1. #1
    Senior Member
    Join Date
    Jan 2007
    Location
    Barcelona
    Posts
    389

    resolved [RESOLVED] What's so different about loading or attaching clips?

    Hi,

    I'm trying to transpose the code from a tutorial on building a gallery since my server won't upload any images loaded via movieClipLoader and the tutorial was designed that way. It's fairly simple, I guess, but I have been going around it all yesterday.

    Images are loaded into their respective movieclip box containers with masks so that as soon as they're attached, the mask will resize to show the full image.

    I got all the clips loaded but when tryinhg to resize the main one, the eval method doesn't seem to work properly. I believe the syntax is correct, but some images resize on both properties and others will only do so on the width or the height.

    Can anyone lend me a hand to solve this?

    the code right after attaching the clips:

    Code:
    function loading_function(a:Number):Void {
    	
    	if (this["box"+a] != box1) {
    		this["box"+a].onPress = function():Void  {
    			temp = a;
    			n = eval(prevTop+".id");
    			box1.targetBox.attachMovie("image - "+a, "image - "+a, getNextHighestDepth());
    			this.targetBox.attachMovie("image - "+n, "image - "+n, getNextHighestDepth());
    			box1.id = a;
    			a = n;
    		
    			if (temp == eval("box"+temp+".id") ){
    				
    				eval(prevTop).boxMask._width = eval(prevTop).targetBox._width;
    				eval(prevTop).boxMask._height = eval(prevTop).targetBox._height;
    				eval(prevTop).boxOutline._width = eval(prevTop).targetBox._width;
    				eval(prevTop).boxOutline._height = eval(prevTop).targetBox._height;
    			}
    		};
    	}
    	this["box"+a].targetBox.attachMovie("image - "+a, "image - "+a, this.getNextHighestDepth());
    }

  2. #2
    . fruitbeard's Avatar
    Join Date
    Oct 2011
    Posts
    1,780
    Hi,

    I'd like to try and help you, however it would be nice if you could zip up the whole package including images etc etc, so that I do not have to try and reconstruct your files.

  3. #3
    Senior Member
    Join Date
    Jan 2007
    Location
    Barcelona
    Posts
    389
    thanks fruitbeard,

    I can't resize the fla though... I just changed the images besides converting them to B & W but it's still over 4 mb... I'll have to post it again. Thanks, though

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