Horse and bird race
hi guys ,
i've done a race between horse and bird , but the animation isn't repeatitive ,horse and bird race normaly but don't rebegin automatically
the code is that:
import flash.text.*;
var largeur:uint = stage.stageWidth;
var hauteur:uint = stage.stageHeight;
// Calculer un ecart de 5% de la largeur de la fenêtre
var ecart:uint = 40;
//definir un container pour gerer la liste d'affochage
var terrainCourse:Sprite=new Sprite();
addChild(terrainCourse);
// Définir un format d'écriture, police "Impact", coprs 20, couleur rouge
var format:TextFormat = new TextFormat("Impact", 16, 0xffffff);
// Définir le compteur de participants
var cptrParticipant:uint=0;
// Boucle do-while
// Définir le nombre d'horse maximum
var nbhorse:uint = 3;
// Définir le compteur d'horsex
var cpthorse:uint = 0;
// Faire
do {
// Créer une occurrence horse
var horse:horseClp = new horseClp();
// Positionner l'horse en dehors de la scène, à gauche
// La position des horse est calculée au hasard dans un intervalle de
// 0 à 40 pixels pour x
// hauteur / 4 et 3*hauteur/4 pixels pour y
horse.x = horse.width+ Math.random()*ecart;
horse.y = hauteur/4 + Math.random()*hauteur/2;
// Chaque horse possède sa propre vitesse calculée au hasard entre 2 et7
horse.vitesse = Math.random()*20+5;
// Les horsex ne sont pas synchronisés, on calcule au hasard l'image de départ de l'animation du clip
var imageDeDepart:uint = Math.random()*horse.totalFrames;
horse.gotoAndPlay(imageDeDepart);
// Afficher l'horse
terrainCourse.addChild(horse);
// Placer un numéro sur l'horse et l'afficher sur l'horse
// Créer un champ de texte
var dossard:TextField = new TextField();
// Modifier le format de texte par défaut
dossard.defaultTextFormat = format;
// Positionner le champ de texte au centre du clip
dossard.x=-horse;
dossard.y=-5;
// Numéroter l'horse en fonction du compteur de participant
dossard.text =cptrParticipant ;
// Afficher le champ de texte sur l'horse
horse.addChild(dossard);
//le cheval se deplace sur event.ENETR_FRAME
//horse.addEventListener(Event.ENTER_FRAME,bouge);
//le cheval affiche son numerosur event.complete
horse.addEventListener(Event.COMPLETE,arrete);
// Passer à l'horse suivant
cpthorse++;
cptrParticipant++;
// Tant que le compteur d'horse est plus petit que le nombre maximum d'horse
} while ( cpthorse < nbhorse);
// Boucle while - initialisation du compteur
var cptoiseau:uint = 0;
var nboiseau:uint =3;
// Tant que le compteur d'oiseau est plus petit que le nombre maximum d'oiseau
while (cptoiseau < nboiseau) {
// Créer une occurrence oiseau
var oiseau:oiseauClp = new oiseauClp();
// Positionner l'agneau en dehors de la scène, à gauche
// La position des agneau est calculée au hasard dans un intervalle de
// 0 à 40 pixels pour x
// ecat et hauteur / 4 et 3*hauteur/4 pixels pour y
oiseau.x = oiseau.width +Math.random()*ecart ;
oiseau.y = Math.random()*hauteur+ecart;
// Chaque oiseau possède sa propre vitesse calculée au hasard entre 2 et7
oiseau.vitesse = Math.random()*7+2;
// Les agneaux ne sont pas synchronisés, on calcule au hasard l'image de départ de l'animation du clip
imageDeDepart = Math.random()*oiseau.totalFrames;
oiseau.gotoAndPlay(imageDeDepart);
// Afficher l'agneau
terrainCourse.addChild(oiseau);
// Numéroter l'oiseau en fonction du compteur de participant
// Créer un champ de texte
dossard = new TextField();
// Modifier le format de texte par défaut
dossard.defaultTextFormat = format;
// Positionner le champ de texte au centre du clip
dossard.x=oiseau.width/4-10;
dossard.y=-10;
// Numéroter l'agneau en fonction du compteur de participant
dossard.text =cptrParticipant ;
// Afficher le dossard sur l'agneau
oiseau.addChild(dossard);
//le cheval se deplace sur event.ENETR_FRAME
oiseau.addEventListener(Event.ENTER_FRAME,bouge);
//le cheval affiche son numerosur event.complete
oiseau.addEventListener(Event.COMPLETE,arrete);
// Passer à l'oseau suivant et au participant suivant
cptoiseau++;
cptrParticipant++;
//definir un gestionaire d'evenement
function bouge (e:Event):void {
var cible:MovieClip=e.currentTarget as MovieClip;
//la position du clip se deplace sur l'axe des x de vitesseAgneau a chaque fois
cible.x +=cible.vitesse;
if (cible.x>largeur) {
cible.dispatchEvent(new Event(Event.COMPLETE));
function arrete (e:Event) {
var cible:MovieClip=e.currentTarget as MovieClip;
trace("je suis sorti !!!");
for (var i:uint = 0; i < terrainCourse.numChildren; i++) {
// Récupérer le clip enregistré au niveau i, l'enregistrer dans tmp
var tmp:MovieClip = terrainCourse.getChildAt(i);
// Supprimer l'écouteur d'événement Event.ENTER_FRAME
tmp.removeEventListener(Event.ENTER_FRAME, seDeplace);
// Supprimer l'écouteur d'événement Event.COMPLETE
tmp.removeEventListener(Event.COMPLETE,sArrete);
// Placer le clip en bas à gauche et stopper l'animation
tmp.x = tmp.width +Math.random()*ecart ;
tmp.y = hauteur - tmp.height -Math.random()*ecart;
tmp.gotoAndStop(0);
// La cible est le premier élément qui a reçu l'événement Event.COMPLETE,
// Tous les clips étant stoppés et déplacés en bas à gauche, ils ne pourront plus émettre d'événement Event.COMPLETE
// Placer la cible au centre et jouer son animation
cible.x = largeur/2;
cible.y = hauteur/2;
cible.play();
// Afficher un message pour le gagnant
var gagnant:BulleClp = new BulleClp();
gagnant.labelOut.text = "J'ai gagné ! \nJ'ai gaaaaaa...\n .... gnéééé !! ";
gagnant.x = largeur/2;
gagnant.y = hauteur/2-10;
addChild(gagnant);
// Afficher un message pour le perdant
var perdant:BulleClp = new BulleClp();
perdant.labelOut.text = "Booouhouu ...\n... hou ...\n ... hooou !!!";
perdant.x = 3.5* ecart ;
perdant.y = hauteur - 3.5*ecart ;
addChild(perdant);
[Moved by moderator to more appropriate forum]
When the "race" is over do you reposition the actors? (horse & bird)
as far as I've seen you are just moving those but not repositioning when the race is over.
Sorry my french is bad so I couldn't really understand all your code comments
Similar Messages
-
pls help us.. just try to transfer a one movie on ipad2 ,sync it thru itunes and when i finished i cant open any more my games or all
applications,, standard apps is ok except to all games we purchase like smurf and hd race..screen flicker and crash and it wont continue ..pls help us
tnx in advanceTry downloading another app - any app - pick a free app and download it. See if that helps reset the iPad.
If that doesn't work, then reboot the iPad. Hold down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple logo appears - ignore the red slider - let go of the buttons. -
Differance between Oracle 9i RAC and 10g RAC
Hello,
I am almost new to RAC. I have worked on Oracle 9i RAC since longtime back. Now I am trying to find what is difference between Oracle 9i and 10g RAC structure ? Before it was CM and now it's clusterware. But what it makes different ? Any good explanation or web link.
thanks
~Keyur
nullThe main difference is 10g RAC is almost completely platform independent, and 9i RAC isn't.
This means it has changed tremendously.
As 9i is desupported I wouldn't spend any time in 9i RAC if you have yet to learn it.
Sybrand Bakker
Senior Oracle DBA -
Do we know of any problems with BODS and Oracle Real Application Clusters architecture? For example, a RAC TNS entry would specify one service name but multiple hosts for load balancing and failover. In BODS the connections are specified in many places (web console, datastores, job server). As far as I remember in some of those places we do have to enter the host name. Would this disqualify BODS from benefiting from RAC or would it (even worse) cause problems? Any official note by SAP on BODS and Oracle RAC?
Thanks.Hi Mahir,
As far as I know it's only the web console that requires the hostname, however I am using DS XI 3.1 and when selecting database type Oracle in the web console there is a checkbox for 'Oracle RAC'. If you check this box then you do not require to enter the hostname. -
How to stop and start RAC Database
Hi,
Can anybody tell me How to stop and start RAC Database.
Pls give me the exact procedure for OS - IBM Aix 5.3.
RajkumarBurleson,
It so appears, as from the numerous times you have been published incorrect, untested information, and non-working scripts, you are not an Oracle guru,
but only a self-proclaimed one.
It also appears nothing on your 'CV' can be easily verified.
You state you are an 'adjunct professor emeritus', however anyone who was kicked out after a few months can call himself a 'professor emeritus'.
Looking at the enormous amount insults and slander you have posted directed to me and others on this forum, showing a highly unprofessional attitude toward your peers,violating this forums rules of conduct, don't you think you deserved to be banned completely?
After all, you are always promoting your own publications here, which is also in violation of the rules for this forum.
What makes you think that "Sybrand" is a man's name? How many male Sybrand's do you know? I don't know any, not one.
That's your problem. I'm as much as male, as you are a fat, ugly, self-proclaimed Oracle-guru, which you are clearly not, you are only a fraud, and this glares from all of your publications.,
Sybrand Bakker
Senior Oracle DBA -
11gR2 Grid Infrastructure and 11gR2 RAC install as separate users (RH 5)
We are about to set up a few new RH 5 clusters and are trying to make a decision if we should install 11gR2 Grid Infrastructure and 11gR2 RAC as the same user (oracle) or as separate users (grid and oracle) as per Oracle documentation.
I would like to know what other people are doing and their experiences with this.
Here are some concerns that we have:
1) Does Oracle support has an 11gR2 cluster environment where grid infrastructure and oracle database are installed as separate users ? I have been to a few Oracle 11gR2 demos and they always have a simple install where everything is installed as a single user.
2) Potential permission issues that we might hit iif we use separate users, for example
- grid control agent - which user do we install it as and will it be able to access both grid and oracle files ?
- database listener will run as grid user. Is this going to cause any permission issues ?
Thanks in advance for your answersIt is all dependent on your business whether your business needs to separate between privileged user for storage administrator (ASM) or database level. It is recommended to have user separation but not mandatory.
see http://download.oracle.com/docs/cd/E11882_01/install.112/e17212/toc.htm for the details
permission issues might happen if the configuration is not correct. for example you might see ORA-12537 when configuring the system
Hope this helps -
Can we run 11g RAC and 12c RAC in the same server?
There is a requirement to run 11g RAC and 12C RAC in the same server for a year or so and then remove 11g RAC?
Current setup:
HP-unix 3 node RAC on 11g R2
4CPU
64 GB RAM
3 TB SAN storage
no ASM
Upgrade setup:
HP-unix 3 node RAC on 12C RAC
8CPU
128 GB RAM
6+ TB SAN storage
ASM
We are asked to use the same server and upgrade Hardware to install and run 12C RAC. What are the implications of running RAC in the same server/nodes?
Thank you for your time!Hi,
The following table shows you the compatibility between various versions:
Clusterware
ASM
DB
Certified
12.1
12.1
12.1
Y
12.1
12.1
11.2(a)
Y
12.1
12.1
11.1(a)
Y
12.1
12.1
10.2(a)
Y
11.2
11.2(b)
11.2
Y
11.2
11.2(b)
11.1
Y
11.2
11.2(b)
10.2
Y
11.1
11.1
11.1(c)
Y
11.1
11.1
10.2
Y
11.1
11.1
10.1
Y
11.1
10.2
11.1
Y
11.1
10.2
10.2
Y
11.1
10.2
10.1
Y
11.1
10.1(d)
11.1
Y
11.1
10.1(d)
10.2
Y
11.1
10.1
10.1
Y
10.2
10.2
10.2
Y
10.2
10.2
10.1
Y
10.2
10.1(d)
10.2
Y
10.2
10.1
10.1
Y
10.1
10.1
10.1
Y
(a) Pre-12.1 database instances require an ASM instance resident on the same node as the database instance. Pre-12.1 database instances cannot leverage the implicit HA of Flex ASM.
Oracle Clusterware (CRS/GI) - ASM - Database Version Compatibility (Doc ID 337737.1) -
I am unable to open some of apps, even one inbuilt app like camera, Example : regarding apps like Clash of clans and Bike race TFG.whenever I try to open these games, it start opening and in middle of opening , it sent me back to home page of my mobile.Please help what to do ? and with camera when open it it open a blank Black page, please help ?
You should really read the manual. Click Support at the top fo this page, then click Manuals.
You should be syncing to your computer regularly. Your game data is backed up when you sync.
First try a restart. This eraes nothing.
If that does not solve, then try a reset. This erases nothing.
If this fails then try a restore -
Hi,
I have two different databases running on 8.1.5.0 and 8.1.7.4 and the size of databases are 110GB and 130GB.
Now we want to upgrade this database into 10.2.0.2 and implement RAC.
Could any one suggest the best way/document to upgrade database into 10g.
Existing Platform is Sun Solaris 5.8(32 bits)
New Platform is AIX 5.2(64 bits).
ThanksSince the database is being migrated from Solaris to AIX, you cannot physically copy the database to the new server. You can choose to use Oracle's export and import utilities. This depends on much downtime you can afford. You can also create a new database on the AIX server and use CTAS (create table as select) to bring over your tables. This requires some additional post-migration work on your part to re-create the indexes, constraints, default values, etc. Export/import will do most of this for you.
If you have the option to upgrade to Oracle 10gR2, another possibility is to upgrade your database on the Solaris server and use transportable tablespaces to create a new 10g database on the AIX server. Transportable tablespaces in 10gR2 allow you to migrate across operating systems. Be sure to review Oracle's certification matrix to ensure that you are installing Oracle database software on a certified platform. -
Can Oracle 11g RAC and 10g RAC co-exists on same host
Can somebody tell me if it is possible to have Oracle 11g and 10g RAC installed and configured on same host.
Thanks,
-Zubairuser10948684 wrote:
Can somebody tell me if it is possible to have Oracle 11g and 10g RAC installed and configured on same host.
Thanks,
-ZubairYou have to use 11G Clusterware , if you want to use 11g Database and you can use 10g Database as well.
(You can not use 10g Clusterware and 11g Clusterware on the same host...)
But you can use 10g Database and 11g Database on the same host, But you have to use 11G Clusterware. -
I am unable to open some of apps, even one inbuilt app like camera, Example : regarding apps like Clash of clans and Bike race TFG.whenever I try to open these games, it start opening and in middle of opening , it sent me back to home page of my mobile. Please help what to do ?and with camera it open a blank black page ...... Please help ?
AmishCake has given you the correct steps for this issue. What is probably happening is you have too many apps running in the background or the ones that you have open are conflicting in some way with the one you are trying to use, so closing everything out and a good reboot should resolve it.
Also, make sure your device is updated and all the apps are updated. Sometimes when the app is updated and the iOS is not, can cause behaviour like this.
If it continues, back up your device and restore it.
http://support.apple.com/kb/ht1414 -
I downloaded the audiobooks of, the horse and his boy, and, the silver chair but both are incomplete. I can't delete directly from my iPad. Any ideas?
Audiobooks are not currently part of the content that can be re-downloaded. You should sync your audiobooks to other devices via iTunes on your computer. If your audiobook didn't download correctly or has other problems, select the content which is causing a problem and use the 'Report a problem' button in Your Purchase History using your computer.
-
Cloudd and bird processes hogging the processor?
I have a fresh installation of Yosemite on a mid-2010 MBP. I'm seeing two processes, "cloudd" and "bird," consistently running the proc at about %60 and %40 consistently, along with the expected heat, fan and battery consumption. My first thought was that this was tied to iCloud Drive indexing, but we're deep into hour three at this point, which seems little excessive to index less than .5G in data.
Anyone else seeing this?Hi folks,
Here's how I solved the iCloud CPU hogging issue.
Like most I quickly found that the bird and cloudd processes lookup
1. Unplugged from network/internet.
2. Killed both cloudd and bird, (you can do this via command line by using TOP to find the process id {PID} and then KILL -9 {PID} or the Activity Monitor and force quit)
3. Undo any setting that forces your disk to securely delete file or securely empty trash. In my case I had this on by default and had recently trashed files from the iCloud folder. I'm not sure if this was the root cause but it's something I did in the process of eliminating anything that could have restrictions on the iCloud files and folders.
4. Empty the trash. Make sure that non of the iCloud files were open or locked by other application/network/etc.
5. Restarted iCloud service. Thanks to Sorki, ran "brctl log --wait --shorten"
6. Wait for all files to sync. Gotta be patient. If it's the first time you put large files or large quantity of files, you gotta give it time to sync.
7. Been running fine for days.
I have 3 computers that are all tied to iCloud. All are now working great. Only my iMac 2010 had the slowdown. Judging by the fact that only one had the issue I knew that it must be a local settings issue, a large file, or some sort of file system restriction.
Hope this helps. -
Running 9i RAC and 10g RAC on the same physical cluster
We are planning to run 9i RAC ( with OCFS2 ) and 10g RAC ( ASM ) on the same cluster with 4-Nodes.
I will really appreciate if any of the forum members can share the information and experiences if the have done such implementation. We are currently running six 9i R2 clusters and are in the process of migrating them. The current need is to make the 9i and 10g cluster co-exist up to a certain point.
Thank You,
MadhuYes this is possible.. you may want to check out some papers relating to this on OTN and on the RAC SIG website at www.oracleracsig.org.
-
Accessing and Managing RAC 10g database with 9i OEM
can i Access and Manage RAC 10g database with 9i OEM? If yes How?
9i EM can 'see' a 10g database and perform some basic functions (rsp. all what is known to 9i). But it cannot manage any 10g functionality , because it doesn't know it. So such a constellation doesn't make really sense. On the other hand 10g EM can manage 8i,9i and 10g databases.
Werner
Maybe you are looking for
-
Can anyone help me fix an XML Parsing Error?
Hi I have been working with a form in a PDF and suddenly it won't let me open it. The following error pops up: "Xml parsing error: not well-formed (invalid token) (error code 4), line 71537, column 695 of file" and I haven't been able to come up with
-
How to define a persistant queue in glassfish v2.x
Hi Everyone, I just wanted to ask how to define a persistent queue in glassfish v2.x. Basically I want that, if there are un-consumed messages in the queue and the goes goes down, the messages will still be there once the queue comes up. I haven't se
-
What are the security implications of having JAVA running on my Mac Book Pro?
What are the security implications of having JAVA running on my Mac Book Pro?
-
Server 2008 Policy, hide Security Tab from Non-Administrators
Hello, I got asked to use the policy to hide the Security tab on folder for non-administrator, administrators need to see it to adjust folder auditing. Checking Server 2008 R2, GPO, User Configurations, Policies, Administrative Template, Windows Comp
-
My Adobe Acrobat X (CS6) suddenly stopped working!
My Adobe Acrobat X (CS6) suddenly stopped working, I can't open or edit documents. I am on Windows 8.1, this just started happening yesterday. I have re-installed it to repair any possible problems, I am a registered user. Please help me!! Can't sub