Category: Tutorials

  • Create a facebook feed for your website

    In order to get your facebook feed follow these steps.

    first go to:

    https://developers.facebook.com/apps

    Click +Create New App
    fill in an app name. ignore the rest. Click Continue.

    fill in the security word to get to the next screen.

    On this screen you will see a form for creating your app.

    fill in App Domains with the URl of the site that will show the feed.
    Click the Website with Facebook Login.
    fill in the url including the http:// before the site.

    Click Save Changes

    Once this is done you will need to copy your APP_ID and APP_SECRET codes

    Go to this link replacing APP_ID and APP_SECRET with the actual codes.

    https://graph.facebook.com/oauth/access_token?grant_type=client_credentials&client_id=APP_ID&client_secret=APP_SECRET

    when you go there you will get a page looking like this:
    access_token=46362638219919|Xmd7dfdfd8003kmsdksaoWWff0MX

    your access code is everything after the equal sign. save this code.

    next you will need the page name.

    go to facebook and go to the page you want the feed for.

    for instance to use the feed from this page:

    www.facebook.com/jasonmcalpin

    you will use the page name: jasonmcalpin

    go to the following URL replacing PAGE_NAME with the actual page name. Add the access_token to the end after the equal sign.

    https://graph.facebook.com/PAGE_NAME/feed?access_token=ACCESS_TOKEN

    congratulations you now have the JSON feed for your page.

    In the next post I will take you through styling it.

  • ActionScript Functions

    Here are a few tips when using functions in Flash.
    function callMe(){}

    object.variable1 = callMe();
    object.variable2 = callMe;
    There is a big difference in how a function works depending on if () are used.
    When you use () with a function you are calling it, at which point it runs its code and returns any values. When you do not use () it assigns the function to the variable name. The variable name will then be able to be used to call the function.

  • imbed your flash fonts

    Flash allows you to imbed the fonts along with the rest of your media. This makes sure everyone working on the file has the same font. It allows Windows and Macs the same access to the flash file. Even more importantly it allows you to name the font so that you know its usage. Even more importantly than that is if you need to revisit the file months or years later you can be confident that all the pieces you need to work from that file are included.

    To add a font in Flash do the following steps.

    1. Open your Library.
    2. Click the drop down in the upper right of the palette.
    3. Click New Font…
    4. A window will pop up where you can name your font. Personally I name them by their usage, such as page_header_arial_bold or drop_down_menu_eurostyle_ext. It’s always a good idea to use descriptive names in case you need to come back into the file months later.

    Thats all there is to it. Now go forth and build brand new flash files confident that you will never loose the font

  • To HTML or XHTML that is the question, isn’t it

    With HTML 5 coming into use even as I write this it seemed like a good time to look over the various document definitions I may be calling on when coding webpages.

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">

    The standard beginning to to XHTML 1.0 Strict documents. This is the standard DOCTYPE used across the web. You can learn which tags are no longer allowed here: zvon.org. You can follow this link to learn the rules that XHTML follows: W3G XHTML guidlines.

    Slightly older is:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
    "http://www.w3.org/TR/html4/strict.dtd">
    <HTML>
    <HEAD>
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">

    The main benefit of HTML over XHTML is that it has optional opening and closing tags and can even have empty tags. XHTML insists on the markup being properly closed and formatted. Although XHTML tags do allow you to open and close them in the same tag, such as <br />

    Now comes HTML 5.0 which adds many new elements and provides a way to play video and audio files without additional plugins. The beginning of the HTML 5.0 doc is as follows:

    <!DOCTYPE html>

    Thats it. HTML 5 is definitely designed to be much more streamlined than the two previous markup languages. They also changed

    <div id="header"> to <header>

    to name just one new tag. They are really  simplifying the markup so that they can push layout to the style sheet and just have the data in the html document. HTML 5.0 takes webpages one more step toward XML. You can find more information about HTML 5 here: w3 developer docs HTML 5 you can also find which browsers are supporting it at: Browser Comparison on Wikipedia