Perfect maze generation with Flash actionscript

In a perfect maze, there is one and only one path from any point in the maze to any other point. That is, there are no inaccessible sections, no circular paths, and no open regions.

Viewing a maze as a two-dimensional matrix of square cells, a perfect maze is one in which any two cells are connected by a single unique path. As a consequence of this definition, all cells in a perfect maze are reachable from the starting point by some unique path, meaning that perfect mazes are guaranteed to have a unique solution.

To generate a perfect maze, I ‘ll start with a maze in which all of the possible walls exist (i.e., a wall exists on every side of each cell), then continue removing walls until I have a perfect maze.

Here it is the source code, to be explained very soon.

Customizable flash gallery

This is a project resumed from an old template I can’t even remember where I found it.
A flash gallery with some customizable effect, such as:

- Thumbnail size and position
- Final image size and position
- Speed
- Friction (the “bounce” effect)
- Alpha fading

There is room for much improvement such as total actionscripting, flash 8 compatibility and so on, but at the moment here it is… if you should improve it, let me know it.

Download the movie in Flash 8 or Flash Mx 2004 formats.

The .fla file has comments or every variable you can change .

Step by step perfect maze generation with php

This is a project I made for teaching purpose.
First of all, let’s see what is a perfect maze.
From Maze Works: A perfect maze is defined as a maze which has one and only one path from any point in the maze to any other point. This means that the maze has no inaccessible sections, no circular paths, no open areas.

This is a perfect maze
Perfect maze

This is not a perfect maze
Not a perfect maze

With the script I provide, you can generate perfect mazes with a given length and height, and the cute thing is that the script will “think loud” its actions in order to explain how does it work.
It uses backtracking.

Read more

Cyanotype effect Photoshop Action

From Wikipedia: Cyanotype is an old monochrome photographic printing process which gives a cyan-blue print.

The English scientist and astronomer Sir John Herschel discovered this procedure in 1842. Though Sir John Herschel is perhaps the inventor of the cyanotype process, it was Anna Atkins, a British scientist, who brought the process into the realm of photography. She created a limited series of cyanotype books that documented ferns and other plant life. By using this process, Anna Atkins is regarded as the first woman photographer.

Let’s ty to replicate the effect.

Before

Before Cyanotype

After

After Cyanotype

Download the action and give me feedback, don’t forget to send me your works to have them published.

Designer vs Developer Contest at MDM

To celebrate its Fourth Birthday, MDM on 24th July 2006 launched a unique contest for both Flash Designer and Developer community. MDM are offering the winners of each contest brief a Flash Goodie Bag worth over $1000, including Swift 3D, SWF Encrypt, MDM Zinc, Squeeze for Flash and Components from Flash Loaded, and the chance to get their work showcased on the MDM website

http://www.multidmedia.com/news/news.php?id=63

Managing crossbrowser opacity with CSS

Sometimes you may want to change the opacity of some images with CSS.
There are different ways to do it, according to the browser you are using. In this example, we'll see both Explorer and Firefox.

Firefox

In Firefox, the style is -moz opacity: xx where xx is a number from 0 to 1, where lesser equates to more transparency (basically, it's the alpha).

HTML:
  1. <img style="-moz-opacity:0.5" src="/images/google_logo.gif">

The above image should look solid in Explorer and 50% transparent in Firefox.

Explorer

In Explorer, the style is filter: alpha(opacity=xx) where xx is a number between 0 and 100 (again, it's the alpha)

HTML:
  1. <img style="filter: alpha(opacity=50)" src="/images/google_logo.gif">

The above image should look solid in Firefox and 50% transparent in Explorer.

Firefox and Explorer

To create an image with transparency both in Firefox and Explorer, you need to use both styles

HTML:
  1. <img style="filter: alpha(opacity=50); -moz-opacity:0.5" src="/images/google_logo.gif">

This image should look 50% transparent in Explorer and in Firefox.

Embedding a wmv file in your web page

Just in case you have to embed a wmv file in your webpage, and there is no need to do it since it's possibile to play better videos with flash but... just in case you really have to do it... like I have to do it today... here it is the html code

HTML:
  1. <OBJECT ID="MediaPlayer" WIDTH="192" HEIGHT="190" CLASSID="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" STANDBY="Loading Windows Media Player components..." TYPE="application/x-oleobject">
  2. <PARAM NAME="FileName" VALUE="videofilename.wmv">
  3. <PARAM name="ShowControls" VALUE="true">
  4. <param name="ShowStatusBar" value="false">
  5. <PARAM name="ShowDisplay" VALUE="false">
  6. <PARAM name="autostart" VALUE="false">
  7. <EMBED TYPE="application/x-mplayer2" SRC="videofilename.wmv" NAME="MediaPlayer" WIDTH="192" HEIGHT="190" ShowControls="1" ShowStatusBar="0" ShowDisplay="0" autostart="0"> </EMBED>

Adjust height, width, ect to match your video settings.

Php password generator

Today I had to generate some passwords, and I am not so creative in doing this.

So I coded a function I want to share with you.

PHP:
  1. <?php
  2. function create_password($length=8,$use_upper=1,$use_lower=1,$use_number=1,$use_custom=""){
  3.     $upper = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
  4.     $lower = "abcdefghijklmnopqrstuvwxyz";
  5.     $number = "0123456789";
  6.     if($use_upper){
  7.         $seed_length += 26;
  8.         $seed .= $upper;
  9.     }
  10.     if($use_lower){
  11.         $seed_length += 26;
  12.         $seed .= $lower;
  13.     }
  14.     if($use_number){
  15.         $seed_length += 10;
  16.         $seed .= $number;
  17.     }
  18.     if($use_custom){
  19.         $seed_length +=strlen($use_custom);
  20.         $seed .= $use_custom;
  21.     }
  22.     for($x=1;$x<=$length;$x++){
  23.         $password .= $seed{rand(0,$seed_length-1)};
  24.     }
  25.     return($password);
  26. }
  27. ?>

How does it work?
Let' see the parameters

lenght: is the password length (default = 8)
use_upper: set to 0 if you do not want to use uppercase chars (ABCD...), any other value otherwise. Default = 1
use_lower: set to 0 if you do not want to use lowercase chars (abcd...), any other value otherwise. Default = 1
use_number: set to 0 if you do not want to use number chars (0123...), any other value otherwise. Default = 1
use_custom: a string representing any extra char you want (such as ?*_ ...). Default = empy string

Examples:

PHP:
  1. <?php
  2. echo create_password(); // Returns for example a7YmTwG4
  3. echo create_password(16); // Returns for example Z77OzzS3DgV3OxxP
  4. echo create_password(8,0,0); // Returns for example 40714215
  5. echo create_password(10,1,1,1,";,:.-_()"); // Returns for example or)ZA10kpX
  6. ?>

Enjoy and give me feedback.

Posts