Actionscript

From the Lessons we have had on actionscript we had a opportunity to create whatever we liked on flash using the actionscript. One of the lessons we made a form and I liked the interaction you got to have using this form.

Scripting

var usernames:Array = [“lucy”, “toria”, “alex”];
trace(usernames);

mySubmitButton.addEventListener(MouseEvent.CLICK, clickHandler);

function clickHandler(e:MouseEvent):void
{
var found:Boolean = false;

var username:String = myText.text;
username = username.toLowerCase();
for(var i:int = 0; i < usernames.length; i++)
{
if(usernames[i] == username)
{
found = true;
trace(” Hello ” + usernames[i] );
break;
}
}

if(found == false)
{
trace(“Access Denied”);
}

}

I had a few ideas of making a slide show screen saver but I wanted to challenge myself as I was struggling to get to grips with actionscript but heart was into making the quiz. I came up with the Pixar idea after I watched the short Pixar movies that have been made with the ‘BIG’ Pixar films.

I started to write every question down I wanted to use, I was thinking of using multiple choice but then I would like a difficulty level to this quiz as the questions are easy anyway. When I drew the designs to the quiz I first drew a plain and simple design using the Pixar logo and the colours with a question box which would be a label in Flash, answer box which would be a text box and a submission button. If you got the answer correct of wrong I was hoping to create a movie to pop up  like a tick looking like its being drawn to say well done and a cross in the same style to mean incorrect.

From this design I realised is it wasn’t child friendly, my orignal design was simple and minimalistic so I thought I’ll add this pictures of the films I was asking questions about. This has made it pleasing to the eye and friendly for adults and children. I created the background in Photoshop then imported it into flash. I kindly got given O’Rileys actionscript 3.0 to help me along.

I really struggled to with the coding and I first didn’t know where to start so I used bits of code from past lessons to help. I was using parts of this and that and it was not working together and I was not confident enough to look through it and say this was wrong and there was so many things I was missing to the scripting to show on the quiz.

I got loads of help for my teacher and we was communicating through email as it was Christmas Holiday but we got there and I worked through the code and added more questions and answers. Also we used Add child for when your answer is correct or wrong for the little movie I wanted to add. I changed the idea of have a tick to a smiley face or angry. I had to play around with numbers of where the image would be on the page. It was a trail and error 10 minutes.

I added two Labels (question and well done), button (submit answer), Text box (answer). I felt my time with this project run out but that is my fault for bad time management and planning. I am happy with the final outcome and all works really well. One thing I would like to change is the amount of questions to a lot more and for the questions to get hard further along the quiz. I am not planning to use actionscript in my future but is always a very good skill to have and I may need to create websites using actionscript. So I am planning to improve and progress on my knowledge and skill of actionscript so I can be more confident and do not have to turn to the book or internet incase its a very complicated scripting.

Advertisements

~ by tltrinity on January 31, 2011.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: