Problem with a SWF running in a browser - actionscript-3

I made an AS3 animation with Flash. The SWF work perfectly playing directly in the Flash Player.
If I read the SWF file in a browser, interactions like "onRollOver" or "onEnterFrame" doesn't work anymore.
What could be causing this?

Did you properly embed your .SWF? Use SWFObject to embed your .SWF files.

Make sure you have the browser debug player installed if testing, so you can see if there are any errors.

I find the bug ! The first line of my actionscript was :
*stage.displayState=StageDisplayState.FULL_SCREEN;*
With this my swf file doesn't have any response when I roll over it. When I embed the SWF file I use a part of this : . May be such of a conflict...
In the HTML I properly embed my .SWF with SWFObject. Great, thanks for your help !

Related

Embedding Audio Script Issue

so i'm currently trying to embed some audio into my website using Dreamweaver and for some reason it won't play, is it a problem with the code or just the files? Thanks in advance.
<audio controls src="stickerbush.mp3">
your code is correct, I test it, and it work very well. I think you need to check the audio if it is working (or try with another audio) and/or the audio file location

Pseudo-Stream flv from other server, using a local html file

Is it possible to pseudo-stream a flv video on an external server that only allows pseudo-streaming if you watch the video from a website hosted on this external server?
I want to access the flv file using a html file on my pc. (Not using another website.)
I tried it using the flowplayer, but it wasn't pseudo-streaming (I couldn't seek behind the point in the video that wasn't already downlaoded).
Btw if I download the whole sourcecode of the external site and try to run it in my browser the player stays black and doesn't do anything.
If it is not possible, it would be nice if you would explain me why. :)
And yes I have permission to do this.
edit:
Sorry, I'm soo stupid. -.-
I used a flowplayer configuration that didn't allow pseudo-streaming.
The example on this site works great: http://flash.flowplayer.org/demos/plugins/streaming/
So in order to "Seek" via flash or html 5, you need something called a Moov Atom, you could think of the Moov Atom much as you would a Key Frame in a Standard Mpeg 2 file.
If you have the Moov Atoms (you can apply these with atomic parsley or other encoders - Just Google how to add Moov atoms to flv.) you will then be able to seek from atom position to atom position. [Much like when you seek an mpeg it moves from keyframe to keyframe]
I have tried to keep this answer generalist, as I don't think you really want to know all the finer details of the flv container or it's playback.
Hope this helped.
Cheers
Craig

Is there any way to render HTML in ActionScript3 - FlashPlayer SWF?

I already know about StageWebView and HTMLLoader, but that only works in Adobe AIR. Is there any way (maybe third party) to do the same in a SWF.
Reason:
I'm building a game in AS3 that will run on mobile devices with Adobe AIR, and there is also a web version that will run as a SWF.
The game has some links, URLs that open in a StageWebView for mobile. My problem is that the SWF has to open these URLs in a browser popup or i-frame... I don't like it :(
What you're trying to accomplish isn't possible in a SWF. However, on the web you will have access to javascript and HTML, and with that, you could replicate the functionality with an iframe that sits directly over your SWF.

Dynamically Playing MP3 files downloaded with AJAX

I have the need to play an MP3 file on my website downloaded via AJAX like the "Listen" button on the Google Translate page (in fact, I'm doing the exact same thing). How is this done? I don't believe it's facilitated by Flash, so that's not the answer.
I'd suggest loading an iFrame with the sound file embedded within. It's an ugly solution, but it's probably got the best crossbrowser support until HTML5 turns into a thing.

How do I add playback controls to a SWF file embeded in HTML?

What am I missing here because my video doesn't have any controls? Is there a special parameter I need or do I need to encode the SWF file in a special way? I just used a MPEG to SWF converter provided by Blaze Media Pro.
Wow. I was thinking this was much easier than it is. In order to get playback controls, you needs to either use some boilerplate Flash code to wrap your Flash movie or you need to script it out in ActionScript. Basially, there is no toggle or anything to just turn controls on for a SWF movie. You'll want to look into some sort of the Flash editor/IDE to build controls into a .fla file.
Try FlowPlayer.
Flowplayer is an Open Source video player for your website.
For site owners, developers, hobbyists, businesses and programmers.