MySQL to ActionScript Converter
Transform MySQL database dumps into ActionScript data structures for Flash and AIR applications
MySQL Input
Convert MySQL to other formats
ActionScript Output
Related Tools
MySQL to ASCII
Convert MySQL database dumps to ASCII table format with borders and alignment
MySQL to AsciiDoc
Convert MySQL CREATE TABLE and INSERT statements to AsciiDoc table markup
MySQL to ASP
Convert MySQL database dumps to ASP arrays and ADO recordsets for Classic ASP
MySQL to Avro
Convert MySQL CREATE TABLE and INSERT statements to Apache Avro schema and data format
MySQL to BBCode
Convert MySQL database dumps to BBCode table format for forums
MySQL to CSV
Convert MySQL CREATE TABLE and INSERT statements to CSV format with customizable delimiters
About MySQL to ActionScript Converter
Convert MySQL database dumps (CREATE TABLE and INSERT statements) to ActionScript arrays and objects. Perfect for migrating database data to Flash and Adobe AIR applications.
Key Features
- Multiple Output Formats: Array of objects (with property names) or array of arrays (values only)
- Smart Parsing: Extracts table structure and data from CREATE TABLE and INSERT statements
- Type Detection: Automatically detects numeric values, strings, and NULL values
- Column Name Extraction: Preserves column names from CREATE TABLE or INSERT INTO statements
- Quote Handling: Properly escapes quotes in string values
- File Upload: Upload .sql files directly
- Instant Preview: Real-time conversion as you type
- Copy & Download: Easy export as .as file
How to Use
- Input MySQL Data: Paste your MySQL CREATE TABLE and INSERT statements or upload a .sql file
- Choose Format: Select between objects (with keys) or arrays (values only)
- Review Output: The ActionScript code updates automatically
- Copy or Download: Use the Copy or Download button to save your ActionScript code
Output Formats
Array of Objects (with keys):
var data:Array = [
{id: 1, name: "John Doe", age: 28, city: "New York"},
{id: 2, name: "Jane Smith", age: 34, city: "London"}
]; Array of Arrays (values only):
var data:Array = [ [1, "John Doe", 28, "New York"], [2, "Jane Smith", 34, "London"] ]; // Column headers: id, name, age, city
Supported MySQL Syntax
- CREATE TABLE: Extracts column names and structure
- INSERT INTO: Parses data values from INSERT statements
- Data Types: Handles VARCHAR, INT, DECIMAL, TEXT, DATE, etc.
- NULL Values: Converts SQL NULL to ActionScript null
- Quoted Strings: Handles single and double quotes with proper escaping
Common Use Cases
- Flash Applications: Import database data into Flash games and apps
- Adobe AIR: Migrate MySQL data to AIR desktop applications
- Data Migration: Convert database dumps to ActionScript format
- Testing: Generate test data for ActionScript applications
- Prototyping: Quickly create data structures from database schemas
- Legacy Systems: Maintain Flash/Flex applications with database data
ActionScript Data Types
- Numbers: MySQL INT, DECIMAL → ActionScript Number
- Strings: MySQL VARCHAR, TEXT → ActionScript String (quoted)
- NULL: MySQL NULL → ActionScript null
- Arrays: All data wrapped in ActionScript Array type
Tips for Best Results
- Include both CREATE TABLE and INSERT statements for best column name detection
- Use objects format when you need named properties for easy access
- Use arrays format for smaller file size and faster parsing
- Ensure your SQL dump uses standard MySQL syntax
- Check for proper quote escaping in string values
- Test the generated ActionScript code in your Flash/AIR environment
FAQ
- Does this tool support multiple INSERT statements?
Yes. You can paste multiple INSERT statements and the converter will process all of them into a single ActionScript array.
- Do I need both CREATE TABLE and INSERT statements?
No, but it is recommended. If CREATE TABLE is missing, the tool will try to infer column names from the INSERT statement or generate generic names like column1, column2, etc.
- How are NULL values handled?
SQL NULL values are converted to ActionScript
nullso they behave as empty values in your code. - Can I change the variable name from
datato something else?The generated code uses
var data:Arrayby default. You can safely renamedatato any variable name you prefer after copying the output. - Does this tool send my SQL data to a server?
No. All parsing and conversion happen entirely in your browser. Your MySQL data never leaves your device.
Privacy & Security
All conversions happen locally in your browser. Your MySQL data is never uploaded to any server, ensuring complete privacy and security.
