MySQL to ActionScript Converter
Transform MySQL database dumps into ActionScript data structures for Flash and AIR applications
MySQL Input
ActionScript Output
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
Privacy & Security
All conversions happen locally in your browser. Your MySQL data is never uploaded to any server, ensuring complete privacy and security.
