Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7501545
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T20:34:11+00:00 2026-05-29T20:34:11+00:00

Ok! I have a flashVar variable that is coming into Flash, its URL encoded

  • 0

Ok! I have a flashVar variable that is coming into Flash, its URL encoded but I have already decoded it. My problem is I want the set of variables to be pushed into an array.

Let’s say the variables are

“&text0=Enter Text…&size0=18&font0=Arial&color0=0&rotation0=0&y0=360&x0=640&text1=Enter
Text…&size1=18&font1=Arial&color1=0&rotation1=0&y1=360&x1=640”

and so on…

What I want is the variables to go into an array like

myArray[0].text = Enter Text...
myArray[0].size = 18]
myArray[0].font = Arial
myArray[0].color = 0
myArray[0].rotation = 0
myArray[0].y = 360
myArray[0].x = 640
myArray[1].text = ...........
.............................
.............................
myArray[n].text = ...........

I think there must be some way to do this. Most probably I’m thinking regular expression, but I’m pretty bad at regular expression. Please some help would be very very appreciated.

Thank You!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T20:34:15+00:00Added an answer on May 29, 2026 at 8:34 pm

    You don’t have to decode your query string, just use the URLVariables object – it will do all the decoding for you. Then iterate over its dynamic properties to create your array. Use a RegExp to find the index numbers at the end of your variable keys:

    function parseURLVariables( query:String ) : Array {
        var vars:URLVariables = new URLVariables (query);
        var arr:Array = [];
        for (var key : String in vars) {
            var splitIndex : int = key.search(/[0-9]+$/);
            var name:String = key.substr (0,splitIndex);
            var indexNumber:int = parseInt ( key.substr(splitIndex));
            arr[indexNumber] ||= {};
            arr[indexNumber][name] = vars[key];
        }
        return arr; 
    }
    

    Since your query string starts with a an ampersand, you might have to use parseURLVariables ( myString.substr(1)), otherwise the URLVariables object will throw an error, complaining that the query string is not valid (it has to be url encoded, and start with a variable key).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a flash object in my page that i want to make as
Does any know how to load a XML into a Flash file using FlashVar?
I have a flash movie that I need to get with javascript. Here is
The problem I'm having is that I have a block of JavaScript I've successfully
I have a flex app that I need to pass FlashVars into. It works
I have a flash game embedded on Facebook but need access to the flashvars
is there a way to trace an ARRAY in FLASH. I want to have
I have several bitmaps in my flash library that I have exported for Actionscript.
I have this flash object that is being displayed in the middle of the
I have a simple standalone application written in Visual Basic that I'm porting to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.