Social Bookmarking master site built for StomerNet SMARTS (Social Marketing Traffic Secrets) members for easy social bookmarking. Minimalist design for clear presentation of organized sortable data. Implemented javascript (jquery) libraries for sorting and paging tables, javascript used to control visibility of elements on the page. Very simple and organized design, but still contain loads of information.
Author: Evan Mullins
StomperNet's Stomper Universe | Interactive Flash Site Map
StomperNet now has a site map. Only it’s much bigger than just a site map, we’re calling it Stomper Universe! It contains all the pieces parts that make up StomperNet. It links to different sites, video series, tools, and more by giving a 3D interactive space to inspect the thumbnails and click through to the sites! It will help visitors navigate easily to all areas of StomperNet, whether they are new to them or old favorites.
So go check out the StomperNet Universe now!
Brownian Movement in Actionscript | Random Motion Tutorial
Overview
Having things drift around or move randomly has always interested me. Having an animation that is never going to be the exact same thing is very exciting. The focus turns from key-ing exact animations to programming a feel and letting the animations take car of themselves! One type of seemingly random motion is Brownian motion. This gives the movement a random walk wandering look, it will just drift around with no real direction.
Steps
Step by step this process is very simple. In every random motion you create the random number, and apply it to the property. If you want constant random action (motion) rather than just random placement, you repeat that over and over.
- Make a random number (random velocity)
- Apply the random number (apply velocity to property)
- Repeat (if needed)
To create a random number in actionscript, use Math.random(), which creates a random number between 0 and 1. Usually you’ll want to scale it to a range you want to use. If you want a number between 50 and 100, you’d do Math.random() * 50 + 50. *50 to scale it to 0-50, and + 50 to bring it up to 50 – 100. Also if we want to get a 100 range around 0 (-50 – 50) we would do Math.random() * 100 – 50. In the code below I’ve abstracted this to Math.random() * this.randomRange – this.randomRange/2.
Example
[kml_flashembed fversion=”9.0.0″ movie=”https://circlecube.com/circlecube/wp-content/uploads/sites/10/2008/06/randomMotion.swf” targetclass=”flashmovie” publishmethod=”dynamic” width=”500″ height=”500″]
[/kml_flashembed]
Here I’ve got dots created and placed randomly, with randomly set scale and alpha. On every frame each dot has a random velocity applied to it’s x and y coordinates.
The yellow dot is the simple example (code below) and the rest are included in the complex example below.
Actionscript
Simple Example:
[cc lang=”actionscript”]
dotOne.onEnterFrame = function() {
//create a random velocity for x and y direction
vx = Math.random() * 4 – 2;
vy = Math.random() * 4 – 2;
//apply velocity to coordinates
this._x += vx;
this._y += vy;
}
[/cc]
Complex example:
[cc lang=”actionscript”]
var numDots = 25;
var randomRange = 1;
for(var i=1; i<=numDots; i++) {
//create a new dot
duplicateMovieClip(_root.dot, “dot”+i, i);
//save it’s ref path for use
theDot = _root[“dot”+i];
//give it random coordinates
theDot._y = Math.random() * Stage.height;
theDot._x = Math.random() * Stage.width;
//give each dot a distinct random range
theDot.randomRange = i/numDots;
//give each dot a random size and transparency
theDot._xscale =
theDot._yscale =
theDot._alpha = i*4;
//apply this code on the dot every frame
theDot.onEnterFrame = function() {
//create a random velocity for x and y direction within the specifically created random range for each dot
vx = Math.random() * this.randomRange – this.randomRange/2;
vy = Math.random() * this.randomRange – this.randomRange/2;
//apply velocity to coordinates
this._x += vx;
this._y += vy;
}
}
[/cc]
Download
Firefox 3 + StomperTools Release and Atlanta Party
Serious internet businesses require serious internet tools.
Firefox 3 is a dramatic step forward! Help Mozilla.org set a Guiness Book record by downloading the new release on Tuesday the 17th of June 2008 (11 AM PST).
To celebrate, StomperNet and Appcelerator are hosting a release party in Atlanta at Park Tavern as a part of a world-wide network of celebration Tuesday, June 17th at 7pm. RSVP at upcoming.org.
Join us if you’re in town, otherwise, check the downloads for Firefox 3:
StomperTools with SN Ranker and Scrutinize this, and the recent Scrutinizer 1.0 release.
Park Tavern
www.parktavern.com
500 10th St Ne
Atlanta, GA 30309
(404) 249-0001
Tuesday, June 17th 2008
7pm-9pm
Get the Stomper Scrutinizer browser vision simulator. Plus get StomperTools … featuring Scrutinize This and the SN Ranker SEO tool.
StomperNet's Scrutinizer Update v1.0
StomperNet‘s Scrutinizer has recieved some updates!
- New help documentation
- Keyboard Shortcut Functionality
- saving a screenshot
- bookmarking a page
- toggling the visualization
- toggle auto-zoom
- Aesthetic improvements
- Performance optimizations
- Improved auto-update.
If you’re wondering what the heck StomperNet‘s Scrutinizer is:
What is it?
The Scrutinizer is a web browser, based upon the Adobe AIR toolkit and the WebKit browser, that offers a simulation of the human visual system. Specifically, it illustrates the distinction between foveal and peripheral vision in visual acuity and color perception. Using this simulation, you can get a better idea of how users interact with your site design. We explain this, and some of the succes we’ve had, in a 30 minute video called Click Fu. It’s also a great tool for observing users interacting with your pages. By slowing them down, the Scrutinizer makes it easier for you to figure out what information the user is consuming and what actions they are considering. Learn about other ways to use the tool at our Top Ten list.
How it Works
The Scrutinizer browser applies a visual filter to where the mouse is located, simulating foveal vision centered around the mouse. For parts of the screen far away from themouse, the display deteriorates into lower resolution, both in detail and color. You can use the browser to get a better understanding of the low level mechanics of how users interact with your site design. Attempting to accomplish a key task on your site using the Scrutinizer can be very enlightening. Watching a user unfamiliar with your site attempt a key task with the Scrutinizer is even better at revealing how your site design affects the way the user extracts meaning from your presentation. Learn more in the Click Fu video, covering practical examples of improved e-commerce, or the 52 second ” Your Vision is an Illusion“, presenting a dramatic illustration of foveal vision. Finally, check out using the Scrutinizer for a findability challenge on Amazon.com.
Top Ten Things You Can Do with the Scrutinizer
- Simulate eye tracking in a usability task
- Assess the ease of use of multi-step processes
- Give your designer a fresh pair of eyes
- Find out what “pops� in your design
- Conduct findability challenges
- Ask: does your visual grid work?
- Evaluate your site’s contrast levels
- Insure learnability in your template
- Avoid button gravity errors
- Tell the story of how your eyes work
Style htmlText with CSS in your Actionscript | Flash/CSS Tutorial
Overview
In flash you can have text areas that are rendered as html. You can also apply formatting styles to this html. This will show a simple example on how to apply css to html text in flash. I’ll do a simple anchor tag style to show you the ropes. We’ll style a link to be underlined and then when you hover or mouse over it, we’ll change the color. It’s a design style that is widely used online in html, but flash doesn’t natively do it. As a matter of fact, flash doesn’t even natively underline links.
Steps
- Import TextField.StyleSheet
- create a style sheet object: var myCSS:StyleSheet = new StyleSheet();
- Specify your styles: myCSS.setStyle(“a:link”, {color:’#0000CC’,textDecoration:’underline’});
- Ensure that the text box is html enabled: myHTML.htmlText = myHTMLText;
- Apply the style sheet object to your html text box: myHTML.styleSheet = myCSS;
Example
[kml_flashembed fversion=”9.0.0″ movie=”https://circlecube.com/circlecube/wp-content/uploads/sites/10/2008/06/flashhtmlcss.swf” targetclass=”flashmovie” publishmethod=”dynamic” width=”500″ height=”250″]
[/kml_flashembed]
Actionscript
[cc lang=”actionscript”]
import TextField.StyleSheet;
myHTMLText = ”
HTML Text (sample header)
Here is some sample html text “+
“filling a text box this link to circlecube and example headers”+
“
Header h1
Header h2
“;
//create and initialize css
var myCSS:StyleSheet = new StyleSheet();
myCSS.setStyle(“body”, {fontSize:’15’,color:’#000066′});
myCSS.setStyle(“h1”, {fontSize:’25’,color:’#000000′});
myCSS.setStyle(“h2”, {fontSize:’19’,color:’#000000′});
myCSS.setStyle(“a:link”, {color:’#0000CC’,textDecoration:’none’});
myCSS.setStyle(“a:hover”, {color:’#0000FF’,textDecoration:’underline’});
myCSS.setStyle(“b”, {fontWeight:’bold’});
myCSS.setStyle(“em”, {fontWeight:’bold’});
//ensure html support and apply css to it
myHTML.html = true;
myHTML.styleSheet = myCSS;
myHTML.htmlText = myHTMLText;
//resize the textbox to exact fit the text in it
//myHTML.autoSize = “left”;
[/cc]
Download
open source flashhtmlcss.zip
Calling actionscript functions through HTML text | asfunction Tutorial
Add this to the list of things I should have already known!
Story
I’ve got an html enabled text box and was trying to devise a way that I could have a hyperlink anchor tag not link to a webpage but actually do something flash. It didn’t seem possible, and I looked through all the different html css combinations I could think of. I finally resorted to trying to use some component like Deng or FlashML. FlashML had a smaller footprint and seemed to do more what I wanted, so I started investigating it. To my dismay, the support for it was few and far between. I found an older version that came with an example file and then a newer one with some documentation but no example and I found no examples any where else. So Lee, if you ever read this, some new examples could be nice. In the documentation I was reading about a functino called AddASFunction and the example html line was very interesting:
[cc lang=”html”]
link
[/cc]
I started looking through the rest of the documentation to find this asfunction use. But all it had was:
The href attribute can include the asfunction string which allows the link provided by the anchor to call a function in Flash. More of this can be found within the addASFunction definition in this help document.
I knew I was on to something, asfunction. So a quick google search and I found the official doc! I was shocked that I had the tool to do this the whole time! Well, shocked and feeling like an idiot for never having heard of it before. I knew it could be done somehow, but had no idea that it was already a feature of htmlText in flash! So now that you know my embarrassing story, I’ll let you in on the secret.
Overview
In flash, you can allow html text within a text area. You either set the text html property as true with actionscript (my_txt.html = true;) or click the ‘Render text as HTML’ button in the properties window of the text area. You cannot enable html text on static text areas however. You can have links and various html elements (but not full html). Usually links have a url in the href attribut of the anchor tag, but flash will read a special value of ‘asfunction’ which specifies that an actionscript function is to be called rather than a url. The correct syntax is asfunction followed by a colon and then the name of the actionscript function to be called, optionally followed by a comma and a possible single argument to be passed to the specified function (href=”asfunction:functionName,argument”).
Steps
- Enable html in the text box.
- Have your function (ex: functionName) ready to be called from the html link.
- Give the href attribute of the anchor tag a property “asfunction:functionName,argument” Notice that the official documentation calls for spaces after punctuation, but any space you put after the colon (:) or comma (,) will be sent to the function in the argument, or will expect a space in the function name and give you a headache.
Example
In this example I’ve got an html enabled text box with 4 links. The first is a standard link (I hope you know what that does). The next link calls an actionscript function with asfunction. The third link sends a single argument to another function. And the last link sends multiple arguments to yet another function. Wait! Multiple arguments? I thought I said only one was supported, well this example shows how to send multiple arguments disguised as a single param and parse them. It’s pretty simple actually.
[kml_flashembed fversion=”9.0.0″ movie=”https://circlecube.com/circlecube/wp-content/uploads/sites/10/2008/05/asfunction.swf” targetclass=”flashmovie” publishmethod=”dynamic” width=”500″ height=”375″]
[/kml_flashembed]
Actionscript
[cc lang=”actionscript” lines=”40″]
import TextField.StyleSheet;
myHTMLText = “Sample text in an html enabled text box. “+
“Here’s a normal link to circlecube! “+
“And some more links that don’t go anywhere, they call functions in actionscript. “+
“Click this one, “+
“to see the actionscript function called from the html text box. “+
“Click this too, “+
“and see that the actionscript function you’re calling can have an argument passed to it. And “+
“click me three and four “+
“to see a way to send multiple arguments from your htmlText. “+
“Also, one last example of what not to do “+
“Click for nothing“;
//create and initialize css
var myCSS:StyleSheet = new StyleSheet();
myCSS.setStyle(“a:link”, {color:’#0000CC’,textDecoration:’none’});
myCSS.setStyle(“a:hover”, {color:’#0000FF’,textDecoration:’underline’});
myHTML.html = true;
myHTML.htmlText = myHTMLText;
myHTML.styleSheet = myCSS;
//function to be called from html text
function clickLink() {
giveFeedback(“Hyperlink clicked!”);
}
//another function to be called from html text, recieves one argument
function clickWithArg(arg) {
giveFeedback(“Hyperlink clicked! Argument: “+arg);
}
//a simple trick to allow passing of multiple arguments
function clickWithMultipleArgs(args) {
giveFeedback(“Hyperlink clicked! Multiple arguments passed: “+args);
argArray = new Array();
argArray = args.split(‘,’);
for (i = 0; i < argArray.length; i++) {
giveFeedback("arg "+i+": "+argArray[i]);
}
}function giveFeedback(str) {
trace(str);
feedback.text += str +"\n";
feedback.scroll = feedback.maxscroll;
}
[/cc]
HTML
[cc lang=”html”]
Sample text in an html enabled text box.
Here’s a normal link to circlecube!
And some more links that don’t go anywhere, they call functions in actionscript.
Click this one,
to see the actionscript function called from the html text box.
Click this too,
and see that the actionscript function you’re calling can have an argument passed to it. And
click me three and four
to see a way to send multiple arguments from your htmlText.
Also, one last example of what not to do
Click for nothing
[/cc]
Download Source
Intro to Flashvars | Passing variables to actionscript from the html embed | Tutorial
I’ve had a couple special requests to explain flashvars and how to use it and show it in action.
Overview
The property “FlashVars” can be used to import root level variables to the flash movie or swf. The flashvars propery is used in codes for embedding flash in the html page. The string of variables passed in as flashvars, will be imported into the top level of the movie when it is first instantiated. Variables are created before the first frame of the SWF is played. The format of the string is a set of name=value combinations separated by ampersand (&) symbols.
Steps
- Include the flashvars property in your embed codes and voila! You have these variables to use in your swf.
- That’s the one step
Code
HTML Embed Codes
[cc lang=”html” tab_size=”2″ lines=”40″]
Here’s some sample embed codes, including object and embed tags:
[/cc]
Actionscript using flashvars
[cc lang=”actionscript” tab_size=”2″ lines=”40″]
//flashvars=”var1=val1&var2=val2&var3=val3″;
display(“var1 = “+ var1);
display(“var2 = “+ var2);
display(“var3 = “+ var3);
display(“var4 = “+ var4);
function display(todisplay:String){
feedback.text += todisplay+”\n”;
trace(todisplay);
}
[/cc]
Example
Page 1 (var1=val1&var2=val2&var3=val3)
Page 2 (var1=here&var2=are&var3=my&var4=flashvars)
Source
Download the html files and the fla and swf in this flashvars.zip
Using CSS Attribute Selectors to Stylize HTML | Style outbound links | Tutorial
Intro to CSS
We use css to apply styles to certain elements on the page, we can target any div like this:
HTML
[cc lang=”html” tab_size=”2″ lines=”40″]
[/cc]
CSS
[cc lang=”css” tab_size=”2″ lines=”40″]
div {
css-property: value;
}
[/cc]
Any class selector <div class=”divClass”> like this:
HTML
[cc lang=”html” tab_size=”2″ lines=”40″]
[/cc]
with this:
CSS
[cc lang=”css” tab_size=”2″ lines=”40″]
div.divClass {
css-property: value;
}
.divClass {
css-property: value;
}
[/cc]
or any id selector, <div id=”divID”> like this:
HTML
[cc lang=”html” tab_size=”2″ lines=”40″]
[/cc]
with this:
CSS
[cc lang=”css” tab_size=”2″ lines=”40″]
div#divID {
css-property: value;
}
#divID {
css-property: value;
}
[/cc]
These are the basics of css. Use an element tag name to target it, use a dot to access class names and a hash (#) to represent id names. A lot can be done with just that, but sometimes you may want to access something differently, an option is to use attribute selection.
Overview
More advanced we can apply styles to elements based on their attributes. Attribute selectors use the attributes of the tag.
We can use attribute selection to specify certain elements to stylize. For example if we have a page with many images but only certain ones have title attributes, which we want to stand out more, this css rule would do the trick:
CSS
[cc lang=”css” tab_size=”2″ lines=”40″]
img [title] {
border: 2px solid #000000;
}
[/cc]
It would cause any image with a title tag (no matter what the value of the title tag is) to have a 2px wide solid black border, such as <img title=”MyImage” src=”/images/sample.jpg” /> or <img title=”” src=”/images/sample.jpg” /> but not <img src=”/images/sample.jpg” /> because it has no title attribute.
HTML
[cc lang=”html” tab_size=”2″ lines=”40″]
would style
or even
but not
because it has no title attribute.
[/cc]
Further we can specify which values of the title attribute we want to target. If we want to stylizee links to a certain site we can do this: a[href=”https://circlecube.com/circlecube”] { }
CSS
[cc lang=”css” tab_size=”2″ lines=”40″]
a[href=”https://circlecube.com/circlecube”] {
background-color: #EBEBEB;
}
[/cc]
it would style <a href=”https://circlecube.com/circlecube”>This link</a> but not <a href=”https://circlecube.com/circlecube/2008/05/21/”>this one</a> because it is not an exact match, nor <a href=”http://www.google.com”>this one</a> because it isn’t a match either, or at all.
HTML
[cc lang=”html” tab_size=”2″ lines=”40″]
it would style
This link
but not
this one
because it is not an exact match, nor
this one
because it isn’t a match either, or at all.
[/cc]
For another example, if we want to stylize local links differently than absolute links, we’d want to look at the beginning of the attribute’s value only so we’d use ‘^=’. We could have something like this:
a[href^=”http://”], a[href^=”https://”] {
background: url(/images/external.gif) no-repeat right center;
padding-right:20px;
}
it would style <a href=”http://www.google.com”>This link</a> because it begins with ‘http://’ but not <a href=”/2008/05/21/”>this one</a> because it is does not begin with ‘http://’. But it would also style <a href=”https://paypal.com”>this</a> because it matches the selector after the comma ‘https://’, and even <a href=”https://circlecube.com/circlecube/2008/05/21/”>this</a> will be styled, because the link is absolute (even though it is local) so be careful with how you use it.
HTML
[cc lang=”html” tab_size=”2″ lines=”40″]
it would style
This link
because it begins with ‘http://’ but not
this one
because it is does not begin with ‘http://’.
But it would also style
this
because it matches the selector after the comma ‘https://’,
and even
this
will be styled, because the link is absolute
(even though it is local) so be careful with how you use it.
[/cc]
Summary
Hoping you will see the pattern and can use the rest of these somehow (I’m drawing blank on interesting examples),
1 is: [attribute] exists
target anchors with any titles attributes.
CSS
[cc lang=”css” tab_size=”2″ lines=”40″]
a[title] {
background-color:#0000FF; (blue)
}
[/cc]
HTML
[cc lang=”html” tab_size=”2″ lines=”40″]
[/cc]
2 equal: [attribute=x] equals x
target only anchors where the title attribute contains something exactly
CSS
[cc lang=”css” tab_size=”2″ lines=”40″]
a[title=”Only”] {
background-color:#FF0000; (red)
}
[/cc]
HTML
[cc lang=”html” tab_size=”2″ lines=”40″]
[/cc]
3 hat: [attribute^=x] starts with x
target instances where something comes at the beginning of the attribute. This can prefix a word or even be the first word in a phrase or sentance.
CSS
[cc lang=”css” tab_size=”2″ lines=”40″]
a[title^=”Super”] {
background-color:#00FF00; (green)
}
[/cc]
HTML
[cc lang=”html” tab_size=”2″ lines=”40″]
[/cc]
4 dollar: [attribute$=x] ends with x
instances where something comes at the end of the attribute. This can be the suffix of the word or the last word in a phrase.
CSS
[cc lang=”css” tab_size=”2″ lines=”40″]
a[title$=”ious”] {
background-color:#FFFF00; (yellow)
}
[/cc]
HTML
[cc lang=”html” tab_size=”2″ lines=”40″]
[/cc]
5 asterisk: [attribute*=x] contains x
or even titles which contain a certain word somewhere/anywhere in the attribute. This wildcard be anywhere, in a word, as a word, whatever.
CSS
[cc lang=”css” tab_size=”2″ lines=”40″]
a[title*=”tic”] {
background-color:#FF00FF; (magenta)
}
[/cc]
HTML
[cc lang=”html” tab_size=”2″ lines=”40″]
[/cc]
6 tilde: [attribute~=x] one of which is exactly x.
a space-separated list of “words”, one of which is exactly x.
CSS
[cc lang=”css” tab_size=”2″ lines=”40″]
a[title~=”tic”] {
background-color:#FF00FF; (magenta)
}
[/cc]
HTML
[cc lang=”html” tab_size=”2″ lines=”40″]
[/cc]
7 pipe: [attribute|=x] which first word is exactly x.
a hyphen-separated list of “words”, first word is exactly x.
CSS
[cc lang=”css” tab_size=”2″ lines=”40″]
a[title|=”Super”] {
background-color:#FF00FF; (magenta)
}
[/cc]
HTML
[cc lang=”html” tab_size=”2″ lines=”40″]
[/cc]
view all examples on this page.
refer to w3 for more
Let me know what you come up with or if I’ve left out any essentials.
Adobe Flash Player 10 | Astro | Beta Release
As you may have heard today Adobe released Astro, Flash Player 10 Beta!
- Create Custom Filters and Effects (with Pixel Blender)
- Performance Boosts (GPU blitting and compositing)
- Drawing API Enhancements
- Vector Data Types
- New Highly Flexible Text Engine
- 3D Support and Effects
- Automatic Variable Bitrates for video streams
- Larger Bitmap Support
- Better File Reference (user uploading)
- Context Menu Enhancements
- UBUNTU
Highlight Features:
Press Release
Official Download at Adobe Labs of Flash Player 10 Beta code named Astro
Official Release Notes
Also released is Pixel Blender (Hydra) – which allows custom filter and effect creation!
Adobe is also reworking the Sound API as well, here’s an example from Keith and Tinic’s Posts (as always with much detail): Adobe is Making Some Noise Part 1, Part 2, and Part 3!
Dont forget to visit the official Demos at Adobe Labs – Flash 10 Demos at Adobe Labs
If you have other article to link to don’t hesitate to add them in the comments!