Wednesday 24 November 2010

Coding Drag and drop puzzle

The development work that I have covered during the lesson:
During this lesson I started and finished coding my drag and drop puzzle into my front end. To do this I had to open a pre-coded document, i then had to edit the design of the puzzle so that it would relate to my topic and that i could have my own images in the front end. To do this I had to delete the images that were previously stored in the flash project, i then had to replace the image with my own image. Before I did this I had to import a picture that i wanted to use in my puzzle into Photoshop, i did this so that i could then separate the image into 4 separate sections, i then had to save each of these images as a separate file. I then had to open up the flash project again and then import the indivudal files into the flash libary, i then dragged the images into a section the same size as the images, however i had to jumble the order of the images so that the user could then arrange them in the right order to complete the puzzle.I then tested the puzzle to see if it worked correctly, I then had to save this document in the same folder as the rest of my flash work. I then had to go into my front end document and then insert a declaration that was coded in the pre-coded document. I had to modify the declaration so that I when i clicked on the 'Puzzle' button on the extras section the 'drag and drop puzzle' would then load. I then had to enter a declaration and a subroutine piece of code, this is where I entered the SWF. name of the quiz into the speech marks of the code. I then tested to see if the puzzle loaded properly and everything worked fine which it did.
The small piece of code below is the declaration piece of code. This piece of code is telling the program that from screen3, when the puzzle button ( or btnpuzzle) is clicked, the program should load the Drag and drop puzzle.
frmScreen3.btnpuzzle.addEventListener(MouseEvent.CLICK, opendd);
The second piece of code shown below is the subroutine that i entered into my flash project. This piece of code is asking the program to run an event, the event it is asking it to run is to open the drag and drop file 'opendd(evt:Event). The next line of code is then asking the program to locate the file that is trying to be opened, in this case this is the ("dd.swf"); the swf that the file is trying to open is the puzzle that i have created in a separate flash project and is trying to link the two projects together so that when thePuzzle button is pressed the Puzzle is then loaded on the front end flash project. )

function opendd(evt:Event)
{
//channel.stop();

var urlReq:URLRequest = new URLRequest("dd.swf");
var myLoader:Loader = new Loader();

myLoader.x = 120 ; myLoader.y= 60 ;
myLoader.load(urlReq); // passed to the ldr
try { removeChildAt(4); }
}
How this met the client brief:
This met the client brief as the client brief states that I must have interactive features in my front end such as a quiz. By adding the quiz to my front end I have met some of the client brief. requirements as i have added an interactive feature being the quiz.

Skill Number: 19

Tuesday 23 November 2010

Coding Web links

The development work that i have covered during the lesson:
During this lesson i have coded all of my web links into my front end. To do this i had to create two buttons for each individual web link. I then had to open up my code layer on my front end and then enter the declaration piece of code. I then had to insert the subroutine for each weblink and had to make sure that all of the instance names where entered correctly.
How this met the client brief:
This met the client brief in many ways. Firstly, the client brief states that the front end must have interactive features such as weblinks. By adding weblinks to my front end i have met this requirement.
Skill Number:
20