You will recieve your password to this address. Address is not made public.

Your preferred username that is used when logging in.

Forum user: Tylo

Basic information

Registered Jul 10, 2009
Last login Nov 10, 2009
Forum posts 22
Direct URL http://www.flowplayer.org/forum/users/12851

Latest forum posts

Posts:

Registered:

Loading with AJAX: Including loaded page"s javascript

Posted: Nov 10, 2009

I had a hard time defining the title of my problem, but it's a relatively simple question.

When I load a page through AJAX, I want its javascript to come with it.

So if I wanted to load ext_page.html, and it had javascript code that worked specifically with elements on that page, I'd like that javascript to work.

As far as I can tell, this does not happen.

How can I get this to work? Is it possible?

Posts:

Registered:

» prev/next links on external HTML pages in overlay

Posted: Nov 10, 2009

This isn't the most pretty way of doing it, but this post explains how you can change the contents of your Overlay using AJAX.

http://flowplayer.org/tools/forum/40/29565

Posts:

Registered:

» Having links from external pages open in that overlay

Posted: Nov 10, 2009

This may be what you are looking for:

http://flowplayer.org/tools/forum/40/29565

Posts:

Registered:

» Transparancy with Flashembed

Posted: Oct 30, 2009

Bringing this thread back from the dead...

This doesn't seem to do the trick for me.


	$("#banner").flashembed("tlea_banner4.swf",{		
		wmode: 'transparent'
	});

The background is white, when I need it to me transparent. Any thoughts on what I am doing wrong?

EDIT: Solved by using:


flashembed.domReady(function(){
	
	flashembed("banner", {src: "tlea_banner4.swf", wmode: 'transparent' });
});

I essentially gave up on using the jQuery support, as I did not find sufficient documentation. Fortunately, I didn't need to repeat embedding anywhere, so this wasn't really an issue.

Posts:

Registered:

» close overlay window by button action in flash

Posted: Oct 21, 2009

which version of flash are you using?

Posts:

Registered:

» Overlay AJAX works in Safari, but not in Firefox & IE8

Posted: Oct 21, 2009

I found out that the


console.log()

function was what was causing me problems. I'm still experiencing problems, but they aren't as strange as they were before. Will keep this thread updated.

Posts:

Registered:

» re:

Posted: Oct 21, 2009

I was able to solve my problem, and I'll tell you how.

First of all, this method will change the contents of an overlay's div using a jQuery AJAX method. It will not open a 2nd overlay. I found opening a 2nd overlay to be impractical.

This method follows the Loading external pages into overlay technique.

index.html

<div class="overlay" id="overlay>
    <div class="contentWrap"></div>
</div>

<a href="join.html" rel="#overlay">Show Overlay</a>

index.html's javascript

<script>
    $(document).ready(function() {
		$("a[rel]").overlay({
				
			expose: { 
				color: '#333', 
                   		loadSpeed: 200, 
                    		opacity: 0.9 
			},
				
			onBeforeLoad: function(){
					
				var wrap = this.getContent().find("div.contentWrap");

				wrap.load(this.getTrigger().attr("href"));
			}				
		});
			
		$("#changeText").live('click', function(){

			var url = $(this).attr("href");

			$("#content").load(url, {var1:Math.random()*99999});
				
			$.scrollTo("0%", 400);
				
			return false;
		});
	});
</script>

join.html

<html>
	<head></head>
	<body>
		<div class="content" id="content">
			This is the content of the overlay.

			<a href="rules.html" id="changeText">Change Overlay</a>
		</div>
	</body>
</html>

So what we have here is all of the javascript being contained on the index.html page. When we click on Show Overlay, the overlay will appear and load join.html.

join.html has the link Change Overlay. When that is clicked, this function located in index.html will fire:


	$("#changeText").live('click', function(){

		var url = $(this).attr("href");

		$("#content").load(url, {var1:Math.random()*99999});
				
		$('html,body').animate({scrollTop: 10}, 1000, 'swing');
				
		return false;
	});

This block of code will grab the href value from the link marked with the id changeText. Then it will call the jQuery function load on the div we want to change. In this case, we want to change the contents of the div marked with the id content. The var1:Math.random()*99999 parameter exists to prevent Internet Explorer from caching the resulting page, which can cause problems during development. You can read about that if you look up the load function in the jQuery documentation.

This will result in your overlay's content in changing.

Posts:

Registered:

» black borders on png in IE

Posted: Oct 20, 2009

Probably because there is a default fading setting for the expose control, but I can't say for sure myself. Seems to me that expose is all about the fade effect. You might try:


expose: { 
     color: '#fff', 
     loadSpeed: 0,
     closeSpeed: 0
}

Your expose should appear and disappear immediately, instead of fading.

Posts:

Registered:

» Link for an overlay in another Overlay

Posted: Oct 20, 2009

Is this what you are referring to:http://flowplayer.org/tools/forum/40/29565 ?

Posts:

Registered:

re:

Posted: Oct 20, 2009

I am going to look at this tomorrow, Wendy. I'm not the world's greatest javascript or jQuery programmer, but I have an invested interest in a future project that will involve image maps.

It's pretty late now, though, so I'll get back to you.

Posts:

Registered:

re:

Posted: Oct 20, 2009

Is this what you are referring to:http://flowplayer.org/tools/forum/40/29565 ?

Posts:

Registered:

re:

Posted: Oct 20, 2009

Is this what you are referring to?

http://flowplayer.org/tools/forum/40/29565

Posts:

Registered:

re:

Posted: Oct 20, 2009

EDIT: I did not know this, but apparently the 'Apple' effect is an extra plugin, and must be downloaded for it to work. See here ->http://flowplayer.org/tools/forum/40/29530

Yes, the other tutorials on the Overlay document this. Here is an example of it working for links:


$(function() {

$("#apple a[rel]").overlay({effect: 'apple'});

});

You can see, img was turned into a. The part you might be overlooking, is that your a tag must have a property called rel. So your a tag look should look like this if you expect it to work:


<a rel="#overlay">Overlay</a>

Posts:

Registered:

re:

Posted: Oct 20, 2009

I have done it before, though with mixed results. The new overlay was contained inside the previous overlay. It was not practical by any sense of the word. I did the Loading external pages into overlay method, and included overlay code on my external page.

Instead, I have opted to attempt to change the contents of an overlay from inside the overlay. Right now, cross compatibility with all browsers is abysmal. I've only gotten it to work in Safari. No idea what I'm doing wrong. It amazes me that people are able to meet deadlines while working with this stuff.

Posts:

Registered:

re:

Posted: Oct 20, 2009

My guess would be that you would need to control the player on the page that the player is located.

That is, include javascript that starts your player as soon as the URL stored at
wrap.load(turl); 
is loaded.
Perhaps I don't understand how the onLoad callback functions, however. Is that what it is supposed to do? I don't see how your page would know that a variable named player exists (as it is located on the external page you are loading).

onLoad:function(content) { 
player.load(); 
}