Archive for the ‘Uncategorized’ Category

Flash things I learnt tonight

Wednesday, May 6th, 2009

Here are a few things I learnt this evening – I should have remembered them as I’ve done them all before… but over time you forget things! If only I’d been blogging back then!

 1. How to load a movie clip or graphic from the library

To do this, you first must right click the object in the library and choose Linkage.
Then check the export for actionscript box
Give the object a name (best if it doesn’t have spaces)
Then to load the object in ActionScript, use the attachMovie command.

Example:

attachMovie(”headMovie”, “avatar”, this.getNextHighestDepth(), {_x:10, _y:5, _xscale:40, _yscale:40});

2. how to mirror something in actionscript

For my movie, I wanted to create a mirror image of the eyes. To do this, set the _xscale to an appropriate negative value.

3. how to append a variable name to the end of a string so that it can be used to indicate a specific variable

Use the eval command.

Example:

eval(”_root.item” + counter)

4. how to do multiple things on the one object

Use the with command.

I actually used this in conjunction with number 3 and the reason I did it is I didn’t know how to tell my actionscript to tell _root.item1, then _root.item2, then _root.item3 to go and stop and different playheads… especially when I wanted the end of the variable name to come from a variable called counter.

Example:

   with (eval(”_root.item” + counter)) {
      _visible=true;
        attachMovie(”headMovie”, “avatar”, this.getNextHighestDepth(), {_x:10, _y:5, _xscale:40, _yscale:40});
        attachMovie(”hairMovie”, “hair”, this.getNextHighestDepth()+1, {_x:10, _y:5, _xscale:40, _yscale:40});
        attachMovie(”eyesMovie”, “eye1″, this.getNextHighestDepth()+2, {_x:35, _y:25, _xscale:40, _yscale:40});
        attachMovie(”eyesMovie”, “eye2″, this.getNextHighestDepth()+3, {_x:30, _y:25, _xscale:-40, _yscale:40});
        attachMovie(”nose”, “nose”, this.getNextHighestDepth()+4, {_x:30, _y:35, _xscale:40, _yscale:40});
        attachMovie(”mouth”, “mouth”, this.getNextHighestDepth()+5, {_x:27, _y:50, _xscale:40, _yscale:40});
       
       
   }

alternate reality games & jane mcgonigal

Wednesday, April 29th, 2009

I have to publish this blog entry before I lose this URL again. I have spent countless minutes trying to find this link to Jane McGonigal’s interview about Alternative Reality Games on IT Conversations. Before I do that again… here is the link:

http://itc.conversationsnetwork.org/shows/detail3498.html

Jane has been involved in such initiatives as World without Oil and The Lost Ring.

Whilst this is strictly not about mobile technologies, mobile technologies can definitely have a place within ARGs.

New Discoveries about Flash Lite

Friday, April 24th, 2009

I’ve been having some problems getting the sound to play properly on a Nokia 6300 phone whereas it’s been playing fine on Windows Mobile. I’ve found out that the Nokia 6300 is a Series 40 Nokia phone and it has Flash Lite 2.0 installed on it instead of Flash Lite 2.1. What I’ve read indicates that it should still work though – and it’s not… so I’m going to dowm more investigating.

I currently have a post on the Adobe forum about it.

I just found out about a beta Flash Packager for Nokia phones. I’ve just uploaded my application to it and will see if it works soon! So exciting!

ok – just discovered that the Flash Packager won’t work on my Nokia 600. It only works on Series 40 Nokia’s that are Fifth edition with feature pack 1 or newer. The phone I’m working with is 3rd edition with feature pack 2. I think I’m just going to have to get another Nokia phone!

Researching the Sims

Saturday, April 18th, 2009

I am researching information about the Sims as I’m having some trouble working out the scoring system for my Gotchi-Sim game.

This website has been helpful:

The Sims 2 / Needs

navigating the conversation tree

Friday, April 17th, 2009

I’ve got the XML data loading in my Flash movie now and the first items pop up in the conversation box. The two sites that I posted in my previous blog entry were extremely helpful!

Now I have to get the game to respond correctly to user input from a mobile phone. Whilst I have done this in Flash Lite before, it’s been a while… and I’ve never done it with Flash Lite 2.1 – only Flash Lite 1.0.

This web page has some great video tutorials that are really helping me. I’m hoping I’ll be able to get the key presses working basically before I go to sleep tonight. The guy speaking in the tutorials has an Aussie accent which is kinda cool. It’s nice to hear a familiar accent when you’re watching videos on the web – doesn’t happen that often. I did notice that he says the word “gonna” an awful lot! lol

Two helpful resources on Flash, objects & arrays

Saturday, April 11th, 2009

For the Gotchi-Sim project, I am planning to store data from an XML file into an array of objects.

I think these two sites will be helpful to me when trying to program that:

Complex data types: Arrays and Objects
http://flash-creations.com/notes/actionscript_complexdata.php

briening.com: Flash Data Structures: Array vs Object
http://briening.com/flash/flash-array-vs-object

a break through with using XML in flash!

Saturday, April 11th, 2009

I’ve been struggling with XML in Flash for days… I found two pieces of information that really helped me a lot… so I thought I’d share them here.

1. The difference between an element node and a text node!

I found out today that some nodes were classed as element nodes and some are classed as text nodes. What I didn’t know was that the text is a node.

For example in this small XML document:

<conversation>
<INTERACTION>
<NPC_says>
What would you like to order?
</NPC_says>
<player_says>
I would like pizza.
</player_says>
</INTERACTION>
</conversation>

The node conversation, interaction, NPC_says and player_says are all element nodes.

I had thought that NPC_says & player_says would be text nodes… but that is not correct, they are both element nodes. The text inside these tags are text nodes. That is, What would you like to order? is a text node as is I would like pizza.

To reference the text what would you like to order? text, you would reference it as follows:

myXML.firstChild.firstChild.firstChild.firstChild

Previously, I thought it would be referenced by:

myXML.firstChild.firstChild.firstChild.nodeValue

Check out this site for more info: XML basics at www.kirupa.com
http://www.kirupa.com/web/xml/XMLbasics4.htm

2. There is an ignoreWhite property

If you don’t tell your xml documen to ignore white space it can pick up blank spaces and think they are nodes in the XML document.

ignoreWhite property
http://www.actionscript.org/resources/articles/9/1/XML-101/Page1.html

I now think I’m ready to take on the XML scripting of the Gotchi-Sim project for real! Yay!

nokia shoe technology

Wednesday, April 8th, 2009

http://www.innoeurope.eu/index.php?lang=eng&main_id=16&id=135

using xml with flash

Sunday, April 5th, 2009

I am currently working through the best way to use XML with Flash. My previous experience has been in using text files with Flash – not XML files…. so I’m trying to find information about best practice before I dive in… I’m also trying to decide on the best structure for the conversation interchanges too – but that’s another story!

Here are some links that I’ve found helpful so far:

Peach pit guides (links to a series of articles on XML are near the bottom of the page)
Recursive functions & XML in Flash

more to come…

Peach pit recommends the XML fox editor.

screen readers & devices

Saturday, April 4th, 2009

Last year some time I listened to a podcast interview with Susan Gerhart. Susan has recently experienced macular degeneration and is using technology to help her maintain her quality of life.

To listen to the podcast, go to http://itc.conversationsnetwork.org/shows/detail3715.html

Some points that I remember are:

  • How useful the Kindle (generation 1) has been for her. Later versions of Kindle had not been released yet at the time of this interview.
  • How useful screenreaders are and that she prefers to use computer-generated voices as you can speed them up and still understand them quite easily.
  • Some newspapers provide a specialised device that will read the newspaper contents to you daily.
  • She uses multiple mobile devices. Her PDA is extremely important to her.