Flash Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignFlash Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old September 4th, 2003, 02:06 AM
bayravin bayravin is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 1 bayravin User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Help !! Where does Flash keep the array from VB ??

Somebody HELP me !!! I am a newbie.

I am using Flash in VB. I am sending a series of SETVARIABLE from VB in a loop in the form of an array like vbarray[i],value(i).

Flash Module:

Only one timeline with one frame.

I am able to view the value[i] when I assign a textbox to the variable of vbarray[i]. So, vb is sending the array and its values properly, and Flash is receiving them.

Since I am unable to find out where Flash saves this array that it receives from VB, I am unable to access this array for using in code.

I have tried using _root.vbarray[i], _level0._root.vbarray[i], still the vbarray.length shows zero.

I am unable to use my debugger and thus unable to track it.

I am willing to send the fla file if necessary

Thanks much.

Reply With Quote
  #2  
Old September 4th, 2003, 11:42 AM
mushie mushie is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 58 mushie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
http://forums.devshed.com/t80389/s.html

check that, may help. i know nothing about VB.

flash expects data in the format

variable_name="blah"&variable_value="bling bling"

so if you have an array, you will need to send it back as a string constructed by whatever back end, like

variable_name0="blah"&variable_value0="bling bling"&variable_name1="blah"&variable_value1="bling bling"&num_rows=2

then loop through the data using the num of returned rows, a bit of a pain i know, but the only way i think it can be done
__________________
beware of geeks bearing animated gifs.

Reply With Quote
  #3  
Old September 22nd, 2003, 01:43 PM
cyberdad cyberdad is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 2 cyberdad User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Talking Passing Arrays Directly - Not Possible

There is no straight way to pass a complete array from VB to Flash using 'SetVariable'. Instead, you should try passing the Array as a 'String' into Flash and then Parse this 'String - Array'.

For Example:
VB Part___________________________________
Dim myArray(4)
Dim stringArray
myArray(1) = "This"
myArray(1) = "is"
myArray(1) = "my"
myArray(1) = "array"

For i = 0 to myArray.Count - 1
stringArray = stringArray & myArray(i) & "," 'Note: "," = delimeter
Next i

Call myShockwaveFlash.SetVariable("myTextFieldReceiver",stringArray)

Actionscript Part_____________________________
//You should add a Listener to the TextField (never use the 'onChanged' Event as it only works with direct keyboard entries) receiving the values from VB. In Fact you could as well discard the TextField and just use a plain variable with a Listener attached to it. Sorry, no time to show you how..(

var myParsedArray = new Array;
myParsedArray = myTextFieldReceiver.split(",");
//Works for 1-dimension Arrays - For 2-Dimensional Arrays just use a For-Next Loop for Second Level Parsing.
//Now myParsedArray should contain all values needed.
//Parsing is really annoying and time consuming but there is no other way of doing it (except XML over a connection or Flash Remoting - both online - no Desktop App Methods). There is also another interesting way of passing actionscript objects (like arrays) in binary mode but you have to use a swf constructor engine (quite complicated but interesting)... Cheers...

Reply With Quote
  #4  
Old September 22nd, 2003, 01:46 PM
cyberdad cyberdad is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 2 cyberdad User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Talking Correction!

...

myArray(0) = "This"
myArray(1) = "is"
myArray(2) = "my"
myArray(3) = "array"

...

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignFlash Help > Help !! Where does Flash keep the array from VB ??


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway