Subscribe to RSS
get email updates
home | about | pixDif AIR app | video tutorials
polyGeek.com
polyGeek.com

Pledge drive: Help me help 360|Flex who is helping me

The 360|Flex conference is coming up soon - March 8-10 in San Jose. It seems that John and Tom - the organizers - have everything ready to go except for one little item: getting a sponsor for the USB Thumbdrive that comes in the swag-bag. They offered it to me but it's a little out of my marketing budget for RunPee.com - which is zero dollars. But they are on the hook either way so we worked out a deal. I'll start a pledge drive and try to raise as much money as I can to cover the cost of sponsoring the thumbdrive - $1,300 target. In exchange they will put RunPee.com on it. I'm not on the hook for anything except trying to raise money to cover their costs so that they don't take a loss.

We would all appreciate it if you chipped in a few bucks. I will give every dollar donated to my Paypal account to 360|Flex up until the conference is over. Let me know if you would like for your donation to be public or not because I'll keep a running tab on this page of who donated and how much.

Paypal donations to: Dan@polyGeek.com

Thanks for your support,
Dan Florio, John Wilker, Tom Ortega.

Dan Florio ( that's me )-$100, Lee Button-$100, Randy Troppmann-$100, David Ortinau-$50, Faisal Abid Founder-$55, Pintley.com-$50, Douglas Reynolds Consulting-$50, Nick Kwiatkowski-$25, Patrick McDonald-$10, Jeremy Saenz-$25, Ivan Alvarez-$25, Jen Floyd-$10, Matt LeGrand-$25, Jens Brynildsen-$25, Gates M Stoner-$20, Emerson Tyler Wright-$50, John Daily-$10, Jason Fincanon-$25, Evan Zeimet-$20 Here is a complete list of the people who have donated

Problem playing large video files with xmoov.php

January 25th, 2009 . by polygeek

If you are playing long videos – like more than 20 minutes or so – using xmoov.php then you may notice a small problem, such as the videos not playing. If so then the solution is very simple. You just need to increase the amount of memory that PHP can access.

I’m using WAMP and by default the PHP.ini file gives it 128MB to work with. I upped that to 1028MB and now I can play videos that are in the 90 minute range.

In WAMP you can change the memory limit by opening the PHP.ini file – locate it by clicking on the WAMP server icon in the system tray -> PHP -> php.ini.

Now search for “memory_limit”. Change the max amount of memory a script my consume and you should be good to go.

Addendum
In the comments below a user – Mike – suggested that the problem lies with the last line of code in the xmoov.php file.

1
print(fread($fh, filesize($file)));

change it to something like:

1
print(fread($fh, 8192));

That could help as well.

If something here has proved valuable to you then feel free to drop a couple of bucks in the tip-jar.

Post to Twitter Post to Delicious Post to Facebook Post to Reddit Post to StumbleUpon


similar posts

Solving a problem with new tools

October 28th, 2008 . by polygeek

Situation: I’ve put up a lot of tutorials and examples on my blog that use Flash Media Server3. In order to save money, and not mess with hosting, I’ve decided to host my own Flash Media Server here on my PC. I have a residential account with my ISP which means no static IP.

Problem: When my IP address does change my examples will fail because they won’t be able to connect to my home PC.

The first thing I did to mitigate the work of updating the IP address for all my Flex applications that connect to FMS3 is to pull the current IP address from a database record using MySQL and AMFPHP.

That works great. Now all I need to do is make sure that I check my IP address, often, and when I notice that it changes I can just update one record in the database and everything will work again.

But there’s got to be a better way.

Well, It’s simple to write a PHP script that tells me what my current IP address is. You can see a bit of it running if you go to polyGeek.com/myIP.php. Here’s the code:

<?php echo( $_SERVER['REMOTE_ADDR'] ); ?>

So from my PC if I go to a script on my host I can get the value of my current IP address. It would be easy to extend that code to connect to the MySQL database and update the value of the IP address every time. As long as I’m the only person hitting that script it will keep the IP in the database up to date.

Now All I need to do is set something up to run that script fairly often. And it has to run from this PC that I’m on. I can’t use a Chron job to do it.

I can create an AIR app that pings that script on an interval. I must have that app running all the time, but I can make the app minimize to the System Tray on startup so that I don’t actually have to see it on my Task Bar.

The problem with that is I’ve never made an AIR app that minimizes to the System Tray. Actually, I made my first AIR app ever just a few months ago. And, I had never connected an application to a database until this past Spring, 2008. I didn’t have a clue what AMFPHP was. Actually, if you showed me a page of PHP script I wouldn’t be able to tell you what language it was – without the <? PHP ?> tags. And I hardly knew any Flex and just a smattering of Actionscript 3.

It feels good sometimes to sit back and think about “Just what have I learned to do recently.” When I do that it reminds me that, “Though the mountain of knowledge ahead of me may be high so is the mountain that I have already climbed.”

Too often I only look ahead to see what I have left to learn which can be intimidating, even paralyzing with the hugeness of it all. But when I look back and realize the incredible amount to skills and knowledge I already possess the road ahead becomes a little less daunting.

I’m guessing you can relate. Right?

This time last year I wouldn’t have been able to sit down in any reasonable amount of time and completed just one piece of the problem I just solved. Today I did the whole thing in just a few hours – I struggled a bit with the PHP. :-)

I’m really looking forward to the next few months. Lots to do. Lots to learn. I’ll be frustrated, tired, excited, proud, baffled, more frustration and exalted along the way. And enjoy every minute of it.

If something here has proved valuable to you then feel free to drop a couple of bucks in the tip-jar.

Post to Twitter Post to Delicious Post to Facebook Post to Reddit Post to StumbleUpon


similar posts

AMFPHP video tutorial : Creating and connecting to a MySQL database

August 6th, 2008 . by polygeek

pgTV

Using AMFPHP to connect to a MySQL database

Most of this tutorial is concerned with phpMyAdmin to create a database, table and user. Then we’ll write a PHP service that will connect and read/write data to the table we created. You can see an example of what we’ll create in the Flex app below

[ Other AMFPHP video tutorials ]

One thing that I meant to cover but spaced was creating a dbConnection.php file that holds your mysql_connect statements. Instead of leaving those statements in the constructor like I did here:

function Blogroll() { // this is the constructor for the 'Blogroll' class
   $mysql = mysql_connect( "localhost", "myUsername", "myPassword" );
   mysql_select_db(  "myDatabase" );
}

You can put that statement in an external file, I call mine dbConnection.php. That way you can refer to that file in all your services and if you need to update your connection statement you’ll only need to access one file. Plus, presumably, it’s more secure.

So in the end your constructor would look like this:

function Blogroll() {
   include("dbConnection.php");
}

And your connection file would look like this:

<?php
   $mysql = mysql_connect( "localhost", "myUsername", "myPassword" );
   mysql_select_db(  "myDatabase" );
?>

Please comment below if you have any input on how this video tutorial could be better. I’ll re-record this tutorial when I feel that I’ve gotten enough feedback to make some quality improvements.

view source

If something here has proved valuable to you then feel free to drop a couple of bucks in the tip-jar.

Post to Twitter Post to Delicious Post to Facebook Post to Reddit Post to StumbleUpon


similar posts

AMFPHP video tutorial : Creating a Flex project to connect to AMFPHP and send/receive data

August 6th, 2008 . by polygeek

pgTV

Setting up a Flex project to send and receive data via AMFPHP

This tutorial is about 11 1/2 minutes long. I’ll cover how to set your Flex project up with the services-config.xml file to enable communications with AMFPHP.

[ Other AMFPHP video tutorials ]

The source files contain the services-config.xml file so that you can drop that into your AMFPHP Flex projects. And the additional command line argument that you need to add to your project is: -services “services-config.xml”.

Sorry I flew through the creating a user/permissions section. It isn’t something I do very often so I was a bit lost myself. I’ll do it better in the next version.

Please comment below if you have any input on how this video tutorial could be better. I’ll re-record this tutorial when I feel that I’ve gotten enough feedback to make some quality improvements.

If something here has proved valuable to you then feel free to drop a couple of bucks in the tip-jar.

Post to Twitter Post to Delicious Post to Facebook Post to Reddit Post to StumbleUpon


similar posts

AMFPHP video tutorial : setting up AMFPHP

August 6th, 2008 . by polygeek

pgTV

This is a short, 4 1/2 minute, video on setting up AMFPHP

I’m doing this on Windows XP but the details aren’t much different for OS-X.

[ Other AMFPHP video tutorials ]

Lee Brimelow has a much more detailed setup in his first AMFPHP tutorial at GotoAndLearn.com. You should check that out if you have any problems. His code sample uses the NetConnection approach with Actionscript 3. I’m using the <RemoteObject> approach which is part of the Flex framework.

Please comment below if you have any input on how this video tutorial could be better. I’ll re-record this tutorial when I feel that I’ve gotten enough feedback to make some quality improvements.

If something here has proved valuable to you then feel free to drop a couple of bucks in the tip-jar.

Post to Twitter Post to Delicious Post to Facebook Post to Reddit Post to StumbleUpon


similar posts

   



polyGeek.com

© Copyright 2008 polyGeek.com / Dan Florio, All Rights Reserved Except Where Explicitly Stated
Web Developement Blogs - Blog Catalog Blog Directory
M2 Websites
Local Directory for Los Angeles, CA

Better Tag Cloud