PHILWEBSUPPORT.COM

Wednesday, December 19, 2007

Roll the Dice Game

In this Flash tutorial I will show you how to make a simple but yet smart dice roll game. This tutorial will cover a lot of simple programming issues, the use of buttons, make your own functions, make use of movie clip properties through actionscript, using simple math and random function an much more. I hope you enjoy it.

Download the Game flash project file here.


First of we set up the scene, What you will need is a button, I just made a simple graphic with a gradient, then convert it to a button symbol by right clicking and choose convert to symbol. Give the button an instance name, we will need it when we have to do some action scripting. I called mine "roll".

dice roll game flash tutorial

Then we need a simple text box, place it center on the stage, and change its property to dynamic textbox, so its able to receive information through actionscripting.

dice roll flash game tutorial

Basically this is what we need to make things work, but to make the game a bit more interesting we also need some graphic for visual appeal. I just made 6 different view of a dice, I made it in Photoshop, (I could have done it in any graphic related environment.

Import your images to the stage, File -> Import -> Import to stage and locate your dice image files.

dice rolldice roll

Now separately convert all images to movie clips and give them instance names like this dice_1, dice_2, dice_3, dice_4, dice_5 and dice_6.

I very important thing now is to place all dice movie clips exactly on top of each other, an easy way to do this is to type in the x and y coordinates for all movie clips.

Now to the fun part, the action scripting.

roll.onPress = function () {

_root.result.text = 1 + Math.floor(Math.random()*6); /*numbers between 1 and 6 */

}

This function tells flash that when someone clicks on the button the textbox will show a random number between 1 and 6 using the Math function in flash, a very useful tool.

The next thing is to make a simple function that makes all our dice movie clips invisible, we will do this every time we need a new shuffle, then only show the dice with the same number of eyes as shown in the textbox (eg. random number 1 then dice_1._visible = true).

function invisible () {


_root.dice_1._visible = false
_root.dice_2._visible = false
_root.dice_3._visible = false
_root.dice_4._visible = false
_root.dice_5._visible = false
_root.dice_6._visible = false


}

Now we will need to call this function every time the button is pressed so we have to add to the onpress part of our code.

roll.onPress = function () {

_root.result.text = 1 + Math.floor(Math.random()*6); /*numbers between 1 and 6 */

invisible();

}

We are almost done, this next part is the most annoying part to type, its not that complicated its an if condition with 5 else if's, this will control that if the number 1 comes up, then we will show dice movie clip one, if number 2 comes up, then we will show dice movie clip two and so on. This code also has to be added in the buttons onpress code so the final onpress code will look like this.

roll.onPress = function () {

_root.result.text = 1 + Math.floor(Math.random()*6); /*numbers between 1 and 6 */

invisible();

if (_root.result.text == 1) {
_root.dice_1._visible = true
} else if (_root.result.text == 2) {
_root.dice_2._visible = true
} else if (_root.result.text == 3) {
_root.dice_3._visible = true
} else if (_root.result.text == 4) {
_root.dice_4._visible = true
} else if (_root.result.text == 5) {
_root.dice_5._visible = true
} else if (_root.result.text == 6) {
_root.dice_6._visible = true
}

}

Just to clarify I will try to explain how this if and else if part works.

if number 1 comes up then show dice 1

else if number 2 comes up then show dice 2

else if number 3 comes up then show dice 3

And so on.

Here is the final code.


roll.onPress = function () {

_root.result.text = 1 + Math.floor(Math.random()*6); /*numbers between 1 and 6 */

invisible();

if (_root.result.text == 1) {
_root.dice_1._visible = true
} else if (_root.result.text == 2) {
_root.dice_2._visible = true
} else if (_root.result.text == 3) {
_root.dice_3._visible = true
} else if (_root.result.text == 4) {
_root.dice_4._visible = true
} else if (_root.result.text == 5) {
_root.dice_5._visible = true
} else if (_root.result.text == 6) {
_root.dice_6._visible = true
}

}

function invisible () {
_root.dice_1._visible = false
_root.dice_2._visible = false
_root.dice_3._visible = false
_root.dice_4._visible = false
_root.dice_5._visible = false
_root.dice_6._visible = false
}

Labels: , , , , ,

Wednesday, December 12, 2007

How Anonymizers Work

How Anonymizers Work

Anonymizer sites access the Internet on your behalf, protecting your personal information from disclosure. An anonymizer protects all of your computer's identifying information while it surfs for you, enabling you to remain at least one step removed from the sites you visit.

You can see some of the wide range of data that web sites can read from your browser, including your IP address and other identifying information, at the following sites:

* IP Info
* Network-Tools.com
* 404 Research Lab Supersleuth

The following sections describe the two basic types of Internet anonymizers, networked design and single-point design, and their common common features.

Networked anonymizers. As their name suggests, this type of anonymizer transfers your communications through a network of Internet computers between you and the destination. For example, a request to visit a web page might first go through computers A, B, and C before going to the web site, with the resulting page transferred back though C, B, and A then to you.

The main advantage of the networked anonymizer design is that it makes traffic analysis -- a vulnerability of single-point anonymizers -- much more difficult. For example, analysis of the incoming and outgoing traffic of a single-point anonymizer could note that communications with your machine, even though the contents are encrypted, are closely synchronized in time with the anonymizer site's unencrypted communications with some particular web site. If ten times in a row your communication with the anonymizer is followed milliseconds later by a request from the anonymizer to a particular site, and that site's response to the anonymizer is followed milliseconds later by an encrypted communication to you, then it is a good bet you made a visit that site. More sophisticated anonymizer traffic analysis could also perform matching on communication sizing -- matching incoming unencrypted traffic to outgoing encrypted traffic based on size of the communications.

Protections that Internet anonymizers can use to mitigate the risk of traffic analysis include: (a) add small but random delays to the passage of responses back to the user to make time matching more difficult; (b) make random requests to random pages across the web to pollute the pool; (c) have a large number of simultaneous users to make analysis more difficult; and (c) have a large cache of web pages so not all incoming requests have outgoing requests. It is not known if any anonymizer uses techniques to protect against communications sizing traffic analysis, such as sending continuous streams of noise traffic to connected users to disguise the real responses.

In practice, only large organizations are usually capable of the Internet network traffic interception and analysis required for this sort of eavesdropping, and they may not be interested in you, so this risk may not be of concern for those doing everyday surfing. Nevertheless, many security experts are uncomfortable with the unknown extent of the traffic analysis vulnerability -- who knows if an anonymizer site is being tapped or not, by whom, and what is being done with the records? The networked anonymizer design meets this threat by passing your communications through a preferably random path of other computers. This design has advantages, but also disadvantages, summarized below:

* Advantage. Complication of the communications makes traffic analysis likely prohibitively complex. An eavesdropper would have to put in place the equipment and programs to watch all of the computers in the anonymizer's Internet network, likely a fluid group distributed around the world, and then solve a much more complex analysis.

* Disadvantage. Any multi-node network communications has some degree of risk at each node for compromise of confidentiality, with the risk linearly related to the number of nodes. Networked anonymizers have the same problem -- at each computer in the anonymizer chain there is a risk that it has already been compromised by the owner or an intruder and the communications can be tapped.

The first networked anonymizer system was Zero Knowledge Systems, which provided a multi-server network design and provided a range of confidentiality features. Although the company closed in the fall of 2001 due to lack of financing, it was influential as an example of the concept's feasibility, and led to the establishment of EFF's Tor a few years later, the only currently known networked anonymizer.

Single-point anonymizers. This type of anonymizer passes your surfing through a single web site to protect your identify, and often offers an encrypted communications channel for passage of results back to the user. Single-point anonymizers offer less resistance to sophisticated traffic analysis described above than do networked designs, but they also provide a compensating simplicity, organizational familiarity, and apparent trustworthiness. You can access your favorite anonymizer web site, type in your destination, and the anonymizer does your surfing for you and passes the results back to your browser. Many single-point anonymizers create an anonymized URL by appending the name of the site you wish to access to their URL, something like the following:

http://anonymouse.org/cgi-bin/anon-www.cgi/http://www.yahoo.com/

With single-point anonymizers, your IP address and related identifying information are protected by the arms-length communications and not transferred to the sites you visit. If you are using a secure channel to the anonymizer, as most services offer, then your communications to the anonymizer site are also confidential to any local eavesdroppers tapping your Internet line connection or service provider -- essential if you have reason to suspect a local tap.

Common features. Both networked and single-point anonymizers share a range of design features. Most importantly, once you access a web page through an anonymizer, the page is filtered so that all of its links are also anonymized. Therefore, you can just continue to click on links and stay in the anonymizer mode. Most anonymizers can anonymize at least the web (http:), file transfer protocol (ftp:), and gopher (gopher:) Internet services.

There is an overhead with use of anonymizers, and they can add a second or more of delay depending on how busy they are. Some anonymizers keep a local cache of several hundred megabytes of commonly accessed sites to address this problem, and so occasionally you can actually get faster access to a site through the anonymizer. Chaining of anonymizer services is not recommended, since it simply multiplies your risk to confidentiality by the number of services and computers in the chain.

Note that unless you use an encrypted mode to the anonymizer, all your communications are in the clear and can be intercepted anywhere on the way from your computer to the anonymizer. Most anonymizers now offer encrypted communications to solve this problem.

Labels: , , ,

Wednesday, December 5, 2007

Facebook: More Popular Than Porn

Facebook
Facebook

When I wrote last week's column comparing the social-networking sites MySpace and Facebook, I included a line after my signature stating that I had only 124 friends on Facebook, and urged readers to add me as their friends. As of today I have 261 new Facebook friends, the majority of which are Generation Y college students.

Related Articles

Why Facebook Is the Future.

A network for teens could teach the Net to grow up

MySpace v. Facebook: Competing Addictions

MySpace v. Facebook: Competing Addictions Wednesday, Oct. 24, 2007 By BILL TANCER .

I turned to Hitwise data to find out more about them. By examining which websites social-network users visit after logging into their profiles, we can gain a bit of insight into how sites like Facebook fit into their members' daily online lives. The data showed that after other social networks, the most clicked-on category of sites was search engines, with 11.6% of all downstream visits. Web-based e-mail services were next with 8.5%. Blogs came in third in popularity at 6.1%, claiming more than four times the number of visits to traditional news sites, which logged 1.5% of downstream visits.

Perhaps a more interesting — and more accurate — way to figure out where college students are going online is to assess which of the 172 web categories tracked by Hitwise get the most hits from 18- to 24-year-olds. Here's a shocker: Porn is not No. 1. I've actually been puzzled by the decrease in visits to the Adult Entertainment category over the last two years. Visits to porn sites have dropped from 16.9% of all site visits in the U.S. in October 2005 to 11.9% as of last week, a 33% decline. Currently, for web users over the age of 25, Adult Entertainment still ranks high in popularity, coming in second, after search engines. Not so for 18- to 24-year-olds, for whom social networks rank first, followed by search engines, then web-based e-mail — with porn sites lagging behind in fourth. If you chart the rate of visits to social-networking sites against those to adult sites over the last two years, there appears to be a strong negative correlation (i.e., visits to social networks go up as visits to adult sites go down). It's a leap to say there's a real correlation there, but if there is one, then I'd bet it has everything to do with Gen Y's changing habits: they're too busy chatting with friends to look at online skin. Imagine.

This reshaped online landscape leaves me feeling old and out of the loop. It seems that social-networking sites have not only usurped porn in popularity, but they've also gobbled up time Gen Y-ers used to spend on traditional e-mail and IM. When you can reach all of your friends through Facebook or MySpace, there's little reason to spend time in your old-school inbox. So, if social networking is becoming e-mail 2.0, then perhaps Microsoft's recent $240 million dollar payout for such a small stake in Facebook isn't that ridiculous.

The reality is that Facebook isn't just for kids. Last week — and this was a highlight — my dad, who just turned 75, added me as a friend on Facebook. I considered sending him a virtual beer to celebrate the occasion, but I didn't think either of us would see the point. Back in my day, we drank beers out of bottles and cans — we didn't have these new-fangled virtual beers. But, then again, I think that's something I probably still have in common with the younger generation, something I don't need Hitwise data to back up: the love of a good old-fashioned beer.

Let the messages roll in.



by cnn

Labels: , ,

Facebook
Facebook
Article Tools
Click here to find out more!

When I wrote last week's column comparing the social-networking sites MySpace and Facebook, I included a line after my signature stating that I had only 124 friends on Facebook, and urged readers to add me as their friends. As of today I have 261 new Facebook friends, the majority of which are Generation Y college students.

Related Articles

Why Facebook Is the Future.

A network for teens could teach the Net to grow up

MySpace v. Facebook: Competing Addictions

MySpace v. Facebook: Competing Addictions Wednesday, Oct. 24, 2007 By BILL TANCER .

I turned to Hitwise data to find out more about them. By examining which websites social-network users visit after logging into their profiles, we can gain a bit of insight into how sites like Facebook fit into their members' daily online lives. The data showed that after other social networks, the most clicked-on category of sites was search engines, with 11.6% of all downstream visits. Web-based e-mail services were next with 8.5%. Blogs came in third in popularity at 6.1%, claiming more than four times the number of visits to traditional news sites, which logged 1.5% of downstream visits.

Perhaps a more interesting — and more accurate — way to figure out where college students are going online is to assess which of the 172 web categories tracked by Hitwise get the most hits from 18- to 24-year-olds. Here's a shocker: Porn is not No. 1. I've actually been puzzled by the decrease in visits to the Adult Entertainment category over the last two years. Visits to porn sites have dropped from 16.9% of all site visits in the U.S. in October 2005 to 11.9% as of last week, a 33% decline. Currently, for web users over the age of 25, Adult Entertainment still ranks high in popularity, coming in second, after search engines. Not so for 18- to 24-year-olds, for whom social networks rank first, followed by search engines, then web-based e-mail — with porn sites lagging behind in fourth. If you chart the rate of visits to social-networking sites against those to adult sites over the last two years, there appears to be a strong negative correlation (i.e., visits to social networks go up as visits to adult sites go down). It's a leap to say there's a real correlation there, but if there is one, then I'd bet it has everything to do with Gen Y's changing habits: they're too busy chatting with friends to look at online skin. Imagine.

This reshaped online landscape leaves me feeling old and out of the loop. It seems that social-networking sites have not only usurped porn in popularity, but they've also gobbled up time Gen Y-ers used to spend on traditional e-mail and IM. When you can reach all of your friends through Facebook or MySpace, there's little reason to spend time in your old-school inbox. So, if social networking is becoming e-mail 2.0, then perhaps Microsoft's recent $240 million dollar payout for such a small stake in Facebook isn't that ridiculous.

The reality is that Facebook isn't just for kids. Last week — and this was a highlight — my dad, who just turned 75, added me as a friend on Facebook. I considered sending him a virtual beer to celebrate the occasion, but I didn't think either of us would see the point. Back in my day, we drank beers out of bottles and cans — we didn't have these new-fangled virtual beers. But, then again, I think that's something I probably still have in common with the younger generation, something I don't need Hitwise data to back up: the love of a good old-fashioned beer.

Let the messages roll in.

Labels: ,

Stationery Design

Stationery Design





IBAUDIO is a music authoring company offering a range of professional bespoke music creation, voice over, sound editing and production facilities, along with a selection of high quality royalty free audio CDs for multi-media, web, new media and traditional media broadcasting.

We were approached by IBAUDIO to design a series of audio CD packaging designs, for their royalty free music collections, representing a diverse range of musical and graphical styles while striving for a degree of consistency across their range.

We achieved this by carrying a number of consistent visual themes through their whole range of cd covers and ultimately into their stationery design you see here.

LETTERHEAD DESIGN

IBAUDIO Stationery Letterhead Design


To the right is a low resolution preview of the letterhead design we produced for IBAUDIO.

Please note that these low resolution jpeg versions of the stationery design really don't do the finished print justice.

To see an indication of the subtle detail in our design and finished print:

See a close up section of the letterhead design here »»

See an enlarged version of the full letterhead design here »»

IBAUDIO Stationery Letterhead Design

IBAUDIO Letterhead Design - Click the letterhead to enlarge

COMPLIMENT SLIP DESIGN
IBAUDIO Stationery Compliment Slip Design

A low resolition preview of the compliment slip design is shown to the right.

You can see an enlarged version of the compliment slip design here »»

IBAUDIO Stationery Compliment Slip Design
IBAUDIO Compliment Slip Design - Click the compliment slip to enlarge

BUSINESS CARD DESIGN
IBAUDIO Stationery - Business Card Design

A low resolution preview of the business card design is shown to the right.

You can see an enlarged version of the business card design here »»




IBAUDIO Stationery - Business Card Design
IBAUDIO Business Card Design - Click the business card to enlarge





by http://www.ethicaldesign.co.uk/StationeryDesignIBAUDIO.asp

Labels: ,


philwebsupport


My Topsites List
Open Web Design
Back to top



Designed & Developed by
chris paragas