Showing posts with tag: flash
Posted December 29, 2011 by Nick Vogt in Web and Internet
The Flash Player download from Adobe's main website is not a compete installer. After running it, the installer's first step is to download the rest of itself. This generally isn't a problem, but it is useful to have the full standalone installer if you need to install Flash Player on an offline computer. It can also bypass the Adobe Flash Player Failed to Initialize error that sometimes occurs with the normal installer.

You can find the current version of the full Adobe Flash Player installer for all operating systems at the following link:

http://www.adobe.com/products/flashplayer/fp_distribution3.html

Continue reading...
Posted September 19, 2011 by Nick Vogt in Web and Internet
Sometimes you may get an error when trying to install the Adobe Flash plugin on your browser that reads something like "Adobe Flash Player failed to initialize". If you do, one possible solution is to download the full standalone Flash installer directly from Adobe's distribution site. Here is a direct link:

http://www.adobe.com/products/flashplayer/fp_distribution3.html

Continue reading...
Posted June 17, 2011 by Nick Vogt in Programming
Here's a quick description of a unit vector for those that don't know. A unit vector is a vector with a magnitude (distance) of 1. The vector can be pointing in any direction, but the magnitude will always be 1. To get a unit vector from any old vector, you "normalize" that vector, which gives you a new vector with the same direction but a magnitude of 1. Unit vector and normalized vector are often used interchangeably.

Take a look at this graph. Notice that while (1,0) is a unit vector, (1,1) is not. Think about the actual length of the line (it's magnitude) and you'll understand why (1,1) is not a unit vector.


Continue reading...
Posted May 31, 2011 by Nick Vogt in Programming
When working with BitmapData and copyPixels, you'll quickly run into the limitation of not having an alpha attribute with which to change the transparency level of objects. If you're like me, you started out using Sprite and MovieClip in your games and could easily fade-in or fade-out objects using the alpha attribute. Unfortunately, BitmapData does not have the alpha attribute, so how do you adjust transparency dynamically while using copyPixels?

You could create several versions of every image at different transparency levels. This is very tedious and will result in more file size and memory usage. Another way is to use a separate transparent BitmapData mask and apply it to any image that you want transparent.

Continue reading...
Posted May 31, 2011 by Nick Vogt in Programming
Creating semi-transparent BitmapData in ActionScript 3 is done using an ARGB hexadecimal value (32-bit). ARGB stands for Alpha-Red-Green-Blue and is just like an RGB hex value but with an alpha level at the beginning. Due to the alpha level, ARGB hex values are 8 hex digits and not 6. If you aren't familiar with hexadecimal, I suggest reading up on it before continuing.

In the alpha level, 00 represents fully transparent and FF represents fully opaque (visible). For example, to create a fully opaque black, you would use FF000000 (0xFF000000). To create a semi-transparent black, you could use AA000000 (0xAA000000).

Continue reading...
Posted January 17, 2011 by Nick Vogt in Programming
Passing variables to a Flash movie that is embedded in a web page can be done using either the query string or FlashVars. The difference between these methods is that using query string will cause browsers to re-download the Flash movie each visit, while FlashVars allows browsers to use the cached version. Depending on the functionality you want, one method may suit you better than the other.

Here is an example of loading variables via FlashVars (use an & to separate each name/value pair):

<object>
<param name="movie" value="movie.swf">
<param name="FlashVars" value="name1=value1&name2=value2">
<embed src="movie.swf" FlashVars="name1=value1&name2=value2">
</object>

And now via the query string:


Continue reading...
Posted November 19, 2010 by Nick Vogt in Programming
In order to use int typecasting in place of Math.floor or Math.ceil, you must first understand exactly what these functions do: Math.floor takes a number and returns the next lowest whole integer. Passing 0.9 will return 0 and -0.9 will return -1. Math.ceil returns the next highest integer, so will return 1 from 0.9 and 0 from -0.9. This is different than truncating, which would return 0 in all cases, and is why typecasting using int (usually used to truncate) wouldn't seem to work at first.

In order to make int typecasting work, you need to add a condition check to see if the number is negative or positive (negative for floor, positive for ceil), and adjust it by 1 if it is. Why do this instead of just using Math.floor or Math.ceil? Because it is faster and you can avoid a function call if desired. Look at these examples:

Using Math.floor like normal requires 691 milliseconds for this run:

var i:int = 0;
var testVar:Number = -82.20035;
var floored:Number;

var time1 = new Date();
for(i = 0; i < 5000000; i ++)
{
  floored = Math.floor(testVar);
}
var time2 = new Date();
trace(time2 - time1);

Now using a custom floor function:


Continue reading...
Posted June 24, 2010 by Nick Vogt in Web and Internet
Update: Adobe has changed their plugin installer so this post no longer applies. Please ignore!

Why is it that when you want to install the Flash Player plugin for Firefox from Adobe, they want you to install their "Adobe DLM" (download manager) first? Installing this DLM then requires a Firefox restart before it can download the Flash Player plugin. And if you want to remove it after that, you have to do it manually, which requires another Firefox restart.

Continue reading...
Posted May 21, 2010 by Nick Vogt in Programming
One of the advantages to making web games for Facebook is that you can utilize the Facebook user_id to uniquely identify users of your game without them having to log in. This makes it easy for them to access your game and continue where they left off. For PHP/JavaScript browser games, this is secure and works well as is; however, for Flash games it presents a problem.

The problem stems from having to pass the user_id into the embedded Flash game via the query string or through the flashvars, in order for the Flash game to know whose account to access in the database. Since this information is readily available in the page's source code, it can allow someone to easily access someone else's game account if they have obtained their Facebook user_id. There are several solutions to this problem, and I will outline them from OK to Best below:

Continue reading...

Features
Free Web MP3 PlayerComputer Build GuidePHP Beginner Tutorials
Post Series
ActionScript 3 TutorialsHard Drive Cost Charts
Popular Tags
actionscriptajaxcall of dutycrysisebayfacebookgooglejavascriptminecraftneweggphprageskyrimtutorialyoutube


H3XED © 2012 Nick Vogt | Web Design
Saturday, May 19, 2012 | Privacy Policy | Disclosure Policy | Contact