Question reiterated about Mouse controlling background MC


ok so, able background scrolling, scrolls opposite of direction want to.  here code

 

 

addeventlistener(event.enter_frame,scrollmc1 );

 

 

function scrollmc1(event:event):void

 

{

     if(mc.x < 911  && (mousex > 1100)) {

 

 

        mc.x += (mousex - mc.x) * 0.04;

 

    }

    {

     if(mc.x > 369  && (mousex < 50)) {

 

 

        mc.x += (mousex - mc.x) * 0.04

    }

 

}}

 

any idea on how fix if point right of screen, picture scroll right?  appreciated.  thanks

if going opposite direction want, reverse order of 2 things subtracting , see if fixes it...

 

mc.x += (mc.x - mousex) * 0.04



More discussions in ActionScript 3


adobe

Comments

Popular posts from this blog

Upgrade 3.4.8 to 3.5.1 failed "download package failed" - Joomla! Forum - community, help and support

Joomal 3.6.3 update error - PHP temporary folder is not set - Joomla! Forum - community, help and support

Fatal error during instalation - Joomla! Forum - community, help and support