all groups > macromedia flash flash remoting > january 2004 >
You're in the

macromedia flash flash remoting

group:

Flash Remoting The Deffinative Guide .NET assemblies


Re: Flash Remoting The Deffinative Guide .NET assemblies Tom Muck
1/12/2004 4:22:01 PM
macromedia flash flash remoting: [quoted text, click to view]
gives fails to compile. Specifically the lines with FlashGatewau.IO and
ASObject through up compilation errors (see next)
[quoted text, click to view]
missing a using directive or an assembly reference?

I'm not a .NET guy, and I didn't do the .NET chapter, but it sounds like you
need to put a reference to the flashgateway.dll in your project before
compiling.

Thanks for the kind words on the book. FYI, I set up a newsgroup for
book-related questions: news://tom-muck.com/flash_remoting


--
---------------------------------------------------------------
Tom Muck
author -- Flash Remoting: The Definitive Guide
http://www.flash-remoting.com/notablog

Team Macromedia Volunteer for Flash

Extending Knowledge, Daily
http://www.communityMX.com/

Flash Remoting The Deffinative Guide .NET assemblies peterR_H
1/12/2004 4:42:25 PM
Hi all, bit of a remoting /.NET question here.

using System;
using FlashGateway.IO;

namespace com.oreilly.frdg {
public class BookAssembly {
public ASObject GetBook() {
ASObject aso = new ASObject();
aso.ASType = "Book";
aso.Add("title", "FRDG");
aso.Add("author", "Tom Much");
aso.Add("price", "39.99");

// return our new object back to the remoting
// gateway
return aso;
}
}
}

I'm working through Tom Mucks excellent 'Flash Remoting the Definitive Guide' book, and specifically the .NET chapters.

In Chapter 8 (page 302) there's and example for receiving complex data types from remoting using ObjectRegisterClass. The Flash side of it I understand, however I'm having trouble with the .NET assembly.

I'm using #Develop to code and compile the .dll, and the example the Tom gives fails to compile. Specifically the lines with FlashGatewau.IO and ASObject through up compilation errors (see next)

e.g
The type or namespace name 'FlashGateway' could not be found (are you missing a using directive or an assembly reference?

This is clearly looking for the FlashGatewya Library, which must have the Class constructor for ASObject.

The example Tom gives look strait fwd:



The two lines that throw up the errors are clearly Flash remoting specific, so it has me puzzled as to how to get this to compile (It compiles ok if I comment the two lines out - but obviously then doesn?t work when connected to via Flash)

My copy of #Develop is local, but loading projects from a network development box, which is the .NET server, with Flash Remoting installed.

I even tried installing #Develop on the server (it?s a play box) and trying to compile there, but no luck.

Anybody got any pointers to help me ? I realize this is probably more suited to a .NET list, but I figured there must be some folks on this list who have this book and tackled this example all ready.

Is this perhaps just a #Develop thing ?

Pete


Re: Flash Remoting The Deffinative Guide .NET assemblies peterR_H
1/13/2004 9:21:11 AM
Update.

Thank Tom, your correct on this. I did a bit more digging around, even using the command line compiler to try to build the .dll, to no avail.

I'll do some more digging and post back here for the sake of the archives.

Re: Flash Remoting The Deffinative Guide .NET assemblies peterR_H
1/13/2004 10:54:18 AM
For the sake of the Archives.

Just inserting the 'using' statement is not enough [Lesson learned there :) ]

In #Develop (and I can only presume any other development tool such as Visual Studio) you need to include a fully qualified reference to the Flashgateway.dll, so it knows where to look. To add a reference do the following

Then select add... from the pop up menu.

navigate to references and right click
Select Add New Reference
Select the .NET Assembly Browser tab
Using the bowse button locate and select the Flashgateway.dll file in the Flashremoting folder of your web root - most commonly C:\Inetpub\wwwroot\flashremoting\bin

The build then compiles correctly

cheers for the help Tom

AddThis Social Bookmark Button