Extend your Flash Application Using the Context Menu

lør, mar 13, 2010

0 Comments

A Context Menu is a menu in a graphical user interface that appears upon user interaction, such as a right-mouse click. The Flash Player context menu allows you to add custom menu items, control the display of the built-in context menu items (for example, Zoom In and Print) and create copies of menus.

In this tutorial, we’ll learn how to take advantage of these items.

 


Final Result Preview

Let’s take a look at the final result we will be working towards:

Right-click on the different areas of the SWF to see how the context menu changes.

No tags for this post.

How To Create a Steel Wristwatch in Corel Draw

lør, mar 13, 2010

0 Comments

In this tutorial we will learn how to create a steel wristwatch using Corel Draw. The basic technique used in this tutorial is the x, y coordinates position. The x, y coordinates position is very important to obtain symmetrical results. We will also use some gradients to create the steel effect. We’ll work with simple technique to achieve great results.

 

Step 1

Open a new document. On the toolbar, change Units to pixels. Create a 1001px circle using the Ellipse Tool (F7). Put the x, y coordinates position at (0, 0).

Make sure all this toolbars have been checked.

No tags for this post.

Quick Tip: HTML5 Video with a Fallback to Flash

lør, mar 13, 2010

0 Comments

In this video quick tip, we’ll review how to work with HTML 5 video in your own projects. Because older browsers and Internet Explorer do not understand the <video> element, we must also find a way to serve a Flash file to viewers who are utilizing those browsers.

 

Unfortunately, much like HTML 5 audio, Firefox and Safari/Chrome don’t quite agree when it comes to the file format for videos. As such, if you wish to take advantage of HTML 5 video at this time, you’ll need to create three versions of your video.

No tags for this post.

Quick Tip: How to Communicate Between Flash and HTML

fre, mar 12, 2010

0 Comments

In this Quick Tip, we’ll look at how to use the ExternalInterface class. This allows us to write AS3 which can run JavaScript code, and vice-versa. That means you can use Flash to alter parts of the webpage in which it’s running!

 


Step 1: Set up the Flash Document

Create a new Flash ActionScript 3 document. Resize the stage to be 600×300. With the rectangle tool, draw out a rectangle that is the size of the stage. Give it a color of #CCCCCC. Also, give it a black stroke of 2px.

No tags for this post.

Showing Random Posts In WordPress

fre, mar 12, 2010

0 Comments

Solution

Place the code bellow in functions.php file inside your theme’s folder.

function randomPosts($numPosts = 5){

	query_posts(array('orderby' => 'rand', 'showposts' => $numPosts));
	if (have_posts()) : while (have_posts()) : the_post();

	?>
		<ul>
			<li><a title="Permanent Link to <?php the_title(); ?>" href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
		</ul>
		<?php

	endwhile;
	endif;

	wp_reset_query();

}

Change the layout to fit your needs.

Calling randomPosts(); will show 5 random posts and if you want a different amount then call it like randomPosts(number);

No tags for this post.

Create an Organic Spring Lettering Illustration – Vector Plus Tutorial

fre, mar 12, 2010

0 Comments

This Tutorial is Filled with Creative Techniques

Warm up your illustration skills with this spring-inspired tutorial for creating organic letters. Use of a Wacom tablet is recommended but not required.

This is a Detailed and Professional Tutorial

Picture-3
Picture-10
Picture-16
Picture-33
Picture-46
No tags for this post.

Get Separate Count For Comments Trackbacks And Pingbacks In WordPress

fre, mar 12, 2010

0 Comments

The code

Place the code bellow in your theme’s functions.php file.

function commentCount($type = 'comments'){

	if($type == 'comments'):

		$typeSql = 'comment_type = ""';
		$oneText = 'One comment';
		$moreText = '% comments';
		$noneText = 'No Comments';

	elseif($type == 'pings'):

		$typeSql = 'comment_type != ""';
		$oneText = 'One pingback/trackback';
		$moreText = '% pingbacks/trackbacks';
		$noneText = 'No pinbacks/trackbacks';

	elseif($type == 'trackbacks'):

		$typeSql = 'comment_type = "trackback"';
		$oneText = 'One trackback';
		$moreText = '% trackbacks';
		$noneText = 'No trackbacks';

	elseif($type == 'pingbacks'):

		$typeSql = 'comment_type = "pingback"';
		$oneText = 'One pingback';
		$moreText = '% pingbacks';
		$noneText = 'No pingbacks';

	endif;

	global $wpdb;

    $result = $wpdb->get_var('
        SELECT
            COUNT(comment_ID)
        FROM
            '.$wpdb->comments.'
        WHERE
            '.$typeSql.' AND
            comment_approved="1" AND
            comment_post_ID= '.get_the_ID()
    );

	if($result == 0):

		echo str_replace('%', $result, $noneText);

	elseif($result == 1): 

		echo str_replace('%', $result, $oneText);

	elseif($result > 1): 

		echo str_replace('%', $result, $moreText);

	endif;

}

Change the $oneText, $moreText, $noneText variable values to suit your needs. The percentage character (%) can be used in all of the variables and will be replaced with the number.

No tags for this post.

Canvas Texture Imitation

fre, mar 12, 2010

0 Comments

Canvas Texture Imitation

One more interesting tutorial how to create canvas texture imitation from the photography. Here I’ll show you the method how to simulate the maximum texture of canvas.

 

Before starting this tutorial you should find the suitable photography to work with. You can try to find it by using Google Images or feel free to use mine. Open up the photography and duplicate layer with Ctrl+J at first. After that desaturate copied layer with Image > Adjustments > Desaturate and set up opacity to 70%.

Merge two of these layers in one and apply Filter > Noise > Add Noise to the new layer.

No tags for this post.

Create an Organic Spring Lettering Illustration – Vector Premium Tutorial

fre, mar 12, 2010

0 Comments

We have another great Vector Premium tutorial available exclusively for Premium members today. If you want to learn how to create organic lettering, with digitally drawn lettering, then we have an awesome tutorial for you. This tutorial covers all the techniques in creating this lettering illustration and gives advanced coloring and compositional tips.

 

This Tutorial is Filled with Creative Techniques

Warm up your illustration skills with this spring-inspired tutorial for creating organic letters. Use of a Wacom tablet is recommended but not required.

This is a Detailed and Professional Tutorial

Picture-3
Picture-10
Picture-16
Picture-33
Picture-46
No tags for this post.

Insert Element Every nth Loop

ons, mar 10, 2010

0 Comments

When inside of a loop, you can keep track of the iteration number of the loop (shown below is a simple for loop). Using that iteration number, you can calculate it’s modulus of some number (number left over after an even division). If that modulus is zero, you are at an even division of whatever that number was.

So in this simple loop below, it will output something every third time through the loop:

<?php for ($counter = 1; $counter < 100; $counter++ ) { if ($counter % 3 == 0) { echo "<p>Every third!</p>"; } }
?>

Tags: , , , ,