Quick Flash AS3 snippets from a self-taught programmer wannabe.
var xDist = mouseX/stage.stageWidth;
target.x = -xDist *(target.width - stage.stageWidth);
what is the full code?
do you mean source code-fla?I didn't post it because it's just 3 movieclips (width longer than stage) named bg1 to bg3. Then just copy paste the code above. That is the full code.
Fantastic and simplistic, great article. Had been browsing for examples and knew there was a more fluid and simple method to achieve this other than the many examples online which go from hundreds of lines of code to several indepth classes which blow your mind.Love it, keep up the great work, helps us all keep some sanity when trying to appreciate the joy/hate of AS3. . .