xml elements loading on embed - actionscript-3

This might be a stupid question but for some reason in my swf app, the images that are supposed to load from xml just aren't when embedded, but when the .swf is visited from it's url, it works fine.
In other words when i visit
localhost/project/swf/myswf.swf < loads xml fine
But if it's embedded like
<embed src="/project/swf/myswf.swf"></embed>
That loads the swf, but none of the images load from xml in it.
At first I thought it had to do with the url being loaded in actionscript. The file structure of the swf folder would be like:
/swf
/elements
- images
- images
- images, etc.
elements.xml
myswf.swf
so the swf is loading images from the elements folder after reading their url in the xml.
I changed the AS for the xml url to just "elements.xml" to the full url, and it didn't help, what could cause the problem?

Related

How to embed swf file in floating iframe on website via. bookmarklet?

I am a high schooler & a novice to bookmarklets. I want a bookmarklet that can make a floating iframe on top of a website with a .swf file as it's contents. I've tried many solutions, but a major obstacle is that simply pasting the .swf link as an iframe content ("https://cdn.jsdelivr.net/gh/shirtjs/gstore#v1/cubefield_24.swf". I know, it's stupid.) just downloads the swf file, as we are using moderated chromebooks. Can somebody provide me a bookmarklet code that makes this?
"...But a major obstacle is that simply pasting the .swf URL link as an iframe content just downloads the swf file, as we are using moderated chromebooks."
This has nothing to do with moderators. As a software security issue, Chrome does not accept/load direct links to SWF files unless the link is inside a media tag like <object> or <embed>.
(maybe) solution:
Consider your current <iframe> line...
<iframe src="https://cdn.jsdelivr.net/gh/shirtjs/gstore#v1/cubefield_24.swf"></iframe>
Replace with <embed>code...
<embed src="https://cdn.jsdelivr.net/gh/shirtjs/gstore#v1/cubefield_24.swf" width="550" height="400">

Swf is not showing on chrome when it loads images from external XML source

I have a swf file that's not working on chrome but works fine on other web browsers
you can test the flash from this url:
http://www.flawless-creativity.com/lifewindow/public/test-flash
In the as3 code I have a urlloader object that loads this xml file and handles it to show this slider:
http://www.flawless-creativity.com/lifewindow/public/services-xml
So I know the problem isn't in the as3 and not in the html embed code (I tried every embed code on the internet!), my only guess is that chrome doesn't allow swf files to load urls maybe for security... If that's true then how to solve this? Does the domain have to be trusted by google? And how to make google trust it?
I solved the problem ... In the as3 I added an enter_frame event listener , and in the event handler I started loading the xml URL

Flash will not load images if it is embedded into a website

I have just finished making a flash banner in Fl5 and have embedded it into my website.
I can view it in my browser by going directly to the file however when it is embedded the photos will not load. The images it loads has to be in the same directory as the .swf file and as i stated it clearly works when going directly to the file but not once it has been embedded.
If someone else has had this issue or knows how to fix it, please help me
Thank You.
the directory of where the flash file can be found is:
http://tinyurl.com/6q5pu79
the website address is:
http://tinyurl.com/7x7nzz3
C
The paths you specify for the images in your code are by default relative to the HTML file where they are embedded (if you go directly to the swf, they're relative to the swf). You can fix that by using the base parameter when you embed.
Add a param in your HTML:
<param name="base" value="banner" />
... inside both <object> elements.
That tells FlashPlayer that relative paths in your code are relative to the "banner" directory rather than the directory where the HTML file is.

Fancybox flash parameters

I am using fancybox within a html page and I am calling an flv file via a swf file, plays fine locally and works via the web, the problem is that I need to link all of my assets with remote urls as I need to host the html elsewhere. So html hosted on server A and assets on server B. So my thoughts turn to adding the flash parameter to the query.fancybox-1.3.4.pack.js file and this is where I get stuck.
http://www.myofficeheadset.com/video.html
I've located the object tag in the query.fancybox-1.3.4.pack.js file I just need to add the allowScriptAccess parameter
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+e.width+'" height="'+e.height+'"><param name="movie" value="'+c+
'"></param>';P="";b.each(e.swf,function(x,H){C+='<param name="'+x+'" value="'+H+'"></param>';P+=" "+x+'="'+H+'"'});C+='<embed src="'+c+'" type="application/x-shockwave-flash" width="'+e.width+'" height="'+e.height+'"'+P+"></embed></object>
Any help would be much appreciated
Justin
Using the video player within Flash usually loads the movie content dynamically from another location or file. It seems like the flash is loading perfectly fine, but it can not find the movie to load. You should make the path to this movie inside the swf an absolute path, as the relative directory changes based on where the swf is loaded into.

Playing audio file in jsp

1) Is there a way in java to stream an audio file from ftp on my jsp page?
2) How can I play an audio file in jsp without audio file being download on client browser (like live stream) - temporary internet files
please help with some code example
Streaming audio from a file does not have anything to do with the JSP itself.
You want to embed your audio file into the page using HTML tags. You can do this directly like:
<embed src="audiofile.mp3">
Or build something a bit more fancy using a Flash movie as an audio player, or find a JavaScript library. Here is a page on how to do it with various methods.
The JSP can provide the audio file name and perhaps other options, but that's all it has to do -- the rest is handled by plain old HTML tags.
You can find more information by searching the Web for the terms "embed" and "audio".
If you're already on HTML5, just use <audio> element, See also the HTML Dog tutorial.
<audio src="file.wav" controls="true" />
If you're not on HTML5 yet, audio in a webbpage is usually to be included by the HTML <embed> element (which uses the platform default player) or the HTML <object> element (wherein you can specify a more specific player for which the webbrowser can eventually automagically download the necessary plugin software).
<object data="file.wav" />
Either way, it should point to an URL which returns the audio stream. This can be just a static file in the public webcontent, next to the JSP file. E.g. http://example.com/context/file.wav. But when the audio file is stored outside the public webcontent or in a database, then you'd like to stream it via a Servlet. Basically just get an InputStream of it (using e.g. FileInputStream) and then write it to the OutputStream of the response along a correct set of response headers.
Noted should be that JSP is irrelevant in this particular question. It's just a view technology providing a template to write HTML in and send it to the webbrowser.
That said, websites which plays audio are generally considered annoying and generally scare off visitors. Keep this in mind if you consider User Experience important.