Home Tutorials Forums Articles Blogs Movies Library Employment Press

 ActionScript.org Forums this is a difficult question (isometric scrolling)
 Register FAQ Members List Social Groups Calendar Search Today's Posts Mark Forums Read

 05-25-2004, 09:38 AM #1 mrMeatbag Registered User   Join Date: May 2004 Posts: 7 this is a difficult question (isometric scrolling) this concerns isometric scrolling. ok. i need to keep the character always centered on a tile, no matter how much the user holds down the arrow key. I'm pretty sure that the problem can be solved by modifying this one simple formula: ob.y += ob.speed*diry; this basically means to change the isometric _y (ob.y) by how ever many pixels are specified in ob.speed, how ever many times the down arrow key is pressed (diry represents the arrow key being pressed.) I've tried to change it to the following formula, which actually works wonderfully on a non-isometric map: ob.y += (speed*diry)-(ob.y)/div; Using this formula, speed is set to equal the tile width, and the numeric value assigned to div should actually control the speed of the scrolling. Actually, to be honest... I get the basic idea, but how dividing a number into the difference is supposed to control the scrolling I have no idea. The original source of this formula (the non-iso one that works wonderfully) says "we divide the difference by div to have an value that continues to change until the equation is true." The problem: Without dividing by div, it kind of almost works but instead of scrolling, the map really just instantly moves that many pixels over. And the character doesn't stay centered in the tile. When dividing by div, it slows down the scrolling, but the character doesn't stay centered at all. for reference: Tile width (tileW) = 71 Speed, by my formula should also be 71, in the original is about 6 or whatever div can be whatever thanks so much in advance for any help
 05-26-2004, 04:22 AM #2 mrMeatbag Registered User   Join Date: May 2004 Posts: 7 anyone?

 Thread Tools Display Modes Rate This Thread Linear Mode Rate This Thread: 5 : Excellent 4 : Good 3 : Average 2 : Bad 1 : Terrible

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is Off HTML code is Off Forum Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home ActionScript Forums Group     ActionScript 3.0     ActionScript 2.0     ActionScript 1.0 (and below)     Simple Stuff (Newbies) Flash General Questions     Flash 10 General Questions     Flash 9 General Questions     Flash 8 General Questions     Other Flash General Questions Flex     Flex 2, 3 & 4     Flex 1 Extensions and Plugins     Components     JSFL - Extending Flash Desktop, Mobile and non-browser Environments     AIR (Apollo)     FlashLite / Portable Devices Development     Projectors and CDs Supporting Technologies     HTML and JavaScript     haXe     Server-Side Scripting     Flash Remoting     Flash Media Server General     Best Practices     Gaming and Game Development     Animation and Effects     Flashants Support Forum Community Boards     General Chat     Just for Kicks Challenges     Detention Flash In Action     Site Check     Cool Sites     Widgets Decommissioned     Projects and Positions CMS Forums     Announcements Board     Content Postings / Updates     Product Review Requests     CMS Technical Questions     Process Questions     Collaboration & Suggested Articles

All times are GMT. The time now is 07:14 PM.

///