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

Tuesday 12 October 2010

Coding my quiz into Flash

The development work that I have covered during the lesson:
During this lesson I started and finished coding my quiz in flash. To do this I had to open a pre-coded document, i then had to edit the code so that the quiz would display my questions and my answers. To do this I had to delete the text that was stored in the speech marks, i then had to replace this text with my questions and answers. I then tested the quiz 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 'Quiz' button on the extras section the quiz would then load. I then had to enter a function and event 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 quiz 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 quiz button ( or btnquiz) is clicked, the program should load the Quiz..
frmScreen3.btnquiz.addEventListener(MouseEvent.CLICK,openQuiz);
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 quiz file 'openQuiz(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 ("Quiz.swf"); the swf that the file is trying to open is the quiz that i have created in a separate flash project and is trying to link he two projects together so that when the Quiz button is pressed the Quiz is then loaded on the front end flash project.
function openQuiz(evt:Event)
{
var urlReq:URLRequest=newURLRequest("Quiz.swf");
var myLoader:Loader = newLoader ();
myLoader.x=120; myLoader.y=60;
try{ removeChildAt(4);}
catch(e:Error){}
addChild(myLoader);
}

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

Friday 8 October 2010

Coding Films into Flash

The development work I have covered during lesson:
During this lesson I coded my films into flash. To do this I opened a pre-coded document that had the majority of the code that i needed to make my films load in my front end. I opened the pre-coded document and I then copied sections of the code into my front end. The sections that I copied were the declaration and the function and event code. After I copied the code into my front end I had to check the names of my SWF film files, I then copied the name of the files into the brackets in the code and changed some areas of the declaration so that it would work with my buttons and forms. I then tested my front end to see if the videos loaded when each individual button was clicked.
This is the code that i had to enter into my Flash porject so that when the button was clicked the file files would load. The code below is asking the program to run a process, when btnscene1 is clicked on Screen2, it is asking the program to open the scene 1 swf file. The next piece of code is asking the program to locate and open the video file what is wanting to be loaded, this is displayed in the brackets and speech marks, the file itself has to be located in the same place as where the flash project is saved.
frmScreen2.btnscene1.addEventListener(MouseEvent.CLICK, openscene1);
function openscene1(evt:Event)
{ //channel.stop();
var urlReq:URLRequest = new URLRequest("scene1.swf");
var myLoader:Loader = new Loader();
myLoader.x = 120 ; myLoader.y= 60 ; myLoader.load(urlReq);
// passed to the ldr
try { removeChildAt(4); } //One bigger than the number of forms, starts from 0 catch (e:Error) { }
addChild(myLoader); // display object container}
How this fitted in with the client brief:
This fitted in with the client brief because the client breif stated that my front end must have at least 4 scenes included. By importing the idividual files into the Flash project i was able to meet this requirement.
Skill Number:
18

Tuesday 5 October 2010

Building my front end

The development work that I have covered during lesson:
This lesson I had to start building my actual front end. To do this, I had to open a blank document in Flash, I then had to create 4 layers, each layer designed for a different screen, IE scene selection or extras. I then had to create 4 basic square shapes each on the separate layers, this is because if I didn't create the shapes on separate layers if i try to move a shape it will move every shape on the screen. I then had to change the instance names of the forms so that i could then code these forms. Once I had made these shapes, I then had to import any images that I wanted to use in the front end in into the library, i then dragged each of the images that i wanted to use onto the correct layer. I then had to insert the buttons that I wanted to use on the screens, to do this I had to click on the window tool at the top of the page, and then scroll down to the common library section, I then clicked on 'buttons' this brought up several categories of buttons that were available for me to use. Once I had inserted the buttons onto the correct forms i then had to code these buttons, I did this so that I could then start to link up the buttons on each form so that I could load each form from another form such as 'scene selection' to 'options'. I then had to change the instance names of my buttons, this is because to start coding the buttons each button must have its own instance name, for example btnToScreen2.
The code shown below is the code that i had to enter into my code layer so that i could start to link buttons and screens together. Firstly, i had to make sure that all of the instance names of the buttons on screen 1 was correct, for example btnToScreen3 (screen3 is the 'Extras' screen). This line of code that is displayed below is the declaration. The line of code itself is telling the program that from screen 1, when the button is clicked, it will take the user to either screen 2,3 or 4.
frmScreen1.btnToScreen2.addEventListener(MouseEvent.CLICK, openScreen2From1);
funcion openScreen2from1(evt:Event)
{
if (frmScreen1.visible==true)
{
frmScreen1.visible = false;frmScreen2.visible=true
frmScreen2.x=1
frmScreen2.y=1
}
}
The piece of code above is the subroutine piece of code. This piece of code is asking the program to perform an action, the code is asking the program to load Screen 2 from Screen 1 when the button is pressed. The piece of code also tells the program what dimensions to load the screen at when the screen is loaded.
How this met the client brief:
This met the client brief because the client brief states that my front end must be interactive, by adding buttons to my screens the user can switch between the screens making the front end more interactive.
Skill Number:
14, 15, 16 and 17

Saturday 2 October 2010

Converting FLV’s to SWF’s

The Development work that I have covered during lesson:
This lesson I converted my FLV's to SWF files, I found this to be a very easy process. To do this I had to reopen the files that I created in Windows Movie Maker. I then had to click file, then publish, this then saved a the file as a separate file that was formatted as a SWF. I converted my films to SWF format because when I am ready to link my buttons to the videos that I want the buttons to load I will already have the files ready to use.
How this met the client brief:
This met the client brief because it states that my front end must have buttons linked to videos on it. By adding buttons that load the films on separate screens makes the front end look much more professional and makes the navigation of the front end much simpler.
Skill Number:
13

Friday 1 October 2010

Importing FLV's to Flash

The Development work I have covered during the lesson:
This lesson I imported my FLV. files into Adobe Flash. To do this I had to open up Adobe Flash, I then had to select 'Create New' and then select 'Flash File (ActionScript 3.0). This then brought up a new empty file. i then clicked on file, then import, then import to library. This then brought up an option asking me to select a file that I wanted to import into Flash, I then opened up the folder that i had stored all of my film files in and then selected them one by one. This then brought each of the film files up in the library.
How this met the Client Brief:
This met the client brief because the brief states that I must build a front end for my film that includes scenes, outtakes and subtitles. by uploading these files i have met the client brief as i have film files that are the scenes, outtakes and subtitles of the film.
Skill Number:
12