Page 21 of 33 FirstFirst ... 11192021222331 ... LastLast
Results 201 to 210 of 327

Thread: new to flash 2004 mx

  1. #201
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    You didn't change all the instances of panel in the loop.

    Replace all instances of panel within the loop with
    Code:
    this["panel"+j]
    as I stated previously.

    Also, get rid of all of this:
    Code:
    // Position the panel movieclips
    // 450px is the width of the images I choose to use
    panel.x=900;
    panel2._x = 450;
    
    
    //  Start scrolling right away
    this.onEnterFrame = Scroll;
    
    // Functionality
    // Workhorse function -- ScrollI()
    function Scroll() {
    	panel._x = panel._x - 2;  // move panel1 to the left by 2px
    	panel2._x = panel2._x - 2;  // move panel2 to the left by 2px
    
    	if (panel._x == -450) {    // if panel1 is off the screen, move it to the end of the queue
    		panell_x = 900;        
    	}
    	if (panel2._x == -450) {    // if panel2 is off the screen, move it to the end of the queue
    		panel2._x = 900;
    	}
    
    }
    Make those changes and test again. It should work. If it doesn't...post your code again!

  2. #202
    Join Date
    Mar 2008
    Posts
    222
    Thanks
    10
    Thanked 3 Times in 3 Posts

    Default

    cool down medyman
    Last edited by hyk; 05-07-2008 at 04:42 AM.

  3. #203
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    You missed most of them.

    Code:
    this.createEmptyMovieClip("panel1", this.getNextHighestDepth());
    this.createEmptyMovieClip("panel2", this.getNextHighestDepth());
    var count:Number = 0; 
    function loadContainers() {
    for(j=1;j<=2;j++) {
    for(i=0;i<images.length-1;i++) {
    var symbol:MovieClip = this["panel"+j].createEmptyMovieClip("symbol"+i, i);
    var thumb:MovieClip = panel["symbol"+i].createEmptyMovieClip("thumb", i); 
    var image:MovieClip = panel["symbol"+i]["thumb"].createEmptyMovieClip("image", 30+i);
    
    this["panel"+j]._x = 202*i
    this["panel"+j]._y = Stage.height/4;
    
    var mcl:MovieClipLoader = new MovieClipLoader();
    var mclL:Object = new Object();
    
    mclL.onLoadComplete = function() {
    count++;
    if(count ==images.length-1) {
    beginScroll();
    }
    } 
    } 
    mcl.loadClip("rawdata/"+images[i], panel["symbol" +i]["thumb"]["image"]);
    mcl.addListener(mclL);
    
    panel["symbol"+i].id = i;
    panel["symbol"+i].onRelease = function() {
    getURL(urls[this.id]);
    }
    }
    }
    Test again. If it doesn't work, post the code again. You only need to paste the loadContainers() function. And please use the [code] tag when posting code.

  4. #204
    Join Date
    Mar 2008
    Posts
    222
    Thanks
    10
    Thanked 3 Times in 3 Posts

    Default

    *bump* my head on table. SORRIE.

    i edited all like you told me too. Eh how could you scan through it so fast?

    **Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 50: Unexpected '.' encountered
    ["panel"+j]["symbol"+i].id = i
    Code:
    his.createEmptyMovieClip("panel1", this.getNextHighestDepth());
    this.createEmptyMovieClip("panel2", this.getNextHighestDepth());
    var count:Number = 0; 
    function loadContainers() {
    	for(j=1;j<=2;j++) {
    		for(i=0;i<images.length-1;i++) {
    		var symbol:MovieClip = this["panel"+j].createEmptyMovieClip("symbol"+i, i);
    		var thumb:MovieClip = ["panel"+j]["symbol"+i].createEmptyMovieClip("thumb", i);	
    		var image:MovieClip = ["panel"+j]["symbol"+i]["thumb"].createEmptyMovieClip("image", 30+i);
    
    		this["panel"+j]._x = 202*i
    		this["panel"+j]._y = Stage.height/4;
    		
    		var mcl:MovieClipLoader = new MovieClipLoader();
    		var mclL:Object = new Object();
    		
    		mclL.onLoadComplete = function() {
    			count++;
    			if(count ==images.length-1) {
    				beginScroll();
    			}
    		}
    		}
    		mcl.loadClip("rawdata/"+images[i], ["panel"+j]["symbol" +i]["thumb"]["image"]);
    		mcl.addListener(mclL);
    		
    		["panel"+j]["symbol"+i].id = i;
    		["panel"+j]["symbol"+i].onRelease = function() {
    			getURL(urls[this.id]);
    		}
    	}
    }
    Last edited by hyk; 05-07-2008 at 04:32 AM.

  5. #205
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    i edited all like you told me too
    Not quite...


    Code:
    ["panel"+j]["symbol"+i].id = i
    should be

    Code:
    this["panel"+j]["symbol"+i].id = i
    If you've forgotten the this in other places, please add it.
    Last edited by Medyman; 05-07-2008 at 04:36 AM.

  6. #206
    Join Date
    Mar 2008
    Posts
    222
    Thanks
    10
    Thanked 3 Times in 3 Posts

    Default

    medyman, so i add
    Code:
    this["panel"+j]
    to all the panel right?

  7. #207
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    Yup.

    Everywhere that's highlighted below should be this["panel" + j] instead of ["panel" + j]

    Code:
    his.createEmptyMovieClip("panel1", this.getNextHighestDepth());
    this.createEmptyMovieClip("panel2", this.getNextHighestDepth());
    var count:Number = 0; 
    function loadContainers() {
    	for(j=1;j<=2;j++) {
    		for(i=0;i<images.length-1;i++) {
    		var symbol:MovieClip = this["panel"+j].createEmptyMovieClip("symbol"+i, i);
    		var thumb:MovieClip = ["panel"+j]["symbol"+i].createEmptyMovieClip("thumb", i);	
    		var image:MovieClip = ["panel"+j]["symbol"+i]["thumb"].createEmptyMovieClip("image", 30+i);
    
    		this["panel"+j]._x = 202*i
    		this["panel"+j]._y = Stage.height/4;
    		
    		var mcl:MovieClipLoader = new MovieClipLoader();
    		var mclL:Object = new Object();
    		
    		mclL.onLoadComplete = function() {
    			count++;
    			if(count ==images.length-1) {
    				beginScroll();
    			}
    		}
    		}
    		mcl.loadClip("rawdata/"+images[i], ["panel"+j]["symbol" +i]["thumb"]["image"]);
    		mcl.addListener(mclL);
    		
    		["panel"+j]["symbol"+i].id = i;
    		["panel"+j]["symbol"+i].onRelease = function() {
    			getURL(urls[this.id]);
    		}
    	}
    }

  8. #208
    Join Date
    Mar 2008
    Posts
    222
    Thanks
    10
    Thanked 3 Times in 3 Posts

    Default

    lol, i was about to post it. so nothing will happens right?
    Last edited by hyk; 05-07-2008 at 04:50 AM.

  9. #209
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    Did you add panel2._y = 100; to the botttom?

    If so, you should see a duplicate of the panels movieclip. You might need to expand the size of your window. I have my stage set at the default 550 x 400 and I can see it.


    Confirm that you do, and we'll move on to adding the motion.

  10. #210
    Join Date
    Mar 2008
    Posts
    222
    Thanks
    10
    Thanked 3 Times in 3 Posts

    Default

    Code:
    		this["panel"+j]["symbol"+i].id = i
    		this["panel"+j]["symbol"+i].onRelease = function() {
    		
    		getURL(urls[this.id]);
    		}
    	}
    }
     panel2._y = 100; // my last line for now
    eh, its blank medyman. I think we leave it for now( its quite late already, your time )
    your stage size is the same as me. could it be the code errors?( my fault )
    Last edited by hyk; 05-07-2008 at 04:55 AM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •