Sign in to follow this  
Followers 0
cageman

flash function for array?

10 posts in this topic

I want to read out an array from my flash file. Its really big so i prefer to get just the elements i want. Is this possible? It seems the method

GetVariable() only gets me the whole array in this form:

2,1,2,1,1,1,2,2,1,1,2,9,5,51,2,12,1313,1 etc.

and its not possible to call it with GetVariable("array[12][12]")?

If im doing nothing wrong is there any other way to get the desired result?

thx for any help :P

Share this post


Link to post
Share on other sites



if it isnt possible can any1 tell me :P ?

Share this post


Link to post
Share on other sites

I want to read out an array from my flash file. Its really big so i prefer to get just the elements i want. Is this possible? It seems the method

GetVariable() only gets me the whole array in this form:

2,1,2,1,1,1,2,2,1,1,2,9,5,51,2,12,1313,1 etc.

and its not possible to call it with GetVariable("array[12][12]")?

If im doing nothing wrong is there any other way to get the desired result?

thx for any help :unsure:

First, don't bump your topic before waiting 24 hours.

Next, explain what you are talking about: What is GetVariable()? Is that a function you wrote? Why didn't you post it?

Next, array references only work on array variables. If you have a variable named "array", then in AutoIt syntax you would use a dollar sign in front of it: $array[12][12]

That reference only works if there is already an array variable named "array" with exactly two dimensions, and at least 13 rows and columns (since they are 0-based).

:P


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

sorry for the early bump.

im trying to get some variables out of a flashfile like this:

Global $oRP = ObjCreate("ShockwaveFlash.ShockwaveFlash.1")
GUICreate ("Flash", 820, 700, -1, -1)
$GUIActiveX = GUICtrlCreateObj( $oRP, 10, 10 , 800 , 580)

With $oRP
    .bgcolor = "#ffffff"
    .Movie = 'http://somesite.com/someflashfile.swf'
    .ScaleMode = 2
    .Loop = False
    .wmode = "Opaque"
    .FlashVars = ""
EndWith

$array=$oRP.GetVariable("array")
While
    $msg = GUIGetMsg()
    If $msg = $GUI_EVENT_CLOSE Then
        ExitLoop
    EndIf

WEnd
$oRP = 0

So the function GetVariable comes from

A shockwaveFlash object.

the only problem is i don't want the whole array but just 1 element out of it. Since its very very large.

the function getvariable() needs a string as input thats why i used "array" instead of the normal way you just described. On the internet i can't find any information about getting elements of arrays out of a flash file. So im hoping someone here got more knowledge then my search skills or the skills of the whole internet :P

i didn't give alot of information sorry for that.

Edited by cageman

Share this post


Link to post
Share on other sites

sorry for the early bump.

im trying to get some variables out of a flashfile like this:

Global $oRP = ObjCreate("ShockwaveFlash.ShockwaveFlash.1")
GUICreate ("Flash", 820, 700, -1, -1)
$GUIActiveX = GUICtrlCreateObj( $oRP, 10, 10 , 800 , 580)

With $oRP
    .bgcolor = "#ffffff"
    .Movie = 'http://somesite.com/someflashfile.swf'
    .ScaleMode = 2
    .Loop = False
    .wmode = "Opaque"
    .FlashVars = ""
EndWith

$array=$oRP.GetVariable("array")
While
    $msg = GUIGetMsg()
    If $msg = $GUI_EVENT_CLOSE Then
        ExitLoop
    EndIf

WEnd
$oRP = 0

So the function GetVariable comes from

A shockwaveFlash object.

the only problem is i don't want the whole array but just 1 element out of it. Since its very very large.

the function getvariable() needs a string as input thats why i used "array" instead of the normal way you just described. On the internet i can't find any information about getting elements of arrays out of a flash file. So im hoping someone here got more knowledge then my search skills or the skills of the whole internet :unsure:

i didn't give alot of information sorry for that.

The code makes it much more clear!

The variable "array" is internal to flash. If there is a syntax for getting a single element with the .GetVariable() method, then that's a Flash API question, not an AutoIt question.

If you do retrieve the entire array into an AutoIt variable, then $array[12][12] (for example) will work in your script:

$array=$oRP.GetVariable("array")
MsgBox(64, "Test", "Value returned in array = " & $array[12][12])

:P


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

somehow it doesn't return a array , but this:

2,1,2,abs,100,80,70013 etc..

Stringsplit could do the work ofc. but the main problem right now is to just get 1 element at once since getting the array takes too much time + cpu

Is it possible to implement flash api in autoit somehow or it this too hard for a basic coder like me?

Edited by cageman

Share this post


Link to post
Share on other sites

somehow it doesn't return a array , but this:

2,1,2,abs,100,80,70013 etc..

Stringsplit could do the work ofc. but the main problem right now is to just get 1 element at once since getting the array takes too much time + cpu

Is it possible to implement flash api in autoit somehow or it this too hard for a basic coder like me?

There is no magic in AutoIt. If Flash offers a COM interface (like the one in your code), then AutoIt can use it. If that interface doesn't allow addressing elements in an array, then you're done.

Again, this is not an AutoIt question. What you need is a Flash API forum somewhere, where you can ask how to address an array element. Once you know that, we can probably figure out how to use it in AutoIt.

There are other APIs where you can get elements with something like $oRP.GetVariable("array").Value(12), but I just made that up and it probably won't work.

You'll have to ask somewhere else what that syntax might be in Flash.

:P


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

ok i figured it out :P

its too simple :S

for a 2d-array:

$oRP.getvariable("array.1231.12")

that works.

might help others.

Share this post


Link to post
Share on other sites

ok i figured it out :unsure:

its too simple :S

for a 2d-array:

$oRP.getvariable("array.1231.12")

that works.

might help others.

Cool! :P

Did you just try things until you hit it, or did you find a site describing the interface?

If the later, please post a link so others can check it out.

:D


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

i googled a flashhacking site and asked a question there, but i dont think you like such links in here. but those guys know how to do it :P

if any1 needs help with that just pm me

Edited by cageman

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0