473,379 Members | 1,216 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

.NET and the Shockwave Flash Object COM Component

Hello,

I am trying to reference a Shockwave Flash Object on a vb code behind page
in an ASP.NET project and I receive the following error:

Guid should contain 32 digits with 4 dashes
(xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).

On the aspx page I have the object tag as follows:

<object id="FlashObj" name="FlashObj" runat="server"
classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="550" height="400" VIEWASTEXT>
<param name="movie" value="formatTest.swf">
<param name="quality" value="high">
<embed src="formatTest.swf" quality="high"
pluginspage="http://www.macromedia.com/go/getflashplayer"
type="application/x-shockwave-flash" width="550"
height="400"></embed></object>

On the code behind page I have:

Protected WithEvents FlashObj As ShockwaveFlashObjects.ShockwaveFlashClass

and then try to use the obeject in the following manner (on page load):

FlashObj.SetVariable("_root.testVar", "testvalue")

Any suggestions on what I'm doing wrong, or a better way to 'talk' back and
forth between .NET and Flash?

Thank you very much for your time.

Sincerely,

Keith


Jul 21 '05 #1
9 8536
If you are only attempting to add <param> tags within the object tag, then there is no need to use a Flash object in the code
behind. Just use an HtmlGeneric control and add the <param> tags as sub controls of type LiteralControl.

GL

--
Dave Sexton
dave@www..jwaonline..com
-----------------------------------------------------------------------
"Keith Rowe" <Ke*******@discussions.microsoft.com> wrote in message news:1C**********************************@microsof t.com...
Hello,

I am trying to reference a Shockwave Flash Object on a vb code behind page
in an ASP.NET project and I receive the following error:

Guid should contain 32 digits with 4 dashes
(xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).

On the aspx page I have the object tag as follows:

<object id="FlashObj" name="FlashObj" runat="server"
classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="550" height="400"
VIEWASTEXT>
<param name="movie" value="formatTest.swf">
<param name="quality" value="high">
<embed src="formatTest.swf" quality="high"
pluginspage="http://www.macromedia.com/go/getflashplayer"
type="application/x-shockwave-flash" width="550"
height="400"></embed></object>

On the code behind page I have:

Protected WithEvents FlashObj As ShockwaveFlashObjects.ShockwaveFlashClass

and then try to use the obeject in the following manner (on page load):

FlashObj.SetVariable("_root.testVar", "testvalue")

Any suggestions on what I'm doing wrong, or a better way to 'talk' back and
forth between .NET and Flash?

Thank you very much for your time.

Sincerely,

Keith

Jul 21 '05 #2
Dave,

Thanks for your reply.

I actually need to access the functions and methods of the ShockWave Object
in the code behind. I, at some point had declared in the code behind the
object as a generic html control, however I could not cast it to the
ShockWaveObj (it was a compile error). Do you have any other suggestions?

Again, thanks for your help.

-Keith
"Dave" wrote:
If you are only attempting to add <param> tags within the object tag, then there is no need to use a Flash object in the code
behind. Just use an HtmlGeneric control and add the <param> tags as sub controls of type LiteralControl.

GL

--
Dave Sexton
dave@www..jwaonline..com
-----------------------------------------------------------------------
"Keith Rowe" <Ke*******@discussions.microsoft.com> wrote in message news:1C**********************************@microsof t.com...
Hello,

I am trying to reference a Shockwave Flash Object on a vb code behind page
in an ASP.NET project and I receive the following error:

Guid should contain 32 digits with 4 dashes
(xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).

On the aspx page I have the object tag as follows:

<object id="FlashObj" name="FlashObj" runat="server"
classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="550" height="400"
VIEWASTEXT>
<param name="movie" value="formatTest.swf">
<param name="quality" value="high">
<embed src="formatTest.swf" quality="high"
pluginspage="http://www.macromedia.com/go/getflashplayer"
type="application/x-shockwave-flash" width="550"
height="400"></embed></object>

On the code behind page I have:

Protected WithEvents FlashObj As ShockwaveFlashObjects.ShockwaveFlashClass

and then try to use the obeject in the following manner (on page load):

FlashObj.SetVariable("_root.testVar", "testvalue")

Any suggestions on what I'm doing wrong, or a better way to 'talk' back and
forth between .NET and Flash?

Thank you very much for your time.

Sincerely,

Keith


Jul 21 '05 #3
> [i] declared in the code behind the
object as a generic html control, however I could not cast it to the
ShockWaveObj (it was a compile error).
This is because ShockWaveObj does not derive from HtmlGenericControl. Also, you won't be able to create an instance of Flash on the
server using the <object> tag because it doesn't derive from System.Web.UI.Control.

Are you attempting to interface with the Flash object on the web page?

If you need to invoke methods on the client instance of the Flash object (on the web page), then use scripting.
ActiveX uses <param> tags as a means for setting properties declaratively for runtime on the client without having to use COM.
Scripting will allow you to invoke methods on the Flash COM object after it is loaded into a web page. Just set the ID property of
the object, and use it in scripting as if it is the ShockWaveObj you speak of.

If you invoke methods on the Flash object in server-side code it is going to occur on the server. I just want to make sure that you
understand the difference. I'm not sure that invoking methods on the server would affect the client runtime environment of a Flash
object in the way that you expect it to.
I hope it helps :)
--
Dave Sexton
dave@www..jwaonline..com
-----------------------------------------------------------------------
"Keith Rowe" <Ke*******@discussions.microsoft.com> wrote in message news:93**********************************@microsof t.com... Dave,

Thanks for your reply.

I actually need to access the functions and methods of the ShockWave Object
in the code behind. I, at some point had declared in the code behind the
object as a generic html control, however I could not cast it to the
ShockWaveObj (it was a compile error). Do you have any other suggestions?

Again, thanks for your help.

-Keith
"Dave" wrote:
If you are only attempting to add <param> tags within the object tag, then there is no need to use a Flash object in the code
behind. Just use an HtmlGeneric control and add the <param> tags as sub controls of type LiteralControl.

GL

--
Dave Sexton
dave@www..jwaonline..com
-----------------------------------------------------------------------
"Keith Rowe" <Ke*******@discussions.microsoft.com> wrote in message news:1C**********************************@microsof t.com...
> Hello,
>
> I am trying to reference a Shockwave Flash Object on a vb code behind page
> in an ASP.NET project and I receive the following error:
>
> Guid should contain 32 digits with 4 dashes
> (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).
>
> On the aspx page I have the object tag as follows:
>
> <object id="FlashObj" name="FlashObj" runat="server"
> classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
> codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="550" height="400"
> VIEWASTEXT>
> <param name="movie" value="formatTest.swf">
> <param name="quality" value="high">
> <embed src="formatTest.swf" quality="high"
> pluginspage="http://www.macromedia.com/go/getflashplayer"
> type="application/x-shockwave-flash" width="550"
> height="400"></embed></object>
>
> On the code behind page I have:
>
> Protected WithEvents FlashObj As ShockwaveFlashObjects.ShockwaveFlashClass
>
> and then try to use the obeject in the following manner (on page load):
>
> FlashObj.SetVariable("_root.testVar", "testvalue")
>
> Any suggestions on what I'm doing wrong, or a better way to 'talk' back and
> forth between .NET and Flash?
>
> Thank you very much for your time.
>
> Sincerely,
>
> Keith
>
>
>
>


Jul 21 '05 #4
Dave,

What I ultimately want to do is set a param value or pass a value into this
shockwave object on page load. The value is dynamic. Do you have
suggestions on an alternate approach?

Thanks for all your help with this.

-Keith

"Dave" wrote:
[i] declared in the code behind the
object as a generic html control, however I could not cast it to the
ShockWaveObj (it was a compile error).


This is because ShockWaveObj does not derive from HtmlGenericControl. Also, you won't be able to create an instance of Flash on the
server using the <object> tag because it doesn't derive from System.Web.UI.Control.

Are you attempting to interface with the Flash object on the web page?

If you need to invoke methods on the client instance of the Flash object (on the web page), then use scripting.
ActiveX uses <param> tags as a means for setting properties declaratively for runtime on the client without having to use COM.
Scripting will allow you to invoke methods on the Flash COM object after it is loaded into a web page. Just set the ID property of
the object, and use it in scripting as if it is the ShockWaveObj you speak of.

If you invoke methods on the Flash object in server-side code it is going to occur on the server. I just want to make sure that you
understand the difference. I'm not sure that invoking methods on the server would affect the client runtime environment of a Flash
object in the way that you expect it to.
I hope it helps :)
--
Dave Sexton
dave@www..jwaonline..com
-----------------------------------------------------------------------
"Keith Rowe" <Ke*******@discussions.microsoft.com> wrote in message news:93**********************************@microsof t.com...
Dave,

Thanks for your reply.

I actually need to access the functions and methods of the ShockWave Object
in the code behind. I, at some point had declared in the code behind the
object as a generic html control, however I could not cast it to the
ShockWaveObj (it was a compile error). Do you have any other suggestions?

Again, thanks for your help.

-Keith
"Dave" wrote:
If you are only attempting to add <param> tags within the object tag, then there is no need to use a Flash object in the code
behind. Just use an HtmlGeneric control and add the <param> tags as sub controls of type LiteralControl.

GL

--
Dave Sexton
dave@www..jwaonline..com
-----------------------------------------------------------------------
"Keith Rowe" <Ke*******@discussions.microsoft.com> wrote in message news:1C**********************************@microsof t.com...
> Hello,
>
> I am trying to reference a Shockwave Flash Object on a vb code behind page
> in an ASP.NET project and I receive the following error:
>
> Guid should contain 32 digits with 4 dashes
> (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).
>
> On the aspx page I have the object tag as follows:
>
> <object id="FlashObj" name="FlashObj" runat="server"
> classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
> codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="550" height="400"
> VIEWASTEXT>
> <param name="movie" value="formatTest.swf">
> <param name="quality" value="high">
> <embed src="formatTest.swf" quality="high"
> pluginspage="http://www.macromedia.com/go/getflashplayer"
> type="application/x-shockwave-flash" width="550"
> height="400"></embed></object>
>
> On the code behind page I have:
>
> Protected WithEvents FlashObj As ShockwaveFlashObjects.ShockwaveFlashClass
>
> and then try to use the obeject in the following manner (on page load):
>
> FlashObj.SetVariable("_root.testVar", "testvalue")
>
> Any suggestions on what I'm doing wrong, or a better way to 'talk' back and
> forth between .NET and Flash?
>
> Thank you very much for your time.
>
> Sincerely,
>
> Keith
>
>
>
>


Jul 21 '05 #5
Review my original post which I believe addresses your need.

I will add to my original post by saying that the value you pass in may be dynamic, since it can be calculated on the server side
and emitted as HTML using the basic control implementation:

Having the following HTML...

<object id="FlashObj" name="FlashObj" runat="server"
classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"
width="550" height="400" >
<param name="movie" value="formatTest.swf">
<param name="quality" value="high">
</object>

....switch to Design View and VS.NET will add a property in the code behind for you. It will probably be Typed as
HtmlGenericControl:

private void System.Web.UI.HtmlControls.HtmlGenericControl FlashObj;

Now, you can do the following in the code-behind:

protected virtual void OnLoad(EventArgs e)
{
base.OnLoad(e);

HtmlGenericControl param = new HtmlGenericControl("PARAM");
FlashObj.Controls.Add(param);

param.Attributes["name"] = "dynamic_prop";
param.Attributes["value"] = "the value!";
}
When you compile this code and view it in a browser, if you click "View Source" you should see something close to the following at
the position in the page where you have the object HTML:

<object id="FlashObj" name="FlashObj" runat="server"
classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"
width="550" height="400" >
<param name="movie" value="formatTest.swf">
<param name="quality" value="high">
<param name="dynamic_prop" value="the value!"></object>
--
Dave Sexton
dave@www..jwaonline..com
-----------------------------------------------------------------------
"Keith Rowe" <Ke*******@discussions.microsoft.com> wrote in message news:3F**********************************@microsof t.com...
Dave,

What I ultimately want to do is set a param value or pass a value into this
shockwave object on page load. The value is dynamic. Do you have
suggestions on an alternate approach?

Thanks for all your help with this.

-Keith

"Dave" wrote:
> [i] declared in the code behind the
> object as a generic html control, however I could not cast it to the
> ShockWaveObj (it was a compile error).


This is because ShockWaveObj does not derive from HtmlGenericControl. Also, you won't be able to create an instance of Flash on
the
server using the <object> tag because it doesn't derive from System.Web.UI.Control.

Are you attempting to interface with the Flash object on the web page?

If you need to invoke methods on the client instance of the Flash object (on the web page), then use scripting.
ActiveX uses <param> tags as a means for setting properties declaratively for runtime on the client without having to use COM.
Scripting will allow you to invoke methods on the Flash COM object after it is loaded into a web page. Just set the ID property
of
the object, and use it in scripting as if it is the ShockWaveObj you speak of.

If you invoke methods on the Flash object in server-side code it is going to occur on the server. I just want to make sure that
you
understand the difference. I'm not sure that invoking methods on the server would affect the client runtime environment of a
Flash
object in the way that you expect it to.
I hope it helps :)
--
Dave Sexton
dave@www..jwaonline..com
-----------------------------------------------------------------------
"Keith Rowe" <Ke*******@discussions.microsoft.com> wrote in message news:93**********************************@microsof t.com...
> Dave,
>
> Thanks for your reply.
>
> I actually need to access the functions and methods of the ShockWave Object
> in the code behind. I, at some point had declared in the code behind the
> object as a generic html control, however I could not cast it to the
> ShockWaveObj (it was a compile error). Do you have any other suggestions?
>
> Again, thanks for your help.
>
> -Keith
>
>
> "Dave" wrote:
>
>> If you are only attempting to add <param> tags within the object tag, then there is no need to use a Flash object in the code
>> behind. Just use an HtmlGeneric control and add the <param> tags as sub controls of type LiteralControl.
>>
>> GL
>>
>> --
>> Dave Sexton
>> dave@www..jwaonline..com
>> -----------------------------------------------------------------------
>> "Keith Rowe" <Ke*******@discussions.microsoft.com> wrote in message news:1C**********************************@microsof t.com...
>> > Hello,
>> >
>> > I am trying to reference a Shockwave Flash Object on a vb code behind page
>> > in an ASP.NET project and I receive the following error:
>> >
>> > Guid should contain 32 digits with 4 dashes
>> > (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).
>> >
>> > On the aspx page I have the object tag as follows:
>> >
>> > <object id="FlashObj" name="FlashObj" runat="server"
>> > classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
>> > codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="550" height="400"
>> > VIEWASTEXT>
>> > <param name="movie" value="formatTest.swf">
>> > <param name="quality" value="high">
>> > <embed src="formatTest.swf" quality="high"
>> > pluginspage="http://www.macromedia.com/go/getflashplayer"
>> > type="application/x-shockwave-flash" width="550"
>> > height="400"></embed></object>
>> >
>> > On the code behind page I have:
>> >
>> > Protected WithEvents FlashObj As ShockwaveFlashObjects.ShockwaveFlashClass
>> >
>> > and then try to use the obeject in the following manner (on page load):
>> >
>> > FlashObj.SetVariable("_root.testVar", "testvalue")
>> >
>> > Any suggestions on what I'm doing wrong, or a better way to 'talk' back and
>> > forth between .NET and Flash?
>> >
>> > Thank you very much for your time.
>> >
>> > Sincerely,
>> >
>> > Keith
>> >
>> >
>> >
>> >
>>
>>
>>


Jul 21 '05 #6
Dave,

That solution makes sense to me, however, I still receive the GUID error
anytime I try to put the runat='server' tag on the object. If I take that
tag off, then I get a object reference not set to an instance of an object
(as one would expect trying to a reference an object on the codebhind that
does not have a runat='server' tag). Do you have any ideas on what causes
the guid error?

-Keith

"Dave" wrote:
Review my original post which I believe addresses your need.

I will add to my original post by saying that the value you pass in may be dynamic, since it can be calculated on the server side
and emitted as HTML using the basic control implementation:

Having the following HTML...

<object id="FlashObj" name="FlashObj" runat="server"
classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"
width="550" height="400" >
<param name="movie" value="formatTest.swf">
<param name="quality" value="high">
</object>

....switch to Design View and VS.NET will add a property in the code behind for you. It will probably be Typed as
HtmlGenericControl:

private void System.Web.UI.HtmlControls.HtmlGenericControl FlashObj;

Now, you can do the following in the code-behind:

protected virtual void OnLoad(EventArgs e)
{
base.OnLoad(e);

HtmlGenericControl param = new HtmlGenericControl("PARAM");
FlashObj.Controls.Add(param);

param.Attributes["name"] = "dynamic_prop";
param.Attributes["value"] = "the value!";
}
When you compile this code and view it in a browser, if you click "View Source" you should see something close to the following at
the position in the page where you have the object HTML:

<object id="FlashObj" name="FlashObj" runat="server"
classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"
width="550" height="400" >
<param name="movie" value="formatTest.swf">
<param name="quality" value="high">
<param name="dynamic_prop" value="the value!"></object>
--
Dave Sexton
dave@www..jwaonline..com
-----------------------------------------------------------------------
"Keith Rowe" <Ke*******@discussions.microsoft.com> wrote in message news:3F**********************************@microsof t.com...
Dave,

What I ultimately want to do is set a param value or pass a value into this
shockwave object on page load. The value is dynamic. Do you have
suggestions on an alternate approach?

Thanks for all your help with this.

-Keith

"Dave" wrote:
> [i] declared in the code behind the
> object as a generic html control, however I could not cast it to the
> ShockWaveObj (it was a compile error).

This is because ShockWaveObj does not derive from HtmlGenericControl. Also, you won't be able to create an instance of Flash on
the
server using the <object> tag because it doesn't derive from System.Web.UI.Control.

Are you attempting to interface with the Flash object on the web page?

If you need to invoke methods on the client instance of the Flash object (on the web page), then use scripting.
ActiveX uses <param> tags as a means for setting properties declaratively for runtime on the client without having to use COM.
Scripting will allow you to invoke methods on the Flash COM object after it is loaded into a web page. Just set the ID property
of
the object, and use it in scripting as if it is the ShockWaveObj you speak of.

If you invoke methods on the Flash object in server-side code it is going to occur on the server. I just want to make sure that
you
understand the difference. I'm not sure that invoking methods on the server would affect the client runtime environment of a
Flash
object in the way that you expect it to.
I hope it helps :)
--
Dave Sexton
dave@www..jwaonline..com
-----------------------------------------------------------------------
"Keith Rowe" <Ke*******@discussions.microsoft.com> wrote in message news:93**********************************@microsof t.com...
> Dave,
>
> Thanks for your reply.
>
> I actually need to access the functions and methods of the ShockWave Object
> in the code behind. I, at some point had declared in the code behind the
> object as a generic html control, however I could not cast it to the
> ShockWaveObj (it was a compile error). Do you have any other suggestions?
>
> Again, thanks for your help.
>
> -Keith
>
>
> "Dave" wrote:
>
>> If you are only attempting to add <param> tags within the object tag, then there is no need to use a Flash object in the code
>> behind. Just use an HtmlGeneric control and add the <param> tags as sub controls of type LiteralControl.
>>
>> GL
>>
>> --
>> Dave Sexton
>> dave@www..jwaonline..com
>> -----------------------------------------------------------------------
>> "Keith Rowe" <Ke*******@discussions.microsoft.com> wrote in message news:1C**********************************@microsof t.com...
>> > Hello,
>> >
>> > I am trying to reference a Shockwave Flash Object on a vb code behind page
>> > in an ASP.NET project and I receive the following error:
>> >
>> > Guid should contain 32 digits with 4 dashes
>> > (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).
>> >
>> > On the aspx page I have the object tag as follows:
>> >
>> > <object id="FlashObj" name="FlashObj" runat="server"
>> > classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
>> > codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="550" height="400"
>> > VIEWASTEXT>
>> > <param name="movie" value="formatTest.swf">
>> > <param name="quality" value="high">
>> > <embed src="formatTest.swf" quality="high"
>> > pluginspage="http://www.macromedia.com/go/getflashplayer"
>> > type="application/x-shockwave-flash" width="550"
>> > height="400"></embed></object>
>> >
>> > On the code behind page I have:
>> >
>> > Protected WithEvents FlashObj As ShockwaveFlashObjects.ShockwaveFlashClass
>> >
>> > and then try to use the obeject in the following manner (on page load):
>> >
>> > FlashObj.SetVariable("_root.testVar", "testvalue")
>> >
>> > Any suggestions on what I'm doing wrong, or a better way to 'talk' back and
>> > forth between .NET and Flash?
>> >
>> > Thank you very much for your time.
>> >
>> > Sincerely,
>> >
>> > Keith
>> >
>> >
>> >
>> >
>>
>>
>>


Jul 21 '05 #7
I made a test web page to try out my solution and was supprised to find that I had the same error as you. To solve the GUID error,
you'll see the problem in the design view of the page that contains the object tag. Open it in design view, and check out the
properties window for the object itself. Notice the Clsid property in the window appears as:

clsid:clsid:D27CDB6E-AE6D-11cf-96B8-444553540000

This is obviously invalid.

Apparrently since the designer shows objects at design time, the "object" tag is a special tag that is parsed immediately and cannot
be ran on the server as an object. This means you can't use runat="server". Here is a different solution, although sloppy it will
do the trick:

Instead of adding an object tag to the HTML, add the following:

<asp:PlaceHolder Runat="server" ID="FlashObj" EnableViewState="False"></asp:PlaceHolder>
Open the form in the designer so that it creates a declaration for the placeholder control in the code-behind, or enter it manually:

protected System.Web.UI.WebControls.PlaceHolder FlashObj;

Add this code into your Page_Load event handler:

HtmlGenericControl flash = new HtmlGenericControl("OBJECT");
flash.Attributes["clsid"] = "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000";
flash.Attributes["codebase"] = "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0";
flash.Attributes["width"] = "550";
flash.Attributes["height"] = "400";

HtmlGenericControl param = new HtmlGenericControl("PARAM");
param.Attributes["name"] = "movie";
param.Attributes["value"] = "formatTest.swf";
flash.Controls.Add(param);

param = new HtmlGenericControl("PARAM");
param.Attributes["name"] = "quality";
param.Attributes["value"] = "high";
flash.Controls.Add(param);

LiteralControl embed = new LiteralControl(@"
<embed src=""formatTest.swf"" quality=""high""
pluginspage=""http://www.macromedia.com/go/getflashplayer""
type=""application/x-shockwave-flash"" width=""550""
height=""400""></embed>
");

flash.Controls.Add(embed);

FlashObj.Controls.Add(flash);
As you can see, you may now add as many parameters as you would like to, and the designer will not change the state of your HTML. I
tested this implementation and it worked for me.

--
Dave Sexton
dave@www..jwaonline..com
-----------------------------------------------------------------------
"Keith Rowe" <Ke*******@discussions.microsoft.com> wrote in message news:5F**********************************@microsof t.com...
Dave,

That solution makes sense to me, however, I still receive the GUID error
anytime I try to put the runat='server' tag on the object. If I take that
tag off, then I get a object reference not set to an instance of an object
(as one would expect trying to a reference an object on the codebhind that
does not have a runat='server' tag). Do you have any ideas on what causes
the guid error?

-Keith

"Dave" wrote:
Review my original post which I believe addresses your need.

I will add to my original post by saying that the value you pass in may be dynamic, since it can be calculated on the server side
and emitted as HTML using the basic control implementation:

Having the following HTML...

<object id="FlashObj" name="FlashObj" runat="server"
classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"
width="550" height="400" >
<param name="movie" value="formatTest.swf">
<param name="quality" value="high">
</object>

....switch to Design View and VS.NET will add a property in the code behind for you. It will probably be Typed as
HtmlGenericControl:

private void System.Web.UI.HtmlControls.HtmlGenericControl FlashObj;

Now, you can do the following in the code-behind:

protected virtual void OnLoad(EventArgs e)
{
base.OnLoad(e);

HtmlGenericControl param = new HtmlGenericControl("PARAM");
FlashObj.Controls.Add(param);

param.Attributes["name"] = "dynamic_prop";
param.Attributes["value"] = "the value!";
}
When you compile this code and view it in a browser, if you click "View Source" you should see something close to the following
at
the position in the page where you have the object HTML:

<object id="FlashObj" name="FlashObj" runat="server"
classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"
width="550" height="400" >
<param name="movie" value="formatTest.swf">
<param name="quality" value="high">
<param name="dynamic_prop" value="the value!"></object>
--
Dave Sexton
dave@www..jwaonline..com
-----------------------------------------------------------------------
"Keith Rowe" <Ke*******@discussions.microsoft.com> wrote in message news:3F**********************************@microsof t.com...
> Dave,
>
> What I ultimately want to do is set a param value or pass a value into this
> shockwave object on page load. The value is dynamic. Do you have
> suggestions on an alternate approach?
>
> Thanks for all your help with this.
>
> -Keith
>
> "Dave" wrote:
>
>> > [i] declared in the code behind the
>> > object as a generic html control, however I could not cast it to the
>> > ShockWaveObj (it was a compile error).
>>
>> This is because ShockWaveObj does not derive from HtmlGenericControl. Also, you won't be able to create an instance of Flash
>> on
>> the
>> server using the <object> tag because it doesn't derive from System.Web.UI.Control.
>>
>> Are you attempting to interface with the Flash object on the web page?
>>
>> If you need to invoke methods on the client instance of the Flash object (on the web page), then use scripting.
>> ActiveX uses <param> tags as a means for setting properties declaratively for runtime on the client without having to use COM.
>> Scripting will allow you to invoke methods on the Flash COM object after it is loaded into a web page. Just set the ID
>> property
>> of
>> the object, and use it in scripting as if it is the ShockWaveObj you speak of.
>>
>> If you invoke methods on the Flash object in server-side code it is going to occur on the server. I just want to make sure
>> that
>> you
>> understand the difference. I'm not sure that invoking methods on the server would affect the client runtime environment of a
>> Flash
>> object in the way that you expect it to.
>>
>>
>> I hope it helps :)
>>
>>
>> --
>> Dave Sexton
>> dave@www..jwaonline..com
>> -----------------------------------------------------------------------
>> "Keith Rowe" <Ke*******@discussions.microsoft.com> wrote in message news:93**********************************@microsof t.com...
>> > Dave,
>> >
>> > Thanks for your reply.
>> >
>> > I actually need to access the functions and methods of the ShockWave Object
>> > in the code behind. I, at some point had declared in the code behind the
>> > object as a generic html control, however I could not cast it to the
>> > ShockWaveObj (it was a compile error). Do you have any other suggestions?
>> >
>> > Again, thanks for your help.
>> >
>> > -Keith
>> >
>> >
>> > "Dave" wrote:
>> >
>> >> If you are only attempting to add <param> tags within the object tag, then there is no need to use a Flash object in the
>> >> code
>> >> behind. Just use an HtmlGeneric control and add the <param> tags as sub controls of type LiteralControl.
>> >>
>> >> GL
>> >>
>> >> --
>> >> Dave Sexton
>> >> dave@www..jwaonline..com
>> >> -----------------------------------------------------------------------
>> >> "Keith Rowe" <Ke*******@discussions.microsoft.com> wrote in message
>> >> news:1C**********************************@microsof t.com...
>> >> > Hello,
>> >> >
>> >> > I am trying to reference a Shockwave Flash Object on a vb code behind page
>> >> > in an ASP.NET project and I receive the following error:
>> >> >
>> >> > Guid should contain 32 digits with 4 dashes
>> >> > (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).
>> >> >
>> >> > On the aspx page I have the object tag as follows:
>> >> >
>> >> > <object id="FlashObj" name="FlashObj" runat="server"
>> >> > classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
>> >> > codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="550" height="400"
>> >> > VIEWASTEXT>
>> >> > <param name="movie" value="formatTest.swf">
>> >> > <param name="quality" value="high">
>> >> > <embed src="formatTest.swf" quality="high"
>> >> > pluginspage="http://www.macromedia.com/go/getflashplayer"
>> >> > type="application/x-shockwave-flash" width="550"
>> >> > height="400"></embed></object>
>> >> >
>> >> > On the code behind page I have:
>> >> >
>> >> > Protected WithEvents FlashObj As ShockwaveFlashObjects.ShockwaveFlashClass
>> >> >
>> >> > and then try to use the obeject in the following manner (on page load):
>> >> >
>> >> > FlashObj.SetVariable("_root.testVar", "testvalue")
>> >> >
>> >> > Any suggestions on what I'm doing wrong, or a better way to 'talk' back and
>> >> > forth between .NET and Flash?
>> >> >
>> >> > Thank you very much for your time.
>> >> >
>> >> > Sincerely,
>> >> >
>> >> > Keith
>> >> >
>> >> >
>> >> >
>> >> >
>> >>
>> >>
>> >>
>>
>>
>>


Jul 21 '05 #8
Dave,

That works just fine, thanks!

Now, the next level is, I need to be able to pass/set a variable to this
object when a user clicks a button. Is this possible? Rather, is it
possible to do this before the value the user entered in the flash object is
cleared out on the page reload?

-Keith

"Dave" wrote:
I made a test web page to try out my solution and was supprised to find that I had the same error as you. To solve the GUID error,
you'll see the problem in the design view of the page that contains the object tag. Open it in design view, and check out the
properties window for the object itself. Notice the Clsid property in the window appears as:

clsid:clsid:D27CDB6E-AE6D-11cf-96B8-444553540000

This is obviously invalid.

Apparrently since the designer shows objects at design time, the "object" tag is a special tag that is parsed immediately and cannot
be ran on the server as an object. This means you can't use runat="server". Here is a different solution, although sloppy it will
do the trick:

Instead of adding an object tag to the HTML, add the following:

<asp:PlaceHolder Runat="server" ID="FlashObj" EnableViewState="False"></asp:PlaceHolder>
Open the form in the designer so that it creates a declaration for the placeholder control in the code-behind, or enter it manually:

protected System.Web.UI.WebControls.PlaceHolder FlashObj;

Add this code into your Page_Load event handler:

HtmlGenericControl flash = new HtmlGenericControl("OBJECT");
flash.Attributes["clsid"] = "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000";
flash.Attributes["codebase"] = "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0";
flash.Attributes["width"] = "550";
flash.Attributes["height"] = "400";

HtmlGenericControl param = new HtmlGenericControl("PARAM");
param.Attributes["name"] = "movie";
param.Attributes["value"] = "formatTest.swf";
flash.Controls.Add(param);

param = new HtmlGenericControl("PARAM");
param.Attributes["name"] = "quality";
param.Attributes["value"] = "high";
flash.Controls.Add(param);

LiteralControl embed = new LiteralControl(@"
<embed src=""formatTest.swf"" quality=""high""
pluginspage=""http://www.macromedia.com/go/getflashplayer""
type=""application/x-shockwave-flash"" width=""550""
height=""400""></embed>
");

flash.Controls.Add(embed);

FlashObj.Controls.Add(flash);
As you can see, you may now add as many parameters as you would like to, and the designer will not change the state of your HTML. I
tested this implementation and it worked for me.

--
Dave Sexton
dave@www..jwaonline..com
-----------------------------------------------------------------------
"Keith Rowe" <Ke*******@discussions.microsoft.com> wrote in message news:5F**********************************@microsof t.com...
Dave,

That solution makes sense to me, however, I still receive the GUID error
anytime I try to put the runat='server' tag on the object. If I take that
tag off, then I get a object reference not set to an instance of an object
(as one would expect trying to a reference an object on the codebhind that
does not have a runat='server' tag). Do you have any ideas on what causes
the guid error?

-Keith

"Dave" wrote:
Review my original post which I believe addresses your need.

I will add to my original post by saying that the value you pass in may be dynamic, since it can be calculated on the server side
and emitted as HTML using the basic control implementation:

Having the following HTML...

<object id="FlashObj" name="FlashObj" runat="server"
classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"
width="550" height="400" >
<param name="movie" value="formatTest.swf">
<param name="quality" value="high">
</object>

....switch to Design View and VS.NET will add a property in the code behind for you. It will probably be Typed as
HtmlGenericControl:

private void System.Web.UI.HtmlControls.HtmlGenericControl FlashObj;

Now, you can do the following in the code-behind:

protected virtual void OnLoad(EventArgs e)
{
base.OnLoad(e);

HtmlGenericControl param = new HtmlGenericControl("PARAM");
FlashObj.Controls.Add(param);

param.Attributes["name"] = "dynamic_prop";
param.Attributes["value"] = "the value!";
}
When you compile this code and view it in a browser, if you click "View Source" you should see something close to the following
at
the position in the page where you have the object HTML:

<object id="FlashObj" name="FlashObj" runat="server"
classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"
width="550" height="400" >
<param name="movie" value="formatTest.swf">
<param name="quality" value="high">
<param name="dynamic_prop" value="the value!"></object>
--
Dave Sexton
dave@www..jwaonline..com
-----------------------------------------------------------------------
"Keith Rowe" <Ke*******@discussions.microsoft.com> wrote in message news:3F**********************************@microsof t.com...
> Dave,
>
> What I ultimately want to do is set a param value or pass a value into this
> shockwave object on page load. The value is dynamic. Do you have
> suggestions on an alternate approach?
>
> Thanks for all your help with this.
>
> -Keith
>
> "Dave" wrote:
>
>> > [i] declared in the code behind the
>> > object as a generic html control, however I could not cast it to the
>> > ShockWaveObj (it was a compile error).
>>
>> This is because ShockWaveObj does not derive from HtmlGenericControl. Also, you won't be able to create an instance of Flash
>> on
>> the
>> server using the <object> tag because it doesn't derive from System.Web.UI.Control.
>>
>> Are you attempting to interface with the Flash object on the web page?
>>
>> If you need to invoke methods on the client instance of the Flash object (on the web page), then use scripting.
>> ActiveX uses <param> tags as a means for setting properties declaratively for runtime on the client without having to use COM.
>> Scripting will allow you to invoke methods on the Flash COM object after it is loaded into a web page. Just set the ID
>> property
>> of
>> the object, and use it in scripting as if it is the ShockWaveObj you speak of.
>>
>> If you invoke methods on the Flash object in server-side code it is going to occur on the server. I just want to make sure
>> that
>> you
>> understand the difference. I'm not sure that invoking methods on the server would affect the client runtime environment of a
>> Flash
>> object in the way that you expect it to.
>>
>>
>> I hope it helps :)
>>
>>
>> --
>> Dave Sexton
>> dave@www..jwaonline..com
>> -----------------------------------------------------------------------
>> "Keith Rowe" <Ke*******@discussions.microsoft.com> wrote in message news:93**********************************@microsof t.com...
>> > Dave,
>> >
>> > Thanks for your reply.
>> >
>> > I actually need to access the functions and methods of the ShockWave Object
>> > in the code behind. I, at some point had declared in the code behind the
>> > object as a generic html control, however I could not cast it to the
>> > ShockWaveObj (it was a compile error). Do you have any other suggestions?
>> >
>> > Again, thanks for your help.
>> >
>> > -Keith
>> >
>> >
>> > "Dave" wrote:
>> >
>> >> If you are only attempting to add <param> tags within the object tag, then there is no need to use a Flash object in the
>> >> code
>> >> behind. Just use an HtmlGeneric control and add the <param> tags as sub controls of type LiteralControl.
>> >>
>> >> GL
>> >>
>> >> --
>> >> Dave Sexton
>> >> dave@www..jwaonline..com
>> >> -----------------------------------------------------------------------
>> >> "Keith Rowe" <Ke*******@discussions.microsoft.com> wrote in message
>> >> news:1C**********************************@microsof t.com...
>> >> > Hello,
>> >> >
>> >> > I am trying to reference a Shockwave Flash Object on a vb code behind page
>> >> > in an ASP.NET project and I receive the following error:
>> >> >
>> >> > Guid should contain 32 digits with 4 dashes
>> >> > (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).
>> >> >
>> >> > On the aspx page I have the object tag as follows:
>> >> >
>> >> > <object id="FlashObj" name="FlashObj" runat="server"
>> >> > classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
>> >> > codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="550" height="400"
>> >> > VIEWASTEXT>
>> >> > <param name="movie" value="formatTest.swf">
>> >> > <param name="quality" value="high">
>> >> > <embed src="formatTest.swf" quality="high"
>> >> > pluginspage="http://www.macromedia.com/go/getflashplayer"
>> >> > type="application/x-shockwave-flash" width="550"
>> >> > height="400"></embed></object>
>> >> >
>> >> > On the code behind page I have:
>> >> >
>> >> > Protected WithEvents FlashObj As ShockwaveFlashObjects.ShockwaveFlashClass
>> >> >
>> >> > and then try to use the obeject in the following manner (on page load):
>> >> >
>> >> > FlashObj.SetVariable("_root.testVar", "testvalue")
>> >> >
>> >> > Any suggestions on what I'm doing wrong, or a better way to 'talk' back and
>> >> > forth between .NET and Flash?
>> >> >
>> >> > Thank you very much for your time.
>> >> >
>> >> > Sincerely,
>> >> >
>> >> > Keith
>> >> >
>> >> >
>> >> >
>> >> >
>> >>
>> >>
>> >>
>>
>>
>>


Jul 21 '05 #9
I would recommend that you code against the flash object on the client (using scripting). You'll have to look into scripting
against the flash COM object... I'm sure it can be done using JavaScript or VBScript.

Handle the onclick event in the browser (no post-back) using scripting for the "button" you speak of and then "talk" to flash and do
what's required by your app. Again, you'll have to research how you can communicate with Flash via scripting.

--
Dave Sexton
dave@www..jwaonline..com
-----------------------------------------------------------------------
"Keith Rowe" <Ke*******@discussions.microsoft.com> wrote in message news:D1**********************************@microsof t.com...
Dave,

That works just fine, thanks!

Now, the next level is, I need to be able to pass/set a variable to this
object when a user clicks a button. Is this possible? Rather, is it
possible to do this before the value the user entered in the flash object is
cleared out on the page reload?

-Keith

"Dave" wrote:
I made a test web page to try out my solution and was supprised to find that I had the same error as you. To solve the GUID
error,
you'll see the problem in the design view of the page that contains the object tag. Open it in design view, and check out the
properties window for the object itself. Notice the Clsid property in the window appears as:

clsid:clsid:D27CDB6E-AE6D-11cf-96B8-444553540000

This is obviously invalid.

Apparrently since the designer shows objects at design time, the "object" tag is a special tag that is parsed immediately and
cannot
be ran on the server as an object. This means you can't use runat="server". Here is a different solution, although sloppy it
will
do the trick:

Instead of adding an object tag to the HTML, add the following:

<asp:PlaceHolder Runat="server" ID="FlashObj" EnableViewState="False"></asp:PlaceHolder>
Open the form in the designer so that it creates a declaration for the placeholder control in the code-behind, or enter it
manually:

protected System.Web.UI.WebControls.PlaceHolder FlashObj;

Add this code into your Page_Load event handler:

HtmlGenericControl flash = new HtmlGenericControl("OBJECT");
flash.Attributes["clsid"] = "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000";
flash.Attributes["codebase"] = "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0";
flash.Attributes["width"] = "550";
flash.Attributes["height"] = "400";

HtmlGenericControl param = new HtmlGenericControl("PARAM");
param.Attributes["name"] = "movie";
param.Attributes["value"] = "formatTest.swf";
flash.Controls.Add(param);

param = new HtmlGenericControl("PARAM");
param.Attributes["name"] = "quality";
param.Attributes["value"] = "high";
flash.Controls.Add(param);

LiteralControl embed = new LiteralControl(@"
<embed src=""formatTest.swf"" quality=""high""
pluginspage=""http://www.macromedia.com/go/getflashplayer""
type=""application/x-shockwave-flash"" width=""550""
height=""400""></embed>
");

flash.Controls.Add(embed);

FlashObj.Controls.Add(flash);
As you can see, you may now add as many parameters as you would like to, and the designer will not change the state of your HTML.
I
tested this implementation and it worked for me.

--
Dave Sexton
dave@www..jwaonline..com
-----------------------------------------------------------------------
"Keith Rowe" <Ke*******@discussions.microsoft.com> wrote in message news:5F**********************************@microsof t.com...
> Dave,
>
> That solution makes sense to me, however, I still receive the GUID error
> anytime I try to put the runat='server' tag on the object. If I take that
> tag off, then I get a object reference not set to an instance of an object
> (as one would expect trying to a reference an object on the codebhind that
> does not have a runat='server' tag). Do you have any ideas on what causes
> the guid error?
>
> -Keith
>
> "Dave" wrote:
>
>> Review my original post which I believe addresses your need.
>>
>> I will add to my original post by saying that the value you pass in may be dynamic, since it can be calculated on the server
>> side
>> and emitted as HTML using the basic control implementation:
>>
>> Having the following HTML...
>>
>> <object id="FlashObj" name="FlashObj" runat="server"
>> classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
>> codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"
>> width="550" height="400" >
>> <param name="movie" value="formatTest.swf">
>> <param name="quality" value="high">
>> </object>
>>
>> ....switch to Design View and VS.NET will add a property in the code behind for you. It will probably be Typed as
>> HtmlGenericControl:
>>
>> private void System.Web.UI.HtmlControls.HtmlGenericControl FlashObj;
>>
>> Now, you can do the following in the code-behind:
>>
>> protected virtual void OnLoad(EventArgs e)
>> {
>> base.OnLoad(e);
>>
>> HtmlGenericControl param = new HtmlGenericControl("PARAM");
>> FlashObj.Controls.Add(param);
>>
>> param.Attributes["name"] = "dynamic_prop";
>> param.Attributes["value"] = "the value!";
>> }
>>
>>
>> When you compile this code and view it in a browser, if you click "View Source" you should see something close to the
>> following
>> at
>> the position in the page where you have the object HTML:
>>
>> <object id="FlashObj" name="FlashObj" runat="server"
>> classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
>> codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"
>> width="550" height="400" >
>> <param name="movie" value="formatTest.swf">
>> <param name="quality" value="high">
>> <param name="dynamic_prop" value="the value!"></object>
>>
>>
>> --
>> Dave Sexton
>> dave@www..jwaonline..com
>> -----------------------------------------------------------------------
>> "Keith Rowe" <Ke*******@discussions.microsoft.com> wrote in message news:3F**********************************@microsof t.com...
>> > Dave,
>> >
>> > What I ultimately want to do is set a param value or pass a value into this
>> > shockwave object on page load. The value is dynamic. Do you have
>> > suggestions on an alternate approach?
>> >
>> > Thanks for all your help with this.
>> >
>> > -Keith
>> >
>> > "Dave" wrote:
>> >
>> >> > [i] declared in the code behind the
>> >> > object as a generic html control, however I could not cast it to the
>> >> > ShockWaveObj (it was a compile error).
>> >>
>> >> This is because ShockWaveObj does not derive from HtmlGenericControl. Also, you won't be able to create an instance of
>> >> Flash
>> >> on
>> >> the
>> >> server using the <object> tag because it doesn't derive from System.Web.UI.Control.
>> >>
>> >> Are you attempting to interface with the Flash object on the web page?
>> >>
>> >> If you need to invoke methods on the client instance of the Flash object (on the web page), then use scripting.
>> >> ActiveX uses <param> tags as a means for setting properties declaratively for runtime on the client without having to use
>> >> COM.
>> >> Scripting will allow you to invoke methods on the Flash COM object after it is loaded into a web page. Just set the ID
>> >> property
>> >> of
>> >> the object, and use it in scripting as if it is the ShockWaveObj you speak of.
>> >>
>> >> If you invoke methods on the Flash object in server-side code it is going to occur on the server. I just want to make sure
>> >> that
>> >> you
>> >> understand the difference. I'm not sure that invoking methods on the server would affect the client runtime environment of
>> >> a
>> >> Flash
>> >> object in the way that you expect it to.
>> >>
>> >>
>> >> I hope it helps :)
>> >>
>> >>
>> >> --
>> >> Dave Sexton
>> >> dave@www..jwaonline..com
>> >> -----------------------------------------------------------------------
>> >> "Keith Rowe" <Ke*******@discussions.microsoft.com> wrote in message
>> >> news:93**********************************@microsof t.com...
>> >> > Dave,
>> >> >
>> >> > Thanks for your reply.
>> >> >
>> >> > I actually need to access the functions and methods of the ShockWave Object
>> >> > in the code behind. I, at some point had declared in the code behind the
>> >> > object as a generic html control, however I could not cast it to the
>> >> > ShockWaveObj (it was a compile error). Do you have any other suggestions?
>> >> >
>> >> > Again, thanks for your help.
>> >> >
>> >> > -Keith
>> >> >
>> >> >
>> >> > "Dave" wrote:
>> >> >
>> >> >> If you are only attempting to add <param> tags within the object tag, then there is no need to use a Flash object in the
>> >> >> code
>> >> >> behind. Just use an HtmlGeneric control and add the <param> tags as sub controls of type LiteralControl.
>> >> >>
>> >> >> GL
>> >> >>
>> >> >> --
>> >> >> Dave Sexton
>> >> >> dave@www..jwaonline..com
>> >> >> -----------------------------------------------------------------------
>> >> >> "Keith Rowe" <Ke*******@discussions.microsoft.com> wrote in message
>> >> >> news:1C**********************************@microsof t.com...
>> >> >> > Hello,
>> >> >> >
>> >> >> > I am trying to reference a Shockwave Flash Object on a vb code behind page
>> >> >> > in an ASP.NET project and I receive the following error:
>> >> >> >
>> >> >> > Guid should contain 32 digits with 4 dashes
>> >> >> > (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).
>> >> >> >
>> >> >> > On the aspx page I have the object tag as follows:
>> >> >> >
>> >> >> > <object id="FlashObj" name="FlashObj" runat="server"
>> >> >> > classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
>> >> >> > codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="550"
>> >> >> > height="400"
>> >> >> > VIEWASTEXT>
>> >> >> > <param name="movie" value="formatTest.swf">
>> >> >> > <param name="quality" value="high">
>> >> >> > <embed src="formatTest.swf" quality="high"
>> >> >> > pluginspage="http://www.macromedia.com/go/getflashplayer"
>> >> >> > type="application/x-shockwave-flash" width="550"
>> >> >> > height="400"></embed></object>
>> >> >> >
>> >> >> > On the code behind page I have:
>> >> >> >
>> >> >> > Protected WithEvents FlashObj As ShockwaveFlashObjects.ShockwaveFlashClass
>> >> >> >
>> >> >> > and then try to use the obeject in the following manner (on page load):
>> >> >> >
>> >> >> > FlashObj.SetVariable("_root.testVar", "testvalue")
>> >> >> >
>> >> >> > Any suggestions on what I'm doing wrong, or a better way to 'talk' back and
>> >> >> > forth between .NET and Flash?
>> >> >> >
>> >> >> > Thank you very much for your time.
>> >> >> >
>> >> >> > Sincerely,
>> >> >> >
>> >> >> > Keith
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >>
>> >> >>
>> >> >>
>> >>
>> >>
>> >>
>>
>>
>>


Jul 21 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Maansi Sanghi | last post by:
Hi everyone, Please excuse this basic question. (1) I have created a Setup and Deployment project and one of the dialog boxes uses a shockwave flash object (2) I am using Visual Studio .NET...
1
by: Darren | last post by:
Hi Groups, Simple Task: Embed flash/shockwave swf into an aspx page. Problem: Visual Studio does not recognize attributes: pluginspage, quality, or type. Generates msg: Could not find any...
0
by: news.microsoft.com | last post by:
Using:: VB .Net 2002 I keep getting errors when running a compiled form with a shockwaveflash object on it (works fine when I run it within the development environment. I was using the...
9
by: Keith Rowe | last post by:
Hello, I am trying to reference a Shockwave Flash Object on a vb code behind page in an ASP.NET project and I receive the following error: Guid should contain 32 digits with 4 dashes...
0
by: rwakelan | last post by:
I am having a strange problem with the shockwave flash object (look at rwakelan.googlepages.com/flash.html to find out how to get it in a project). The easiest way to recreate the error is to: ...
5
by: UJ | last post by:
I have a program that uses the Shockwave Flash Objects (ShockwaveFlashObjects) to display a SWF. Everything works fine. When IE7 is installed on the machine, suddenly we get an 'Invalid char line...
0
by: wbosw | last post by:
Shockwave Flash Object Com Component -------------------------------------------------------------------------------- I'm trying to import the Shockwave Flash Object from the Com Component...
0
by: kimiraikkonen | last post by:
Hi, First i faced that bug in VB.NET 2005 then saw the "same" in Visual C# .NET 2005. If you try to insert a "shockwave flash object" to your project you get error message. The shortest solution...
2
dream party
by: dream party | last post by:
Inserting a Flash (SWF, FLV) file into HTML web page is already an old and familiar thing to all of us. It is a rather non-flexible thing that just to edit some options in the template. However, I...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.