A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: need help with press and load

  1. #1
    Senior Member
    Join Date
    Mar 2005
    Posts
    154

    need help with press and load

    Hello there..

    After have been sitting and try to figure out for an hour... the result is still blur..so I need ur guy expertise help here..

    ok I just attach my mc into 2 container call holder1 and holder2 which is selected from the scrollbar...and different size also..
    then I will have 2 mc attach into holder call mc1 and mc2...so my question is...how to set when I click on the mc1 it will active/blinking so that i can load image on it eg; mc1.loadMovie("t0.jpg")..and when I click the mc2 the same process happen..it will active the mc2 so that I can load the image on it...I really don't know how and still lost it...really need help...
    this is the code I'm currently using...

    Code:
    stop();
    
    var mc1;
    var mc2;
    //navigation
    for (var i = 1; i<7; i++) {
            this._root.main["m"+i].ivar = i;
            this._root.main["m"+i].onRollOver = overMe;
            this._root.main["m"+i].onRollOut = outMe;
            this._root.main["m"+i].onPress = selectMe;                   
    }
    
    
    
    function overMe() {
           this.gotoAndPlay(2);
    }
    
    function outMe() {
            this.gotoAndPlay(1);
    }
    
    function selectMe() {
        //holder1
        mc1 = _root.holder.attachMovie("c"+this.ivar,"mc"+this.ivar,10+1);
        mc1._x = 480;
        mc1._y = 180;
        mc1.onPress = me1;
         //holder2
        mc2 = _root.holder2.attachMovie("c"+this.ivar+this.ivar,"mc2",20+1);
        mc2._x = 480;
        mc2._y = 180;
        //mc2.onPress = me2;
    }
    
    function me1(){
        //trace("click");
        attachMovie("frame","frame",5);
        frame._x = mc1._x;
        frame._y = mc1._y;
        frame._width = mc1._width;
        frame._height = mc1._height;
    }
    
    //bg button
    for(var ij=0;ij<3;ij++){
        //trace(this["p"+i]);
        this["p"+ij].ijvar = ij;
        this["p"+ij].onPress = loadBg;
        
    }
    //function load BG
    function loadBg(){
        //trace(this);
        mc1.loadMovie(this.ijvar+".jpg");
        
    }
    
    
    //go next
    nextbut.onPress = function(){
        gotoAndPlay(10);
        result.text = mc1;
    }
    one more thing I try to set var mc1 and var mc2 but when I try to trace in frame 10 ..it trace blank...AM i wrong...!!

    tq

    this is my working fla..

    http://fifin04.propertyaccess.com.my...essandload.zip

  2. #2
    Senior Member
    Join Date
    Mar 2005
    Posts
    154
    anyone !! bump!!

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