469,903 Members | 1,803 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,903 developers. It's quick & easy.

embedding a flash file

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_mR3y4x7BaHrIsA2V8j5MoYYcT y0&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?

Feb 17 '07 #1
3 2825
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

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"fn*****@gmail.com" wrote:
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_mR3y4x7BaHrIsA2V8j5MoYYcT y0&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?

Feb 17 '07 #2
On Feb 17, 7:19 am, "fnus...@gmail.com" <fnus...@gmail.comwrote:
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_mR3y4x7BaHrIsA2V8j5MoYYcT y0&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/AllControlsSa...omControl.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

--
http://ajaxwidgets.com
ASP.NET 2.0 Ajax Widgets

Feb 17 '07 #3
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" wrote:
On Feb 17, 7:19 am, "fnus...@gmail.com" <fnus...@gmail.comwrote:
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_mR3y4x7BaHrIsA2V8j5MoYYcT y0&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/AllControlsSa...omControl.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

--
http://ajaxwidgets.com
ASP.NET 2.0 Ajax Widgets

Apr 25 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by b_naick | last post: by
3 posts views Thread by Buggyman | last post: by
3 posts views Thread by Ollie Riches | last post: by
reply views Thread by fnustle | last post: by
5 posts views Thread by Barrie Wilson | last post: by
1 post views Thread by Chris72205 | last post: by
1 post views Thread by Waqarahmed | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.