PHP forums, MySQL forums, Web Development resources

Home PageHome    PHP ResourcesTopic List    FAQFAQ    SearchSearch    MemberlistMemberlist    UsergroupsUsergroups 
 RegisterRegister
    ProfileProfile    Log in to check your private messagesLog in to check your private messages    Download the RSS Reader RSS Feed Download the RSS Reader RSS for this forum Log inLog in 

PHP Forum :: MySQL Forum :: Java Script Forum



js:when we move items with differ angles how to change image

 
Post new topic   Reply to topic    WeberForums.com Forum Index -> Java Script / AJAX
View previous topic :: View next topic  
Author Message
Leonidasphp



Joined: 25 Feb 2005
Posts: 305

PostPosted: Sat Feb 02, 2008 9:51 am    Post subject: js:when we move items with differ angles how to change image Reply with quote

when we move items with differ angles on screen 30 degrees after 90 after 245 degrees and we need to change images how we achieve this change ? eg a rocket moves and go around screen in random direction ?
using DHTML ,<div> ,...
Back to top
View user's profile Send private message
lostboy



Joined: 02 May 2004
Posts: 6033
Location: toronto, canada

PostPosted: Sat Feb 02, 2008 6:38 pm    Post subject: Reply with quote

use dhtml and <div>s...your icon can be in the div on a transparent background and you can use dhtml (js) to move the object around
Back to top
View user's profile Send private message Send e-mail AIM Address MSN Messenger
Leonidasphp



Joined: 25 Feb 2005
Posts: 305

PostPosted: Sat Feb 02, 2008 7:29 pm    Post subject: eg during a rocket flight I want differ images how to interc Reply with quote

eg during a rocket flight I want differ images how to interchange them ?
Back to top
View user's profile Send private message
lostboy



Joined: 02 May 2004
Posts: 6033
Location: toronto, canada

PostPosted: Sat Feb 02, 2008 9:37 pm    Post subject: Reply with quote

you can use js to switch the images based on whatever criteria at whatever time during the 'flight' you want
Back to top
View user's profile Send private message Send e-mail AIM Address MSN Messenger
Leonidasphp



Joined: 25 Feb 2005
Posts: 305

PostPosted: Mon Feb 04, 2008 7:32 am    Post subject: How I make the movement go to randomly direction(s) ? Reply with quote

How I make the movement go to randomly direction(s) ? I must use random() ?
Back to top
View user's profile Send private message
lostboy



Joined: 02 May 2004
Posts: 6033
Location: toronto, canada

PostPosted: Mon Feb 04, 2008 10:01 pm    Post subject: Reply with quote

http://www.w3schools.com/jsref/jsref_random.asp
Back to top
View user's profile Send private message Send e-mail AIM Address MSN Messenger
Leonidasphp



Joined: 25 Feb 2005
Posts: 305

PostPosted: Tue Feb 05, 2008 10:46 am    Post subject: I know to use random() , but how apply it to random image mo Reply with quote

How I make the movement go to randomly direction(s) ? I know to use random() , but how apply it to random image movement ?
Back to top
View user's profile Send private message
lostboy



Joined: 02 May 2004
Posts: 6033
Location: toronto, canada

PostPosted: Thu Feb 07, 2008 6:00 am    Post subject: Reply with quote

http://www.java2s.com/Code/JavaScript/GUI-Components/AnimationRandomMovement.htm
Back to top
View user's profile Send private message Send e-mail AIM Address MSN Messenger
Display posts from previous:   
WeberTrivia Questions WeberTrivia Questions
 Think you are smart? Prove it!. Try your skills with these questions :
 WeberTrivia QuestionsRecursive arrays and multi-dimensional arrays are one and the same. (PHP and MySQL)
 WeberTrivia QuestionsThe \"cache_dir\" tag of the squid configuration has a default of /var/spool/squid. (Linux)

WeberTrivia Questions



PHP Code Examples
 Stream diffrent sizes of images from a single image to save disk space.
 JavaScript dropdown list menu to switch any page.
 Dump the contents of a PHP variable in html format with a recursive list of subfolders and files from a given root directory.
 PHP Dump in html format the contents of one array variable with a recursive list of the nested array variables inside.
 Link Extractor - This function is used to extract links from a given URL. This will convert relative path into absolute path and also remove PHPSESSID stuff.
 Building a Dynamic Form using Javascript and innerHTML. Add form elements in realtime without refreshing the page.
 A PHP Calendar function with CSS : add a cool calendar to any php page by just adding a calendar class based function.
Post new topic   Reply to topic    WeberForums.com Forum Index -> Java Script / AJAX All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Powered by phpBB © 2001, 2005 phpBB Group
PHP Forum :: MySQL Forum :: Java Script Forum