00:00
00:00
View Profile gdtimeinc

Male

Joined on 6/22/10

Level:
1
Exp Points:
10 / 20
Exp Rank:
> 100,000
Vote Power:
1.50 votes
Rank:
Civilian
Global Rank:
> 100,000
Blams:
0
Saves:
1
B/P Bonus:
0%
Whistle:
Normal
Medals:
1

Need help moving background with mouse.

Posted by gdtimeinc - May 8th, 2014


I am trying to simulate a camera that moves a background with my mouse. In the file I have provided I set up a 3x3 grid to fit the stage as a visual reference. The background that moves with the mouse is a 5x5 grid, the same ratio as my refernce grid, positioned center to the stage. I put numbers in each slot (25 total) so I can easily track where my background image is in relation to my stage. I borrowed some code since I don't know actionscript.

When I test the movie and  pan to the left (up or down) everything works perfectly; the tiles on my background image line up with the tiles on the stage grid. When I pan to the right the background over extends itself revealing the reference grid on the stage. I understand that my background image is transparent, if my background was that of a livingroom then panning to the right would reveal a naked stage and that wouldnt look good.

I have tried code from various tutorials and I recieve the same results. I have also messed around with the position of the background's registration postition. I don't know action script and have exhausted the extend of my flash knowledge. If anyone could dissect my file and help me out it would be greatly appreciated!

Here is the link to my file, I assume you can open a .swf in flash and get to my work from there. Let me know if you have and problems as I am a novice.

 

http://www.newgrounds.com/dump/item/937133f33ab202d8b92bfd65c2ad0dbc

 

Thanks!


Comments

Comments ain't a thing here.