Ajax :: Interacting With Flash Object Via PHP?
Sep 29, 2011
Within my site I have the following code:-
Code:
<form>
<button onClick="changeVideo(2)" type="button"/>
</form>
<object id="videoPlayer" type="application/x-shockwave-flash" data="http://www.mysite.com/videoplayer.swf">
[code]....
By default when my site loads the flash file gets the value of currentItem from Flashvars and does what it needs to do with this value. The flash file in question is just a basic video player and the id of the video to be played is retrieved from flashvars.
However I want users to now be able to click the button in my form and then the value of flashvars in my videoPlayer object will change to the value passed in the changeVideo() function i.e. in the above example value="currentVideo=1" will become value="currentVideo=2".
That's the easy part I think but what I then need to do is get the flash file itself to load this video without a page refresh but I have no idea how to get the flash file to recognise this value once it has already loaded. What exactly are my best options here?:-
1. Reload the flash component via ajax every time a user selects a new video i.e. every time changeVideo() is fired?
View 3 Replies
ADVERTISEMENT
Jul 1, 2009
I have a Flash movie on a web page and I want to send parameters to it with JavaScript to have it go to a selected frame. The AS3 code receives its information via an ExternalInterface API. The following code parses the URL argument (?page=x) and I want to send the value (x) to Flash. Unfortunately, when creating the objMovie variable, it is always undefined, therefore getFlashMovie is undefined and Flash never receives the callback. Thinking that it was because the flash movie is not loaded yet, I created a button to call callToActionscript, and when I click the button, I get the same error.
(getFlashMovie("myFlashMovie") is undefined)
Also,
if (params)
always returns true, whether there are parameters or not. I don't understand that, either.
The code follows:
<script >
$(document).ready(function() {
var params=getQueryParameters();
if(params) {
callToActionscript(params[0]);
}});
function getFlashMovie(movieName) {
var isIE = navigator.appName.indexOf("Microsoft") != -1;
var objMovie = (isIE) ? window[movieName] : document[movieName];
alert(objMovie); //Always return undefined
return objMovie;
} function callToActionscript(page) {
var myMovie=getFlashMovie("myFlashMovie").sentToActionscript(page);
} function getQueryParameters() {
var query = window.location.href.split('?')[1];
//query won't be set if ? isn't in the URL
if(!query) {
return { };
} else{
var param = query.split('=');
} return param[1];
}
</script>
View 1 Replies
View Related
Apr 22, 2010
I am having trouble changing the value of a flash object using JS in IE. The flash code is below
<object id="FlashID" classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000" width="721" height="423">
<param name="movie" id="movie" value="../../flash/world.swf">
<param name="quality" value="high">
[code]...
View 2 Replies
View Related
Jul 23, 2005
Is this possible? Basically I need to grab all the flash objects on the page (done) and then set the wmode to transparent so it doesn't mess up my DHTML menu.
View 2 Replies
View Related
Apr 15, 2009
I'm trying to make a quick and dirty mp3 player that plays whatever mp3 is in the URL, for example [url] would open the SWF mp3 player (I chose this one for its simplicity[url]) and play that song. However, nothing I've tried works. Could someone take a look at my code ? Please note that downloading the mp3 through newwindow() works perfectly.
View 3 Replies
View Related
Mar 23, 2005
Does anybody encountered this problem ? My purpose is to change the source of a flash object from param_src = window.location.search.substring(1)
so the essential code is something like this:
command = '<object ... src="' + param_src + '" ... TYPE="application/x-shockwave-flash" ...</object>'
document.write(command);
This works on FIREFOX but IE keeps playing the same file instead of playing a new one !
I have tried to add the no-cache meta-tags in the header but it still doesn't work.
View 1 Replies
View Related
May 7, 2010
Probably covering well trodden ground here but so far I haven't found any reliable solution and "it can't be done" seems crazy. Here goes:I have some Flash and non-flash banners that are to be embedded into my page - all managed by a simple CMS. The Flash movies are not created by me as they are for 3rd Party advertisors, and I do not want to be doing any Flash programming myself as it's not my thing and I don't have the resource to do it. As with the JPEG/GIF files - I just want to be given the file and then embed it.
What I want to do is produce some MI based upon when the various banners are clicked - things like how many clicks and who clicked them (users are logged into the web site so I can track them). Simple enough for JPEG/GIF banners capturing the onclick event but for Flash it seems that the Flash movie prevents (or overrides) the onclick event from registering.This seems crazy! I want my application logic (in this case logging user activity) to be independant of the media content - especially as I am not in control of the media content.Googling and experimentation shows that for IE I can seemingly use "onfocus" but this is not very satisfactory and of course I need a cross browser solution.This seems like such a simple concept that at the time of specifying the requirements it didn't occur to me that this might not be possible.... but it seems that I may be wrong!
View 3 Replies
View Related
Mar 18, 2011
i am using the object flash embed instead of the swfobject or flashobject because I am embedding using js innerHTML. Is there a way to loose the dotted border in IE that swfobject fixes? The movie needs no interactivity its just a swf animation.
View 5 Replies
View Related
Jan 8, 2011
is it possibile to detect and prevent through javascript the opening of a new window caused by a embedded flash object? In the html code this embedded object resides within a given div with id.
I would want to know about it because every time I open the page, the flash embedded object opens another window, and it is a little bit noisy.
Does exists a solution for that?
View 3 Replies
View Related
Jun 16, 2006
I'm trying to write a small little bookmarklet to insert some text into a textarea on a website I frequent. The first problem I ran into was that while the textarea I wanted to mess with was named, the form wasn't. To get around this I tried:
window.document.forms[0].comment_body.value
which, for some reason, sometimes worked. But not every time. Then I found getElementsByName but I can't seem to get that working either. Here's my latest attempt:
javascript:function wlcauto() {elements = document.getElementsByName(comment_body);V = 'bla bla bla bla bla'elements.value = V;}wlcauto();void(null)
Anyone have any ideas or links to something?
View 2 Replies
View Related
Sep 19, 2006
I have two windows, one, the 'main' window which contains a blog entry, and a 'child' window that contains item in an ordered list. Each item A-Z has a corresponding word a-z in the main window. Whever the user puts his mouse over, or clicks on a-z in the main window, I'd like the corresponding item in the child window to be brought to the top and highlighted.
I haven't had much luck looking around for answer because I'm not sure what I should be looking for. Even just some search terms would be helpful (though I prefer a nice solution!).
View 9 Replies
View Related
Dec 11, 2006
I'm using IFRAME to connect back to my ASP.NET page in order to fetch the FreeBox HTML Editor html contents and scripts (i do this apprach because the html editor is fairly heafty to send to the user when most dont use it on our site instead deferring to a user request before actually sending down the code via AJAX or in this case an IFRAME). Code:
View 2 Replies
View Related
Nov 16, 2011
A "dough-nut" type wheel will be located in the bottom center of the web page. The wheel will be divided into 3 tiles. One will be able to click this and drag to turn the wheel. An arrow will be centered directly above it in order to show which tile on the wheel is selected. Above the arrow will be a go button, once the go button is pressed, a user will be directed to the page that the tile leads to. The go button will inherit the image on the selected tile.
So first off, is this possible? Next, what code type (I think javascript but I am not sure) or software will I have to use to do this? Finally, I need a general idea of what the code would look like.
View 5 Replies
View Related
Apr 5, 2011
how would I go about interacting with an element inside a Frame from JavaScript? For example, here's the HTML of the page:
[Code]...
View 2 Replies
View Related
Feb 27, 2009
how would select the first parent of the interacting 'this' ?
View 2 Replies
View Related
Oct 21, 2010
know why flash doesn't work on content dynamically loaded via AJAX? This is for a one-click CopyToClipboard function. I use ZeroClipboard for this. HTML CODE (this works perfect with the clipboard() function)
Code:
<label>Image link: </label><input id="photo_direct_link" value="test" />
CLIPBOARD FUNCTION
Code:
function clipboard() {
// Copy to clipboard
var photo_direct_link = new ZeroClipboard.Client();
[Code]...
View 6 Replies
View Related
Mar 22, 2009
on the top of the page with the pictures scrolling with news and links inside of them without using flash. like with ajax or something? and if it can be done... how would i go about it?
View 2 Replies
View Related
Apr 13, 2009
Doing my own fitness bootcamp site and want to fancy up my front page. My front page loads a picture and I want it to load like flash. What could I do? I have all the Adobe Software, just don't know how to use it.
View 3 Replies
View Related
Jun 24, 2010
I need a simple javascript that I can use in my HOME page.index.html has a flash animationnoflash.html is a page without flash animationKindle does not support Flash and therefore i want to redirect my index.html to noflash.html page.
View 2 Replies
View Related
May 9, 2011
I work for a company called Best of the Best (www.botb.com). We use Flash countdown clocks to mark the end of our competitions. The issue we now have is that our clients are using mobile platforms more and more and as bloody Apple wont support flash (not fully anyway) we need the option to detect whether our users have flash and if not then replace the current <OBJECT>Blah Blah Parameters etc</OBJECT> with <DIVCLASS="NON_FLASH_CONTAINER">All other bits in middle</DIV>Is this at all possible?
View 1 Replies
View Related
Oct 17, 2011
I'm trying to put some code together to create an image-swapping system, that when you click on the image it'll hide the image and replace it with a given iframe vimeo/youtube code...The swapping part works fine, however when the iframe loads up, it hides all other flash objects in the page, and I can't figure out why.Here's the JS
Code:
function swapvideo(w,h,url) {
document.getElementById('video_pholder').style.display='none';
[code]....
View 1 Replies
View Related
Mar 11, 2010
I have created no flash pages and flash pages, but instead of creating a portal at the front of the site that leads you to a flash site and a no flash site id like to do it so the page detects flash or not, and redirects to whichever URL.
Is this possible, or do multiple browsers cause problems ?
View 2 Replies
View Related
Nov 2, 2010
I have created a transparent flash video (virtual spokesperson) for my website. For demoing purposes, I would like to have this appear on any desired website.
This is what I am trying to produce - here a virtual spokesperson appears on the [url]website: [url]
Have a look at other sites which enable one to type in a URL and their demo virtual spokesperson appears on the given site: [url] [url]
I believe they do this within an iframe to display the underlying website.
View 5 Replies
View Related
May 1, 2006
If I have a div in a document containing ordered lists (ul,li etc) and I use AJAX interaction with the server to modify the content of the div without page refresh, am I right in assuming that I cannot inspect or manipulate this new content using document.getElementById and similar methods of working with the document object? Or is there some way to do this?
View 8 Replies
View Related
Aug 25, 2009
By writing this [code]...
we pass variables 'name' and 'location' to the file 'some.php'. How can we pass a PHP object?
View 1 Replies
View Related
Sep 6, 2009
I have something that's called with AJAX when the user enters some text [url]. What I want is to execute some javascript within this "frame". If the frame calls something, with say <script type="text/javascript"> document.write('h'); </script> in it, then "h" doesn't appear, and neither does anything besides what would normally be shown if I didn't add that.
View 6 Replies
View Related