December 21st, 2008 Mark
This is something most Array examples don’t mention. When populating your array do not populate it within the Class above the Constructor function of that class. You must place it inside the Constructor or any other function.
Example:
package
{
public class SomeClassName
{
var someVar:String;
var someOtherVar:String;
var myHappyArray:Array = new Array();
//YOU WOULD THINK YOU COULD POPULATE myHappyArray HERE BUT DON’T
public function SomeClassName(){
//POPULATE YOUR ARRAY HERE OR IN SOME OTHER FUNCTION
myHappyArray.push(“smiles”,”everyone”,”smiles”);
}
}
????? ???? ??????? ?????? ?????? ??????
}
Posted in Action Script 3.0 | No Comments »
November 4th, 2008 Mark
As of lately this has become quite a nuisance regardless of browser or operating system but it seems to be prevalent in Flash Player 9 and 10 (if anyone notices in other Flash player versions please comment). One thing i have found is that in my actionscript using loadMovie ????? 36 ???????
and listening for bytesLoaded and bytesTotal has become somewhat of a failure. The “old-school” way I’ve preloaded was to loop and listen to these to variables for preload completion either with frame looping or onEnterframe looping. It appears the new school method gets me out of the timeout error territory with the loadClip function and using a MovieClipLoader listener. This gives you access to nifty events to listen for like onLoadError, onLoadProgress, and onLoadComplete. So embrace the MovieClipLoader and loadClip for any asset preload… you will sleep better.
Posted in Action Script 2.0, Code | No Comments »
August 25th, 2008 Mark
By default WordPress MU does not allow embed code even when using the HTML post feature. This is different from singe WordPress instances that do allow embedding.
The fix: Edit wp-include/kses.php. In that file search for “Post filtering” and then comment out the following lines:
// Post filtering
//add_filter(’content_save_pre’, ‘wp_filter_post_kses’);
Please note this will affect all blog instances within the WordPress MU installation.
This fix came from Simply-Basic.com ????? ???? ??????
Posted in Code, Wordpress, Wordpress MU | 1 Comment »
August 22nd, 2008 Mark
So there’s a bug in the wordpress query_posts() function with Pagination when you’re building a custom template and you want to view posts by category and have it limit a page to a certain numbers of posts. Most of the solutions in the WP forums are bogus. You get the page links but the pages are the same posts. As i suspected you gotta tweak the query and this guy has the perfect solution here. ??????? ?????
Posted in Code, Templating, Wordpress | 3 Comments »
August 7th, 2008 Mark
Saw a lot of possible fixes for this issue. The problem is in the General Settings of Podpress, when enabling Podtrac statistics nothing changes with the MP3 urls in the feed. All you have to do is format your uploads folder field named “URI of media files directory” like this:
http://www.podtrac.com/pts/redirect.mp3/www.YOURDOMAINNAME.com/wp-content/uploads
This is assuming you already have an account set up wih Podtrac.
Posted in Podpress, Wordpress | No Comments »
July 30th, 2008 Mark
Field of Dreams download If you keep getting this error it is because the element ID truly is null. But you say “But it’s write here on the page with a DIV id on it!”? Well you’re probably doing what I did – calling the getElementById before the DIV exists in the normal flow of the page. Put your call in a function call after the DIV on the page (not in the page header) and the issue goes away.
Posted in Javascript | No Comments »
May 2nd, 2008 Mark
Was trying to figure out the proper way to sort my WP_Query post results by category and found out that there are some buggy things with the sortby using WP_Query. I wanted to sort by cat_name then tried cat_id and cat_nicename. All work for the most part but would throw a post randomly out of order. So I ended up stacking my results into an object array and using the trusty PHP “sort”. Like this:
class an_object {
var $an_name;
var $an_slug;
}
$i=0;
$my_query = new WP_Query();
while ($my_query->have_posts()) : $my_query->the_post();
$an[$i] = new an_object();
foreach((get_the_category()) as $category) {
$an[$i]->an_slug = $category->category_nicename;
$an[$i]->an_name = $category->cat_name;
}
$i++;
endwhile;
sort($an);
$z=0;
while($an[$z]){
echo $an[$z]->an_name.” “.$an[$z]->an_slug.”<br />”;
$z++;
}
Posted in PHP, Wordpress | No Comments »