LONG SERIES OF HTML5 GAMES: chapter1 part4

Qaybta Xirfada Sayniska iyo iwm

Moderators: Moderators, Junior Moderators

User avatar
afisoone
SomaliNet Super
SomaliNet Super
Posts: 5509
Joined: Wed Jul 22, 2009 9:46 pm
Location: We all want to become president even though Amisom controls Mogadishu

LONG SERIES OF HTML5 GAMES: chapter1 part4

Post by afisoone »

So far we have created couple things:

1. created sawirObject //which will hold all the image templates.
2. created our image arrow //which we defined arrow x y
3. we store it those information into xafidSawir array....// Remember we said xafidSawir.push(arrow);
4. We called our canvas...
---------------------------------------------------------------------------------------------------------------------------------
Now we are going to load the image arrow.png.

ok let's do it..
var image= new Image();
image.addEventListener("load", keenStageka, false);
image.src="arrow.png";

function keenStageka()
{

}
Beautiful: Hada waxaan u wacnay imagekii arrow.png. You can use it another image but all the files and images must be in Chapter1 folder. Ok.
Now we learned how to load the image...

As you can see imagekeena waxaan u yeelnay addEventListener and waxaan ku dhahay soo load karee. Adigoo isticmaalayaa function
keenStageka();

Now functionka keenStageka toloow maxaa ku dhihi doonaa?
Taasi casharka soo socodo ayaan ugu jawaabi doonaaa...

<<<Previous Lesson
  • Similar Topics
    Replies
    Views
    Last post

Return to “Careers - Engineering, Science & Computers”