Here is what can be done, someone could write a piece of JS code and make a big Flash banner, big I mean very big and then the JavaScript could check for iPad and iPhone and try to show the banner to them…
You can then urge web developers and web masters to put it on their websites and blogs so that every iPhone or iPad user would see a big giant empty box with a message like “Your browser doesn’t support …”.
A Way To Send A Message To Apple About Flash
If you are editing a Flash file like a menu and you can’t open the “Actions – Button” panel and only you see is “Actions – Frame” and you are 100% sure that you are dealing with actual buttons here is what you do:
Where you can see the layers, there is a lock icon, for every layer there must be a dot under it rather than a lock; so you have to unlock the layers before you can see the “Actions – Button” layer. To do this, simply click on each layer’s lock icon and that will turn it into a dot. Then go to “Window > Actions” and select a button and voila.
I hope this helps someone
“Actions – Button” Window In Flash
It’s very simple, hit F9
I wish it was more obvious to beginners though.
Viewing Actionscript within .fla file
It’s very easy:
import flash.external.ExternalInterface;
...
ExternalInterface.call("your_javascript_function()");
You can even get a return value:
var x:int = ExternalInterface.call("get_x()");
To pass an argument try:
var retval:int = ExternalInterface.call("some_js_function()", "the-argument");
Calling a JavaScript function from Actionscript 3 (Flash)
Here is how to fix it:
1 – Right click on Flash’s desktop (or whatever) icon and then click “Properties”
2 – Go to compatibility tab
3 – Check the box “Run this program in compatibility mode for:”
4 – From the drop down select “Windows XP (Service Pack 2)”
5 – Open Flash
And that’s it, it will run smoothly, or at least it did for me.
Flash CS3 is slow on Windows Vista
I worked 2 full days to get Red5 0.7.0 working with custom applications but I had no luck.
I couldn’t even get the tutorials written by Red5 developers working, it doesn’t have proper documentation either so it was a real nightmare.
So many other people have these problems too and there seem to be no answer to these problems.
So here is what I did, I installed Red5 0.6.2 and voila! it worked, all the tutorials worked and all the examples worked too!
I’m not a Java guru and I’m glad I’m not, it looks really huge and complicated, it doesn’t look fun to program in at all. I’m sure so many people like it very much but I really think even C is nicer than Java.
For example, to make an even “Hello World” Red5 application you have to make ~5 folders, 4 XML files, 1 Java class, compile your class, upload it to your server and restart Red5!!!
Update:
Funny, I kind of started liking Java
Red5 flash server problems; impossible to get it working
After some time of working on this I found that with the following code, I could get the best quality when recording videos with Flash:
camera.setMode(300, 240, 30);
// camera.setKeyFrameInterval(CAMERA_KEY_FRAME_INTERVAL); /* Comment this out */
camera.setQuality(0, 0);
Funny, with 15 frames per second, there was a lot of problems, but 30 frames per second fixed all the issues for me.
Please do let me know if you have a better solution
NetStream.publish Actionscript 3, recording with the best quality
Read this post first:
http://blog.code-head.com/detecting-the-end-of-flv-stream-in-actionscript-3
Funny today, I get the events in reverse order:
NetStream.Buffer.Empty
NetStream.Buffer.Flush
Yesterday it was:
NetStream.Buffer.Flush
NetStream.Buffer.Empty
I will find the solution though
Detecting the end of FLV stream in Actionscript 3, part 2
There is an issue with this post, read it and then read this:
http://blog.code-head.com/detecting-the-end-of-flv-stream-in-actionscript-3-part-2
This is also one of those things that I couldn’t really find a real solution to online, so with some tests and experiments, I came up with this solution which I’m not sure if it’s the best solution.
First you will need to attach an event to your incoming stream, assuming your stream is clientStream:
/* ... */
clientStream = new NetStream(serverConnection);
clientStream.addEventListener(NetStatusEvent.NET_STATUS, PlayerStatusHandler);
Then you will need a member variable or a variable in the global scope to keep the latest status:
var playerLastEvent:String = new String();
Now the PlayerStatusHandler which again, I don’t think it’s very pretty:
function PlayerStatusHandler(event:NetStatusEvent) {
if (playerLastEvent == "NetStream.Buffer.Flush" &&
event.info.code == "NetStream.Buffer.Empty") { /* Stopped */
StopPlayback(event); /* Or any other thing you want to do */
} else if (playerLastEvent == "NetStream.Buffer.Flush" &&
event.info.code != "NetStream.Buffer.Empty")
playerLastEvent = ""; /* Sometimes it throws the Flush event */
else if (event.info.code == "NetStream.Buffer.Flush")
playerLastEvent = "NetStream.Buffer.Flush";
}
So as you can see, we are looking for the Flush event that is followed by an Empty event.
This is just tested on my connection and I don’t really know how this works on slow connections, where the buffer is empty often but maybe you can tell me
I wish there was an event to show the real end of the stream.
Detecting the end of FLV stream in Actionscript 3