Archive for July, 2008
Custom Pop Up Windows with URLRequest and navigateToURL Method
1 comment so farI was in need of a way to create a button that when clicked would open up a new browser window utilizing the window.open method. I chose to use this method as it seemed to be more browser capable - note, make sure your browser will allow pop up windows - just click the black [...]
Calling a Javascript Pop Up within Flash
No commentsHere is a method to implement a Javascript function within your Actionscript (I believe this is ok for AS2 as well as AS3) - note: not supported in all browsers, hence the conditional statement check:
if (ExternalInterface.available) { ExternalInterface.call(”window.open”, “http://www.manewc.com”, “mywindow”, “height=400,width=400″); }
a2a_linkname=”Calling a Javascript Pop Up within [...]
Tweener Animation to a Point
No commentsSo I recently had an inquiry on how to use Tweener to animate an object on an angle, fortunately there is a simple method in which you just animate the x and y parameters of an object simultaneously. I created this little demo to animate a box that will tween from the top left corner [...]
Label Component
No commentsThe Label Component is described as: A Label component displays one or more lines of plain or HTML-formatted text that can be formatted for alignment and size.
package
{
import flash.display.MovieClip;
import flash.text.TextFieldAutoSize;
import fl.controls.Label;
public class LabelComponent extends MovieClip
{
public function LabelComponent()
{
var myStr:String = “This is a test of the Label Component - This is a test [...]
Associative Arrays with the Object Class
No commentsTo create an associative in Actionscript 3 you will need to use the object class because of the named elements (vs. the numbered elements).
var assocArr:Object = {fName:”Morgan”, lName:”Newcomb”};
trace(assocArr.fName); // Output: Morgan
trace(assocArr["lName"]); // Output: Newcomb
To add an element, you can add this to your code
assocArr.mi = “A”;
trace(assocArr.mi); // Output: [...]