Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Flash / Flash Actionscript / July 2008



Tip: Looking for answers? Try searching our database.

help with ymouse restriction

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Alwinch - 31 Jul 2008 21:27 GMT
Hi all this is beyond my skill so I am hoping you can help. I have a
scrolling movie clip that scolls left or right depending on where your mouse
moves on the ENTIRE stage. I want to confine it to only work when the mouse
is over the scorlling clip. I am told I need "ymouse test restriction" in
the enginehandler. This is the code for the first lines of the engine
handler
the MC sits on X of -10.9 and Y of 420 THANK YOU so much.

function startEngine() {
this.onEnterFrame = engineHandler;}

function addObjects() { //add objects in the scene

var objects = xmlObj.firstChild.childNodes;

for(var i=0; i<objects.length; i++) {

var link = objects[i].attributes.source; //the image link in the xml file
if (useFixedImageSize==1) source1 = "imgMc"; //image mc linkage id from the
library
     else source1 = "imgMc_01"; var sourceType1 = "library";
var regName1 = "p"+i; //the registration name used in Flash

this.attachMovie(source1,regName1,1000+i);

var x1 = (this["p0"]._width/2 + xOffset) + (i * (this[regName1]._width +
offset));
var y1 = this["p0"]._height/2;

this[regName1]._x = x1;
this[regName1]._y = y1;

//this[regName1]["imgBox"].loadMovie(link); //load external image

if (useZoom) { //set some variables used in object zoom calculation
    this[regName1]["currZoom"] = 0;
}

this[regName1]["info"] = objects[i];//keep the XML node info
nodes[i] = this[regName1]; //add object to nodes array

 //this[regName1].onPress = pressHandler;
//this[regName1].onRelease = this[regName1].onReleaseOutside =
releaseHandler;

}

var nr = objects.length;
var inst = "p"+nr;
var pos = sc.getCoordinates(inst);

totalDistance = (nr * (this["p0"]._width + offset)) - offset;
//trace(totalDistance+"  "+this["p0"]._width);
}
kglad - 31 Jul 2008 21:50 GMT
use the attach code option to display code in this forum.  and i don't seen any handlers, but you can use a hitTest() between your scrolling movieclip and the mouse to determine if you want to scroll.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.