PDA

View Full Version : Flash and VB Object Passing


jeittreim
10-11-2003, 03:56 AM
Hi all, I am in desperate need of help!!!! I am working on creating an interactive CD for a client. This CD will allow a person to bring up a floorplan of a house, have a selection of a number of options that change the floorplan, and be able to drag and drop wall outlets to various places on the image. All of this is basic and mostly done already, the problem I have is when it comes to saving all of this information to a file on the disk and be able to retrieve it again and work more on it.

Now, my first thought was to setup a socket and pass everything XML, but this being a interactive CD, I figured that was a cheezy and crappy way of doing it. Currently I have written my own application players in 3 different languages trying to see which one handles things the best. C#, VB .Net, and J#.

HOW CAN I SAVE ALL OF THE VARIABLES, OBJECTS, IMAGES, and the general state of the SWF movie to a file and then re-open it again at a future date!?!?!?

Through all of my searching, finding information about interaction between Flash MX and .NET 2003 has been almost non-existent!!! I have only figured out very rudimentary things by playing with it.


Any help would be greatly appreciated as I am falling-apart-at-my-wits-end!!!!!


Thanks a million in advance for any help at all!!!

Billy T
10-11-2003, 04:51 AM
so you want to store the data on the users comp? have you looked into Shared Objects?

CyanBlue
10-11-2003, 05:01 AM
Howdy and Welcome... ;)

I've done the prototype of the project that you just described a while ago... Mine was for the web deployment, so I was dealing with server side script to save the user data... But you are talking about the CD projector and you cannot guarantee 100% that the user will be playing with the projector while he is online or not... So, your best bet is either go by what Billy T said, Shared Object, which should suffice what you are looking for, or go by those third party projector tools such as SWFStudio or JTools and such if you want to add some bells and whistles... ;)

Unfortunately, my prototype never went off to the public since we couldn't find good and reasonable way to import several hundred house floorplans to the program automatically... :(

jeittreim
10-11-2003, 05:02 AM
I am not really understanding how to work with the shared objects, and the problem comes up that if I have 1 floorplan with 23 options and 15 possible outlets with a variable xy position, how do I save those out to a single file and location? what would be the easiest way to send objects to VB if it is my player? also, I noticed that when you debug a movie, you can browse an entire tree with all of the current values/objects/and variables that are loaded. Is is possible to capture this information durring runtime and save that out to an XML file and later restore it from the file and resume the movie from that point?


Quick second note, I am also trying to setup to print the finished floorplan, but the way it loads, it has images on different levels and from different movies that comprise the image. is there a way of "Snapshotting" this and sending it to the printer?


Sorry so long winded :-) Thanks so much for your reply

jeittreim
10-11-2003, 05:14 AM
Hey thanks for the info Cyan :D now at least I don't think I am barking up the wrong tree here :-) I thought about doing this entire project using C# and cad image files, but the interface wouldn't be very "Spectacular" and I kinda feel that its about time we start seeing a lot more creativity in program looks.. Me being a lover of Flash, I couldn't resist, so I have built my own projector in VB, C#, as well as J#. They run great although I am still working out major bugs and there are very little features outside of the generic FLASH 6 player.

CyanBlue
10-11-2003, 05:24 AM
Well... As for the usage of the Shared Object, there are many tutorials out there... Check out our tutorials section and Macromedia's site to see several easy working versions... ;)

As for saving data to any sort of external device... You can make a string out of the data you want to save and send it to wherever it should be handed to... You can send out the data object directly if you go with the Shared Object though...
If you make string out of the data, you will probably need to parse the data back to savable data format...

Um... Just out of curiosity... Why do you build your own flash projector in other languages??? Can you briefly tell us the reason??? Besides, those languages C# or J# sounds like server side script to me... (VB goes either way, right???) Now, that's where I got lost... What do you mean by creating projector via the server side script??? :confused:

jeittreim
10-11-2003, 05:29 AM
because I am creating this as a stand alone program, I am compiling everything into a single executable. the application I am making will act as the player and backend and Flash is providing the front-end interface. hopefully everything will be net and browser independent.

jeittreim
10-11-2003, 05:31 AM
as far as C# and J# goes, I messed around with j# just out of curiosity, (not really happy with the results) but I am really likeing C# because it gives me a lot of the core capabilities and syntax I am used to in C while still having a "Java" feel to it.

CyanBlue
10-11-2003, 05:37 AM
Hm... So, C# or J# can create EXE file that encapsulate the Flash SWF file in it??? I really hated to see that I had to use third party tools to create EXE file from the Java files to deploy the project...
Any plan for some introduction of your projector to the public??? ;)

Okay... Got one question...
Is there any way you can access the content(value) of the text field within your projector??? If there is a way you can access the value of the text field, then you can just grab it from the C# and then save it to the text file, maybe??? (I thought that's one way of doing it in VB IIRC...)

Oh... You have multiple posts a couple of posts up there... Please delete one if you don't mind... ;)