A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: [f8]

  1. #1
    Junior Member
    Join Date
    Nov 2007
    Posts
    18

    [f8]

    I have 6 buttons inside a movie clip that need to perform this function :
    PHP Code:
    speed 1;
    imageSpeed 3;
    imagestargetX 375;
    this.onEnterFrame = function ()
    {
        
    contents._x contents._x + (imagestargetX contents._x) / imageSpeed;
    };
    stop ();
    tab1.onRelease = function ()
    {
        
    imagestargetX 375;
    };
    tab2.onRelease = function ()
    {
        
    imagestargetX = -75.5;
    };
    tab3.onRelease = function ()
    {
        
    imagestargetX = -520.5;
    };
    tab4.onRelease = function ()
    {
        
    imagestargetX = -926.5;
    };
    tab5.onRelease = function ()
    {
        
    imagestargetX = -1384.4;
    };
    tab6.onRelease = function ()
    {
        
    imagestargetX = -1836.3;
    }; 
    I set up the instance names for the buttons but they do nothing :??:
    Is it because they are in a movie clip?
    If so, ho do I overcome this problem??
    Thanks for the help!

  2. #2
    Senior Member calmchess's Avatar
    Join Date
    Sep 2006
    Location
    Earth
    Posts
    2,588
    PHP Code:
    stop (); 
    speed 1
    imageSpeed 3
    imagestargetX 375

    function 
    switchX (imagestargetX){    contents._x contents._x + (imagestargetX contents._x) / imageSpeed
    }; 

    tab1.onRelease = function () 

        
    imagestargetX 375
    switchX(imagestargetX);
    }; 
    tab2.onRelease = function () 

        
    imagestargetX = -75.5
    switchX(imagestargetX);
    }; 
    tab3.onRelease = function () 

        
    imagestargetX = -520.5
    switchX(imagestargetX);
    }; 
    tab4.onRelease = function () 

        
    imagestargetX = -926.5
    switchX(imagestargetX);
    }; 
    tab5.onRelease = function () 

        
    imagestargetX = -1384.4
    switchX(imagestargetX);
    }; 
    tab6.onRelease = function () 

        
    imagestargetX = -1836.3
    switchX(imagestargetX);
    }; 
    ~calmchess~

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