Flash Q&A
Flash,Actionscript Q&A feature released!
When you have something you want to do with Flash and Actionscript but you don't know the way to code it,
it's better not to ask for everything, but you'd better go as far as you can and at last, ask somebody for only the rest.
You can do this with wonderfl.
Use wonderfl, to ask questions about your code, and answer others questions.
How to ask: write code, explain your question in the title and comments, and tag it "question"
-> more info about: How to 'ask a question' in Q&A feature
How to answer: fork the question code and modify it
-> more info about: How to answer a question in Q&A feature
How to close question: change "question" tag into "question-closed"
-> more info about: How to close a question in Q&A feature
* It doesn't have to be exactly a Question and Answer, can be a Topic or a Contest which uses wonderfl's fork feature to gather codes.
* for example: "Use this template and write something cool with less than 140 characters!"
Questions
List of questions waiting for answers.
- // Last time I compiled I was able to press a key and start a game. Now
- // It dosn't respond. Is this just me? If not, please show problem.
- package {
- import Box2D.Common.Math.*;
- import com.actionsnippet.qbox.*;
- import com.bit101.components.*;
- import flash.display.*;
- import flash.events.*;
- import flash.filters.*;
- //Copied from here: http://www.bit-101.com/blog/?p=2313
- //from http://wonderfl.net/c/njsw
- package
- {
- import com.bit101.components.Accordion;
- import com.bit101.components.Component;
- import com.bit101.components.HBox;
- import com.bit101.components.PushButton;
- import com.bit101.components.VBox;
- import com.bit101.components.Window;
- package {
- import com.actionscriptbible.Example;
- import flash.utils.describeType;
- public class FlashTest extends Example {
- public function FlashTest() {
- // Use a regular expression to find \u0064
- // TODO: put your regular expression here
- var re:RegExp = /\\u0064/;
- // forked from makc3d's Tween capture
- package {
- import caurina.transitions.*;
- import caurina.transitions.properties.CurveModifiers;
- import com.bit101.components.ComboBox;
- import com.bit101.components.Label;
- import com.bit101.components.PushButton;
- import com.bit101.components.TextArea;
- import flash.display.Sprite;
- import flash.events.Event;
- //How to delete the blue box showing the Fps, Ms, Mem and Max?
- /**
- * Copyright leonardo.sgoulart ( http://wonderfl.net/user/leonardo.sgoulart )
- * MIT License ( http://www.opensource.org/licenses/mit-license.php )
- * Downloaded from: http://wonderfl.net/c/apMU
- */
- // forked from brane7's flash on 2010-3-12
- // I want to resize the whole animation to a 1280*720 size, and center it. I would like to make that for many animation found here.
- // But, if I can make the resolution to 1280*720, I can't align it, and make it bigger
- // (I've just modify [SWF(width=465,height=465,backgroundColor=0,frameRate=60)]
- // to [SWF(width=1280,height=720,backgroundColor=0,frameRate=60)]
- // forked from nutsu's F5BitmapDataSample2
- // forked from nutsu's BitmapDataSample11
- package {
- import flash.display.Sprite;
- import flash.events.*;
- import com.bit101.components.*;
- import org.si.sion.*;
- import org.si.sion.sequencer.SiMMLTrack;
- import org.si.sion.utils.SiONPresetVoice;
- public class FlashTest extends Sprite {
- private var track:SiMMLTrack;
- // forked from shmdmoto's 線を引く
- package
- {
- import frocessing.display.F5MovieClip2D;
- /**
- * Frocessingを使った直線の描画
- * @author shmdmoto
- */
- public class GraphicExample extends F5MovieClip2D
- {
- // forked from clockmaker's フレームアクションで覚える Papervision3D サンプル Vol.01
- // forked from clockmaker's WonderflでaddFrameScriptを試してみる
- package {
- import flash.display.*; import flash.events.*; import flash.utils.*; import flash.net.*; import flash.filters.*; import flash.text.*;
- public class FlashTest extends MovieClip {
- public function FlashTest() {addFrameScript(0, func);}
- public function func():void {
- // ------------------------------------------------------------------
- // ▼▽▼ ここからフレームアクション ▼▽▼
- package {
- import com.actionscriptbible.Example;
- public class FlashTest extends Example {
- public function FlashTest() {
- trace2 = trace;
- new C().foo();
- }
- }
- package {
- import com.actionscriptbible.Example;
- import flash.system.ApplicationDomain;
- public class FlashTest extends Example {
- public function FlashTest() {
- // I dont know a thing about application domains :(
- // Please explain...
- trace (ApplicationDomain.currentDomain == ApplicationDomain.currentDomain);
- trace (loaderInfo.applicationDomain == loaderInfo.applicationDomain);
- trace (loaderInfo.applicationDomain == ApplicationDomain.currentDomain);
- package
- {
- import flash.display.Sprite;
- import flash.display.StageAlign;
- import flash.display.StageScaleMode;
- import flash.events.IOErrorEvent;
- import flash.events.ProgressEvent;
- import flash.events.SecurityErrorEvent;
- import flash.net.Socket;
- import flash.utils.ByteArray;
- // forked from greentec's Flock Attack
- // forked from greentec's Fleet Attack
- // forked from greentec's Ship Attack
- // forked from greentec's Ship Placement
- // forked from greentec's Circle Placement
- package {
- import flash.filters.GlowFilter;
- import flash.events.MouseEvent;
- import flash.filters.DropShadowFilter;
- import flash.display.Bitmap;
- <?xml version="1.0" encoding="utf-8"?>
- <!-- forked from genms's Flex動作テストテンプレート -->
- <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" applicationComplete="onApplicationCompleteHandler(event);">
- <mx:Script>
- <![CDATA[
- public function onApplicationCompleteHandler(event:Event):void {
- // ここに処理を書く
- }
- public function btnClickHandler(event:Event):void {
- package {
- import com.actionscriptbible.Example;
- import flash.utils.getQualifiedClassName;
- // public class FlashTest extends A
- public class FlashTest extends Example {
- public function FlashTest() {
- trace(getQualifiedClassName(A));
- }
- }
- /*
- Are the new text engine methods available for Flash Player 10?
- */
- package {
- import flash.events.MouseEvent;
- import flash.display.Sprite;
- import flash.text.TextElement;
- import flash.text.TextBlock;
- /* I've been looking around other people's code and seen some awesome things, but I can't find an example of a looping mp3. I've found this code in a tutorial...
- Ideally the mp3 would loop with no gap.
- As you can tell, I have no idea where to begin. */
- package {
- import flash.display.Sprite;
- public class FlashTest extends Sprite {
- public function FlashTest() {
- package
- {
- import Box2D.Collision.Shapes.b2FilterData;
- import Box2D.Collision.Shapes.b2Shape;
- import Box2D.Collision.Shapes.b2ShapeDef;
- import Box2D.Common.Math.b2Vec2;
- import com.actionsnippet.qbox.*;
- import flash.display.*;
- /*
- * ------------------------------------------------------------------
- * [遊び方]
- * 右の出口を通過させないようにパーティクルをジャグリングさせるゲーム。
- * ------------------------------------------------------------------
- * [question&コメント]
- * ・・・にさせたいのだけど、ActionScript初心者には厳しい
- * ・GameStartをクリックで始めたい
- * ・ジャグリング中のタイムカウント
- * ・パーティクル上には壁を設置できない仕様
- //Question: I can't seem to build projects. It says it can't connect to a server.
- //Is this a firewall issue on my end?
- //"[ERROR]Couldnt Connect with Server, Reconnecting..."
- package {
- import flash.display.Sprite;
- public class FlashTest extends Sprite {
- public function FlashTest() {
- // write as3 code here..
- //test
- graphics.lineStyle(2,0x000000);















