embedding a flash file

F

fnustle

I've embedded a flash file into an assembly:

[assembly: WebResourceAttribute("Namespace.main.swf", "application/x-
shockwave-flash")]

But when I try to reference it on a web page:

<object codebase="http://download.macromedia.com/pub/shockwave/
cabs/flash/swflash.cab"
height="100" width="100" classid="clsid:D27CDB6E-
AE6D-11cf-96B8-444553540000">
<param name="src" value="/WebResource.axd?d=bYC1eHVfsX9X-
yIbBHXWbUVMFGQVvrZPQF0kP_mR3y4x7BaHrIsA2V8j5MoYYcTy0&amp;t=633072522039375000">
</object>

it never loads. The page just times out.

When I try to load the resource directly in the browser it shows that
the content-type is not set and that the content-length is 0.

I know the webresource string is correct and pointing to an existing
resource because it works for an image file.

Is this a known issue or am I doing something wrong?
 
G

Guest

There's more to it than that. You need to put an attribute into your
AssemblyInfo file, example:

[assembly: WebResource(webResource, contentType, performSubstitution)]

There is more information in the documentation for WebResource.axd, as well
as a couple of good articles by third parties if you care to search.
Peter
 
T

Thomas Hansen

I've embedded a flash file into an assembly:

[assembly: WebResourceAttribute("Namespace.main.swf", "application/x-
shockwave-flash")]

But when I try to reference it on a web page:

<object codebase="http://download.macromedia.com/pub/shockwave/
cabs/flash/swflash.cab"
height="100" width="100" classid="clsid:D27CDB6E-
AE6D-11cf-96B8-444553540000">
<param name="src" value="/WebResource.axd?d=bYC1eHVfsX9X-
yIbBHXWbUVMFGQVvrZPQF0kP_mR3y4x7BaHrIsA2V8j5MoYYcTy0&amp;t=6330725220393750­00">
</object>

it never loads. The page just times out.

There's a couple of steps you need to take to make sure you're able to
spit out resource files from compiled resources...
One of them is the assembly:WebResource attribute...
Another is NAMESPACE!
This would be the namespace of your application plus the FOLDERS your
files resides within...
The last point CANNOT be stressed enough!
I'll be willing to bet a couple of ORGANS that this is your
problem...!!

A good example I know about is one of the sample extensions controls
in Gaia (e.g. http://ajaxwidgets.com/AllControlsSamples/CustomControl.aspx
)
If you download Gaia Ajax Widgets and check out any of the "extension
controls" you'll be able to see a working sample of spitting out a
JavaScript file to the browser from a compiled resource...

..t
 
G

Guest

Hello!

I Have the same problem!
In my project i work with a lot of resources, SWF is the only that DON't WORK.

I try to use PerformSubstitution = true, and don't work too...
There is SOME PROBLEM HERE.

And please, anwser if you know, if you have experienced that....
SWF types are not working,,,
CSS, JS, .... All work correctly!!

I think that when the SWF is embedded in the DLL, one problem occours...

Thank You for your time, Please help me!


Thomas Hansen said:
I've embedded a flash file into an assembly:

[assembly: WebResourceAttribute("Namespace.main.swf", "application/x-
shockwave-flash")]

But when I try to reference it on a web page:

<object codebase="http://download.macromedia.com/pub/shockwave/
cabs/flash/swflash.cab"
height="100" width="100" classid="clsid:D27CDB6E-
AE6D-11cf-96B8-444553540000">
<param name="src" value="/WebResource.axd?d=bYC1eHVfsX9X-
yIbBHXWbUVMFGQVvrZPQF0kP_mR3y4x7BaHrIsA2V8j5MoYYcTy0&t=6330725220393750­00">
</object>

it never loads. The page just times out.

There's a couple of steps you need to take to make sure you're able to
spit out resource files from compiled resources...
One of them is the assembly:WebResource attribute...
Another is NAMESPACE!
This would be the namespace of your application plus the FOLDERS your
files resides within...
The last point CANNOT be stressed enough!
I'll be willing to bet a couple of ORGANS that this is your
problem...!!

A good example I know about is one of the sample extensions controls
in Gaia (e.g. http://ajaxwidgets.com/AllControlsSamples/CustomControl.aspx
)
If you download Gaia Ajax Widgets and check out any of the "extension
controls" you'll be able to see a working sample of spitting out a
JavaScript file to the browser from a compiled resource...

..t
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top