NTNUJAVA Virtual Physics Laboratory
Enjoy the fun of physics with simulations!
Backup site http://enjoy.phy.ntnu.edu.tw/ntnujava/
December 12, 2017, 11:51:47 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
"There is nothing either good or bad, but thinking makes it so." ..."Shakespeare (154-1616, English dramatist and poet) "
Google Bookmarks Yahoo My Web MSN Live Netscape Del.icio.us FURL Stumble Upon Delirious Ask FaceBook

Pages: [1]   Go Down
  Print  
Author Topic: How make applet run one time only/board:23-100-  (Read 4502 times)
0 Members and 1 Guest are viewing this topic. Click to toggle author information(expand message area).
ahmedibrahim

Offline Offline

Posts: 1

«
Embed this message
on: July 16, 2010, 08:17:54 pm » posted from:SAO PAULO,SAO PAULO,BRAZIL

Hello prof
Is me Ahmed I'm use this account still you solve problem in my account
I want ask how to make applet airdrag run one time only.
I see run two times one by myself and number 2 automatic i search in code
But no find what make applet run two time,, or may I'm not notice however.
How i make applet run one time only i will attach jar file because i see by this account i use i cant upload jar file.
Thanks
This is code fixed page:

Code:
if(_isPlaying() && x>xmax+size && y<ymin+size ){
_initialize();
playpause();
}
if(x>xmax*scale || y>ymax*scale){
 scale=scale*1.2;
}



* airdrag5.gif (15.48 KB, 946x452 - viewed 249 times.)

*** There are 1 more attached files. You need to login to acces it!
Logged
Fu-Kwun Hwang
Administrator
Hero Member
*****
Offline Offline

Posts: 3080



WWW
«
Embed this message
Reply #1 on: July 16, 2010, 09:04:47 pm » posted from:Taipei,T\'ai-pei,Taiwan

I do not fully understand what do you mean by run one time only?

Do you mean when it reach the ground again , the program stop and user can not change it any more?
It can be done, but why you want to do this?

Your original account is back to normal now. It seems that the server detect you were doing something un-normal (like a spam), so the server block your account.
Logged
ahmedelshfie
Ahmed
Hero Member
*
Offline Offline

Posts: 954



«
Embed this message
Reply #2 on: July 16, 2010, 10:25:45 pm » posted from:Uberaba,Minas Gerais,Brazil

I add graphic to X and Y so when i run simulation mass begin move by value that i set
And when touch ground return again by the same trace for second time so in graphic line become more Strong
So i think may this mix students when watch graphic work again by the same way without change value so this make me ask
To make applet work just one time only.

About mu account i don't know really what happen i was check site normally yesterday
And 10 Minuet's before finish time my work find it in my account so i Email you direct.
Thank you so much.
Logged
lookang
Hero Member
*****
Offline Offline

Posts: 1784


http://weelookang.blogspot.com


WWW
«
Embed this message
Reply #3 on: July 17, 2010, 12:12:46 am » posted from:Chicago,Illinois,United States

Code:
if(_isPlaying() && x>xmax+size && y_initialize();
playpause();
}
if(x>xmax*scale || y>ymax*scale){
 scale=scale*1.2;
}

fixed by commenting this
if(_isPlaying() && x > xmax+size && y < ymin+size ){
//_initialize(); //commented by lookang to stop looping
playpause(); //commented by lookang to stop only once
}


*** There are 3 more attached files. You need to login to acces it!
« Last Edit: July 17, 2010, 12:25:18 am by lookang » Logged
ahmedelshfie
Ahmed
Hero Member
*
Offline Offline

Posts: 954



«
Embed this message
Reply #4 on: July 17, 2010, 12:35:45 am » posted from:SAO PAULO,SAO PAULO,BRAZIL

Now is finish ,, // _initialize(); by lookang work very well
Thanks prof
You van check too on Airdrag


*** There are 1 more attached files. You need to login to acces it!
« Last Edit: July 17, 2010, 12:39:58 am by ahmedelshfie » Logged
Pages: [1]   Go Up
  Print  
"There is nothing either good or bad, but thinking makes it so." ..."Shakespeare (154-1616, English dramatist and poet) "
 
Jump to:  


Related Topics
Subject Started by Replies Views Last post
how to make a slider time t that allows user to slide to replay simulation
Questions related to EJS
lookang 2 7982 Last post September 22, 2008, 02:36:43 pm
by lookang
is it possible to make applet make a sound when i condition is met?
Questions related to EJS
lookang 8 10439 Last post December 22, 2008, 12:10:01 pm
by lookang
How to make an applet that is controlled by F (length) and angle (cta)
Questions related to EJS
lookang 4 8039 Last post March 02, 2009, 10:22:45 pm
by Fu-Kwun Hwang
how do make Ejs applet run forever unless the pause or reset
Questions related to EJS
lookang 3 4952 Last post June 21, 2010, 07:52:30 pm
by Fu-Kwun Hwang
can make ejs web java applet on click some button and full screen is shown?
Questions related to EJS
lookang 4 6228 Last post August 10, 2011, 02:49:37 pm
by lookang
Powered by MySQL Powered by PHP Powered by SMF 1.1.13 | SMF © 2006-2011, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 0.062 seconds with 23 queries.since 2011/06/15