wonderfl - build flash online

Frequently Asked Questions

How to write code ?
build from scratch or "fork", to go to code edit page, write Actionscript3 code in left textarea.

If no action for a few seconds, your code will be automatically compiled, warnings and errors will be displayed in the downward textarea.
Modify your code until successfully compiled.

If success, your Flash shows up on the right side.
Is it like what you wanted it to be?
Couldn't Connect With Server?
When you try to edit and compile code, and you see following in the message area(the right bottom area in the edit page),
"[ERROR]Couldnt Connect with Server, Reconnecting..."

There might be a network problem.
Check your firewall, anti-virus software, NAT settings, and confirm that you can connect to:
domain: compiler1.wonderfl.net port: 4000 TCP
domain: compiler2.wonderfl.net port: 4000 TCP

Type following in the terminal:
telnet compiler1.wonderfl.net 4000
and if you get following:
Connected to compiler1.wonderfl.net.
you're network is OK, it's our problem, and we must be working on it.
How to 'ask a question' in Q&A feature
Follow these steps to post code as a 'question'

* 'question' just means a code taged 'question'.
* any 'question' will be listed here: Flash Q&A

  1. Tag your code "question" when you write code
  2. Explain your question: what you can do, what you CAN'T, what you WANT, in code title, or comments.

-> see list of Flash questions
How to answer a question in Q&A feature
Follow these steps to answer questions. * 'answer'ing is just to fork 'question' codes.

  1. Click one of the questions listed in Flash Q&A and read the title, code, comments and understand the question.
  2. Click 'fork' and write code to do what the questioner wanted to do.


-> see list of Flash questions
How to close a question in Q&A feature
Follow these steps to close questions.

* Closing questions is just 'not showing your code on questions list'

  1. When you got an answer change your tag: "question" into "question-closed" to stop being answered.
  2. Thanks to people who answered your question!!

-> see list of Flash questions
what's "related actions", "my actions" ?
Every wonderfl user page has "related actions" and "my actions".

"related actions" is a place where you get notified about your actions, and your followers actions.
"my actions" is a place where you get notified about your own actions.

After you signup to wonderfl, we recommend you to subscribe to your "related actions". Find interesting code, people using ranking, and follow them. You'll get notified through RSS.

When you do following actions in wonderfl, you'll get a notification.
  • * When you post a code, you, your followees, and if you created the code using Fork, the forked parent code's author will be notified.
  • * When you edit your code again after 3hours later, you and your followees, the forked parent code's author and if there are "talk" about that code, those authors will be notified.
  • * When you add code to favorites, you and your followees, and the codes author will be notified.
  • * When you follow other users, you and your followees, and the user you followed will be notified.
  • * When you post "talk" about a code, you and your followees, and the author of the code you posted "talk" to, and other users who posted "talk" about the same code, will be notified.
Actionscript3 compiler version
Version 4.9.0 build 1425567 with playerglobal.swc for Flash Player 11.5
Actionscript3 libraries which you can use in your code
moved to libraries
About capture images
Taking a capture image of your Flash will be done automatically.
ONLY when you're editing your code, a fixed period of time(defaults to 3 seconds) after swf load complete, a capture of 'stage' will be taken and encoded to jpg, and sent to wonderfl's server.
jpg encoding is done synchronously, so swf framerate will temporary fall down. When you view your swf after editing complete, capture won't run.
Capturing is invisible from people just watching your swf.

To take a capture image, wonderfl automatically inserts this line into your code before compiling it (you won't see it).
Wonderfl.capture(stage);


Using a class named Wonderfl will break capturing, so don't try to.

If you don't want to see framerate fall down while editing, you can:
* customize capture timing, which is default 3 seconds
* disable capturing

See: Customizing Capture for interface spec.
How to use external resources?
When using external resources, you should take care of flash player's security sandbox.
Roughly speaking, when you load resources from another domain, flash player checks the resource is available or not by checking crossdomain.xml.
So What you need to do is,

1. check crossdomain.xml first (If not allowed, you cannot access any resources.)
2. If the crossdomain.xml allows swf.wonderfl.net or '*', you can download any resources. (note that you should take care of it's license)

Here are some code examples.
For more further details, there are documents(Adobe Flash Player 9 security white paper) from Adobe.
What is the SWF regulation at Wonderfl?
Top Level Package & Internal Classes
Wonderfl currently compiles only single ActionScript file. No package name is avaliable.

NG
package net.wonderfl {
}

OK
package {
}

To use multiple classes, you can declare internal classes outside of package {}.
Since the default access attribute is 'internal' you can ommit 'internal' keyword and simply declare these classes as following.

Main.as
package {
    import flash.display.Sprite;
    public class Main extends Sprite {
        public function Main() {
            new A();
        }
    }
}

A.as
package {
    public class A {
           .....    
    }
}

=>

package {
    import flash.display.Sprite;
    public class Main extends Sprite {
        public function Main() {
            new A();
        }
    }
}

class A {
       .....    
}


ExternalInterface is not available
We are planning to enable ExternalInterface, but ExternalInterface is not available for now.

List of Libraries
List of Libraries that can be used in your code is listed here.

Size of the flash
The default size is 465 x 465. You can enjoy fullscreen mode too.
How to start livecoding?
You can start live coding anytime when you press 'LIVE CODING' button placed at top left of the editor.



If live coding started correctly, time elapsed and the number of the viewers is displayed on the top of the editor.

How to enjoy chat feature
Chat feature is available for live coding mode. To use chat, start live coding first. When you start live coding, the chat UI shows up at the right side of the editor.



In the text input area of the chat UI, 'Enter' and 'Shift Enter' have special meanings.
Enter   Posts the current message of the text area.
Shift Enter   Breaks the line.

The input text area is resizable and you can hide/show chat UI by clicking 'Chat' button placed at the top of the chat UI.
What are the features of WonderflEditor?

Highlight Error Info
WonderflEditor communicates with the compiler and feeds back compilation error information as follows. The following example shows that the variable ‘v’ is not declared.
error highlighing

Auto Code Completion
WonderflEditor completes the name of methods, variables, classes. The shortcut assigned for Ctrl + Space(Cmd + Space). Here are some examples.

- If you type ‘adc’ and then type ‘Ctrl + Space’ in the document class, ‘addChild’ is listed in the completion menu. You can select the word from candidates by pressing up key and down key.
Press enter to complete the selected word in the code.
error highlighing

- If you declare a variable and type ‘:’ auto completion menu shows up. If you type ‘ldr’ after ‘:’, Loader is listed as a candidate.

Function Description
If you type function name and then type ‘(‘, the description of the function shows up in tooltip.

Hyperlink Insertion
WonderflEditor finds a string which matches to URL, underlines the match and add a hyperlink to it.

Jump to Definition & Go Back
By pressing F4, you can jump to the definition of variables & methods. By pressing Shift + F4, after jumping to the definition, you can back to the first position.

Find the Word
By pressing F3, you can jump to the next match of the word at cursor position. Shift F3 jumps to the previous match.

Keyboard Shortcuts
Some of the shortcuts may not available in the browsers like IE, which does not send Ctrl + Key keyboard events. (Ctrl + N is assigned for ‘new window’)
F3 jump to the next occurrence
Shift + F3 jump to the previous occurrence
F4 jump to the definition
Shift + F4 go back (after F4)
Ctrl + N next line (or next candidate for the completion menu)
Ctrl + P previuos line (or previous candidate for the completion menu)
Ctrl + F next char
Ctrl + B previous char
Ctrl + J new line

About license
The code your wrote in wonderfl belongs to you.

You're free to license your code.
But code sharing is a prerequisite for wonderfl,
so when you post any code, we assume you agreed to allow the following, even if you choose 'All rights reserved'.

* wonderfl service to redistribute your code and binary through wonderfl service
* other wonderfl users to use wonderfl's core feature: 'fork', to modify and merge your code

You can set a different license for each of your code,
and also set a default license for your future codes.

To set a license for your code, choose one from below while code editing:
* All Rights Reserved
* MIT License
* GPLv3 License
* other license, see code comments If you choose MIT License, you declare the license by showing a link to the full license text near the code (this is done by wonderfl service).
If you choose the 3rd option, show a link or all of the full license text in code comments by yourself.

When you fork other users code, the license of the new code will be the forked-parent-code's license.
You can't change your code's license after fork.
We think it's important not to violate somebody's license easily, than have convenience of changing license easily.

We also have some restrictions related to GPL license:
* If your code is non-GPL license, and imports GPL licensed libraries, your code license will automatically switch to GPL, and you'll see a message in the message area (where you see compiler error messages)
* If your code is GPL license, and imports GPL incompatible libraries, which means GPL license validation, you can't save your code
* If your code imports GPL libraries, you can't change your code license to any non GPL license.
Who made this?
KAYAC Inc.'s wonderfl team.

Director: kataoka
Assistant Director: takizawa
Designer: hashimoto
Markup Engineer: gunji
Programmer: ohtsuka
Programmer: sugi-yoshihiro
Flash Developer: kobayashi-taro
Special Thanks!
Thumbnail image generator assisted by HeartRails Capture. Thank you very much.
Contact
Looking for advertisements, and partners!
Do you have a product targeting wonderfl users?
or have any job offering for Flash developers?
or want to use wonderfl's Engine? or anything else.
Also waiting for any feature request.

Contact us at:
info@wonderfl.net

ページの先頭へ戻る