February 2010
M T W T F S S
« Jan   Mar »
1234567
891011121314
15161718192021
22232425262728

Full screen preview your flash file

Please create your flash file in flash IDE(for example draw flash site).
Then add button with instance name ‘my_btn’(after clicking to this button your flash work will be on full screen).
Then add code :

my_btn.addEventListener(MouseEvent.CLICK, fullScreen);

function fullScreen(event:MouseEvent):void
{
stage.displayState=StageDisplayState.FULL_SCREEN;
}

Then open Preview Settings and make like this:

Source:

full_screen

How show xml content like html page using flash and php?

I recommend you read first next tutorials:
Setting up a testing server
What to do if user don’t have a flash player?

So create flash file. There create dynamic text with instance name: my_text. And add next code:

var xml:XML;
var req:URLRequest = new URLRequest(”content.xml”);var loader:URLLoader = new URLLoader();

function dataLoaded(event:Event):void
{
xml = new XML(loader.data);
my_text.text = xml.supercontent;
}

loader.addEventListener(Event.COMPLETE, dataLoaded);
loader.load(req);

Then create xml file with [...]

What to do if user don't have a flash player?

You need use swfobject. Download there 2 files like on preview picture:

Then create your flash file and compile it, so you get .swf file.
Please open downloaded swfobject_generator.air and made some things like on pic:

After generated code create mysite.php file and paste existing code to this file.

Put downloaded swfobject.js file to the same folder with [...]

Deep linking for Flash Site

Deep linking, on the World Wide Web, is making a hyperlink that points to a specific page or image on another website, instead of that website’s main or home page. Such links are called deep links.
Please read about deep linking on Wikipedia.

For example you created site yoursite.com with next menu: HOME | ABOUT [...]

Setting up a testing server

This instruction will be helpful for user who use Windows OS.
Please open your browser(if you don’t have it yet you can download Firefox or Chrome or some other browser) and enter this address http://www.wampserver.com/en/.

Please find there ‘Download the latest release of Wampserver 2′ link and click to it.

Click to Download

Double click to downloaded file and [...]

Flash Builder 4 and Flash Professional CS4 Workflow

Simple video info you can find here.
The Adobe Developer Connection (ADC) is your source for technical articles and how-to videos that cover Adobe developer products and technologies.

Creating group for radioButtons. Simple quiz

import fl.controls.RadioButtonGroup;

rb1.label=”C++”;
rb2.label=”ActionScript 3.0″;
rb3.label=”ActionScript 2.0″;
rb4.label=”Java”;
rb5.label=”Pascal”;
answer_btn.label=”Select Answer”;

var radioGroups1:RadioButtonGroup=new RadioButtonGroup(”Question1″);

//rb1.selected=true;

rb1.group=radioGroups1;
rb2.group=radioGroups1;
rb3.group=radioGroups1;
rb4.group=radioGroups1;
rb5.group=radioGroups1;

answer_btn.addEventListener(MouseEvent.CLICK, checkAnswer);
function checkAnswer(event:MouseEvent):void {
if (radioGroups1.selection==null) {
answer_txt.text=”Need choose any answer!”;
return;
}
if (radioGroups1.selection.label==”ActionScript 3.0″) {
answer_txt.text=radioGroups1.selection.label+” is correct answer!”;
} else {
answer_txt.text=radioGroups1.selection.label+” is wrong answer!”;
}
}

Source:

quiz

ActionScript 3.0 Cookbook: Solutions for Flash Platform and Flex Application Developers

ActionScript 3.0 Cookbook: Solutions for Flash Platform and Flex Application Developers

Editorial Reviews

Product Description

Well before Ajax and Microsoft’s Windows Presentation Foundation hit the scene, Macromedia offered the first method for building web pages with the responsiveness and functionality of desktop programs with its Flash-based “Rich Internet Applications”. Now, new owner Adobe is taking Flash and its [...]

ActionScript 3.0 Bible

ActionScript 3.0 Bible

Editorial Reviews

Product Description

ActionScript has matured into a full-fledged, object-oriented programming language for creating cutting-edge Web applications, and this comprehensive book is just what you need to succeed. If you want to add interactivity to Flash, build Flex applications, or work with animation — it’s all here, and more. Packed with clear [...]

Timer

var my_box:Box = new Box();
addChild(my_box);

var myTimer:Timer = new Timer(1000);
myTimer.addEventListener(TimerEvent.TIMER, drawBox);

function drawBox(event:TimerEvent) {
my_box.x=my_box.x+10;

this.graphics.beginFill(0xff0000);
this.graphics.drawCircle(event.target.currentCount*10,100,10);
}

myTimer.start();

var my_star:Star = new Star();
addChild(my_star).y=150;

var lastTime:int = getTimer();
addEventListener(Event.ENTER_FRAME, animateStar);
function animateStar(event:Event) {
var timeDiff:int = getTimer()-lastTime;
lastTime += timeDiff;
my_star.x += timeDiff*.02;
}

Source:

Timer