/    Sign up×
Community /Pin to ProfileBookmark

Another newbie needing help!!

I’m a student and have a JScript exercise due really soon.
I need a script that randomly (math.random)moves an image around the screen with the ability to stop it with a onMouseover or OnClick event. I can find lots of random images, but am stuck on how to create a pause. I know I need to reset the interval to 0 when onMouseover is true, but can’t find a script to deconstruct for this assignment.
Anybody got or know of one??

Thanks

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@pyroApr 29.2003 — Since this is for an assignment, don't you think it would be better if you tried to do it yourself, rather than ask for a script? Why don't you post the code you have so far, and I'm sure we will be able to help point you in the right direction from there.
Copy linkTweet thisAlerts:
@DrDaMourApr 29.2003 — say your movment function is move()

well at the end of move you should have



if(WantToKeepMoving?){

setTimeout(move(),"timeInMiliseconds");

}
×

Success!

Help @Jscript_student spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...