ActionScript 2.0 :: Making Sound Stop In Embedded YouTube Player After Removal
Mar 18, 2011
I have the site: [URL]
There are videos there and they play fine and get removed when I change pages. The problem is, if I leave a video playing and then switch pages the sound continues even though the video disappears. How can I make the sound stop? I have done quite a lot of research. My video's appear code is:
I'm having a big problem using youtube player API (AS2)... Here's the thing: I have a movie in library wich I load when clicking a menu. This movie is attached to stage using the following function:
I have embed the youtube flash player via this code.
Code: // create a MovieClip to load the player into var ytplayer:MovieClip = _root.createEmptyMovieClip("ytplayer", 1); // create a listener object for the MovieClipLoader to use var ytPlayerLoaderListener:Object = {
[code]....
I would Like to know, How can I run the destory command because the video keeps playing even though the command has been passed. I've used stopVideo and destory. they dont work until you press the pause button. I would like to end the video even if its playing.
My site was 95% point and clicked and the rest getting lucky with mostly the right AS3 after searching the various forums etc. Please be patient and type slowly that I may understand
I managed to get a youtube embedded into my AS3 Flash site. Plays well enough and in the right box. Gota figure out how to default to 480 or 720 but thats not the problem... see below.
My questions is this: is there any way to stop the video from playing all the way through to Youtubes default end screen where it has the Just Watched and Up Next screen? Either by going back to the thumbnail it uses by default or by sending it to another page on my flash site?
The last thing I want is my viewer wandering away from my site ><.
Below is the code I used on the Video holder object Sorry i forgot the tute i pasted from - but it worked thank you who ever you may be:
Security.allowDomain("www.youtube.com");
// This will hold the API player instance once it is initialized. var player:Object; var loader:Loader = new Loader();
how to create a custom player that would stream a list of youtube videos along with soundcloud, and MP3 similar to the one on [url]....I know that this might seem like quite a general question but any direction on how to accomplish this and whether it should be done using flash and Youtube API, and sound cloud API or whether it should be done with some sort of flash audio ripping way.
I am working on a webpage where i have to include an embedded video.The video is hosted on some other domain.I am able to embed the video and autoplay once the web page is loaded.However i have a requirement where i have to remove the div displaying the video once it is played , and in place of the video i have to now display some text.
The problem is i am able to do autoplay by the autostart variable in the embed tag...but how do i know that the video has ended.The hosting company only provides an embed tag and they donot have any player apis to use.
One way (or rather a workaround) that i feel is to start a eventlistener in the background and see for the total time of the video and when that time is reached remove the content.But the problem is what if the user pauses the video, then also the div would be deleted.
Is there any way we can stop the sound embeded in timeline directly?
We have an application that load SWF dynamically. These external SWF are not created by our company and other company has embed the sound in timeline. without use of any actionscript or anything.
Now we need to provide the MUTE option for our user, is there any way We can simply disable all kind of sound in any mode from our ActionScript code.
When my avatar bug makes contact with another type of bug, he eats it. Both bugs are movie clips; when the avatar gets into the collision detect zone of the edible bug, it triggers a quick animation in the "edible" bug: he becomes a blur for one frame then disappears (as though eaten).
The problem is the sound effect - a quick "whoosh". It needs to play once then stop. What happens now is that it's triggered repeatedly - a problem if the avatar passes over the edible bug slowly. If the avatar later passes over the spot where the edible bug was, the sound is triggered multiple times again. So I need the sound to play only once, then stop. There will be several copies of the edible bug's movie clip that need to behave the same way, so once the sound stops playing it needs to be available again for the next collision.
Here's what it looks like now:
private var sfx_edible:Sound = new eat(); function detectCollision(myevent:Event):void { if (avatar_mc.hitTestPoint(edible_a.x, edible_a.y, false)==true) {
i'm making somekind of music / video player in flashmx2004. it plays streaming mp3 en flv files. random people can put a link into the players database. ofcourse there will be some that insert a dead link, now i want to check with actionscript (1.0) if the link is dead and if so, the player automaticly will skip this track. this is what i've got allready to load te streaming sound:
i've got a problem with a Flash website that has been driving me crazy. i have a Flash website that was built for us in late 2009, it uses ActionScript 2 and i have been maintaining it in CS3 on a Mac.
the site is structured as a heirarchy of swf files, and loads XML files to specify text content, image locations, and Youtube videos. all this has worked fine until sometime in the past month or two. the problem now is that the embedded Youtube videos no longer load, although nothing has changed in the code. unfortunately i don't know exactly when the videos stopped loading.
in the Activity Window of Safari i can see the URLs for the Youtube crossdomain file [URL].. Youtube still for the video, and the Youtube player[URL].. however neither the still frame nor the player skin load.
if i run the site directly from my hard drive (with my Flash Player security preferences set to allow the swf to access the internet), the videos do load and play, so i am guessing that it is some kind of security domain issue. if i run the site in Flash CS3 in debug mode, when i navigate to a video page, although the video loads and plays, i get lots of these warnings (i've edited the path and file name):
The following is the code I am using to display a YouTube embedded video in my flash application.
Code:
Security.allowDomain("youtube.com"); var plr:MovieClip = new MovieClip(); addChild(plr);
[Code]....
I cannot load more than one of those in my app. As soon as I load one youtube vid like that, any others will fail to load UNLESS it was the same video as the first one loaded, in which case there seems to be a 50% chance that it will load. And even when the second one (the same as the first) does load, there are issues with the player loaded.... it seems they are connected somehow and get confused with each other. The trackbar will flicker between the play time of the first one and the play time of the second one.
Next problem... I cannot unload the video right away. Say my user wants to close the video out, when I use:
Code:
ldr.unload()
the player does NOT close its streams and you can hear the audio still playing (assuming it was closed before it was finished playing)...
In my eyes, this is horribly bad programming on YouTube's part. They claim that you are allowed to embed their videos in AS3.0, but if that's true then why does it have such a horrible time as a child SWF? Proper children SWF files should be listening for an "unload" call and close out anything they need to when unloaded.
Here is what I've tried so far:
- Seperating the videos by loading them into other children SWF files (children that I created that I've told to load a specific YouTube vid)
- loading at different times
- Allowing security access from YouTube
How can I load more than one YouTube video into my Flash App without causing problems between them? I'm at my wit's end.
I'm having issues with a YouTube video breaking a jQuery slider when viewed on an Apple mobile device. The slider uses a set width & height window that uses the overflow:hidden property. It looks great in all browsers except for Apple devices where all of the slides are visible in a row as if the overflow:hidden property did not take effect.
I have a flash site, on one of the pages is an embedded youtube video, that I have used this code for
[Code]....
The video loads perfectly, however, it is anchored to the top left hand corner. I have attempted to do this within a movieclip and move the movie clip around on the stage also but it has not worked
I have successfully embedded the youtube video in my flash code with: //create area to put youtube video on screen this.createEmptyMovieClip("reason1_video", 10000); reason1_video._xscale = 60; reason1_video._yscale = 60; this.reason1_video.loadMovie("[URL]");
However, the video plays with black bars on top and bottom even though it plays without those directly from youtube: [URL]. Even if I take off the scaling, it still has the black bars. How do I get rid of them? It seems like youtube uses a different player than flash. [URL]. Click on #1 and you will see the video I am talking about.
I created an ajax jQuery featured content slider that will automatically navigate through each tab. Each tab has some basic html. The one I used is this one: [URL]. For some reason, when I embed a flash video in it, the flash video overflows the div. It looks fine in Chrome and Safari but not the latest version of Firefox (3.6) on the PC. Is it not handling overflow or z-indexes correctly?
I had problems covering videos on Youtube itself but solved that with a design change (don't need to cover them any more).
So I have a script the user can run and it calls a javascript file to do other stuff on the current webpage. One thing it does is bring up a lightbox that covers the page. Of course it won't cover embedded Youtube videos and so I need to do a few changes. I did the necessary changes and it didn't work. I kept trying and trying and eventually made a page with just an embedded video and a .jpg (my script won't run if there are no images).
I looked to see what the Pinterest script added to the embedded video portion and while it was almost identical they did have an autoplay=0 in there so I added it just so I could see for myself that it is exactly the same. If I run the Pinterest script and close it, then run mine, mine works fine. If I run mine, then the Pinterest script, then mine again, mine works. So I believe this means I'm not adding anything that tells the page "Go ahead and put the video on top anyway."
My portion of the script that adds the wmode:
var players = document.getElementsByTagName('embed'); var len = players.length; for(var i=0;i<len;i++){
I have a YouTube video embedded in my page. It is hidden (display:none). You need to click one of the video link buttons to display the video and play it. The links are defined like this:
It's fundamentally pretty simple! But here's the problem. since the video player is hidden, the flash object is not activated. So when I click a video link, the line ytplayer.style.display = 'block'; displays the video player, but it takes about about half a second for flash to load. During this time it cannot accept any method calls, such as the next line ytplayer.loadVideoById( id, 0, 'hd1080' );. Essentially, I have to click the link twice, once to load up the flash video player, the second time to actually load the video into the player.
I have a small ux problem with this embedded object: When scrolling the page up or down using the scroll-wheel of the mouse, it stops working when the mouse cursor is hovering over the video. Are there any html / css / param settings that I can modify to avoid this? See the site itself for a working example. I experience the problem both in Windows 7 64bit and Ubuntu 11.10 64bit so far.
Have screen filled as much as possible with webcamBe able to go full screenJust keep it simple!Work out a way of giving you credit without putting stuff on the fullscreen version (I will not be distributing it commercially)Some things that would be kind of cool to add (both inspired by youtube's webcam thing)Ability to switch between webcamsRecord and save to the serverWhen making it similar to youtube's try to stay simple!
I am trying to make the SIMPLEST POSSIBLE MP# player using the player component preinstalled in flash.It is very simple, the code is as follows:
Code: on (release) { player.contentPath ="Song.mp3" player.play() } ("player" is the mp3 component)
This works if I want a single track to be selected and played.Now, I need it to AUTOMATICALLY LOAD THE NEXT TRACK, which I will input in the code.I am thinking something like this:
I want to be able to add youtube videos on my site. The site is built using as2 xml etc...Maby there is some sort of a .swf youtube player that i can load into the site?I can provide the code & files if necessary but for now heres the site:flaw.seIf this is a stupid question and takes to much effort then im willing to pay a little sum..Beside that i want the pictures to stop scrolling 20 pixels from the right side of the webbrowser. I did get some help and added:[code]But then it stoped directly after the picture without any space. And last bit of the scroller dident really work right.
i am trying to create a AS3 youtube player... and after i searched online and followed tutorials, i couldnt make any of them work due to errors.i always get this error [code]is it because i am testing it locally?
I need to know how i could create a flash player like youtube ....I want build a web site in which upload videos and play them with a my personal player.maybe i must learn actionscript 3 language, but is there a prompt code to utilize and modify according to my taste?
I have the following mark-up to load a YouTube video player in a jQuery Tools overlay:
<a rel="#YouTubeVideo_MZKORPYI0HM" href="http://www.youtube.com/watch?v=mZkoRpyi0HM" title="Watch the YouTube video"> <img src="http://img.youtube.com/vi/mZkoRpyi0HM/2.jpg" class="youtubeThumbnail
[Code]....
The page behaves exactly how I would expect in Firefox (all versions) and Chrome. However, in IE8 (and I have the latest flash plug-in), I see a "1 item remaining" message in the status bar and the overlay contains no flash player. Right-clicking on the grey space shows a "movie not loaded" message.
I'm using the YouTube API in my flex app to play videos and it works fine running on my computer and android, but I'm getting an issue when I try to use it on iOS, I just get a black screen!