Grogler

my interests and experiences
RSS icon Email icon Home icon
  • Biking… what more can I say

    Posted on June 7th, 2008 whodeee No comments

    This is an ongoing list of the rides I’ve been on, I will probably enhance this a bit in the future.

    April 5, 2008 - http://www.mapmyride.com/ride/united-states/wi/sussex/894990639

    April 20, 2008 - http://www.mapmyride.com/ride/united-states/wi/sussex/894990639
    the same as 4/5 but reversed

    May 10, 2008 – http://www.mapmyride.com/ride/united-states/wi/sussex/111907771228

  • create chapters in an FLV like a DVD

    Posted on June 5th, 2008 whodeee 24 comments

    Since flash doesn’t have anything built into it for setting chapters or in and out points in an flv, I thought I would take it upon myself to figure it out.

    Here is what I came up with:

    (Either JavaScript is not active or you are using an old version of Adobe Flash Player. Please install the newest Flash Player.)

    1. Add an instance of the FLVPlayback component to your stage and give it an instance name of “flv” – catchy, hey?

    2. add the following actionscript to the first frame of your timeline

    var listenerObject:Object = new Object();
    var curTime;
    function playChapter (startSecond:Number, endSecond:Number) {
    listenerObject.playheadUpdate = function (eventObject:Object):Void {
    curTime = flv.playheadTime;
    trace(curTime);
    if (curTime>=endSecond) {
    flv.pause();
    }
    }
    flv.seekSeconds(startSecond);
    flv.play();
    }
    flv.addEventListener("playheadUpdate",listenerObject);

    3. link the instance of your FLVPlayback component to an flv of your choice.

    4. create chapter buttons on the stage

    5. place this code on the buttons

    on(release){
    playChapter(2,5); //change these numbers to your start time and stop time, in seconds
    }

    **Note** Make sure you encode your FLV with at least a keyframe every 1 second otherwise you won’t be able to start and stop at the correct times.  For this example I have it keyframe every 15 frames, cause the video plays 15fps.

    Good Luck!

  • After Effects Keyboard Shortcuts – Next Frame / Previous Frame

    Posted on April 30th, 2008 whodeee 11 comments

    I finally got fed up and wanted to find the shortcut key for the next and previous frame in After Effects.  I googled it and came up with a useful blog

    The shortcuts for next and previous frames are the “Page Up” and “Page Down” buttons. 

    Thanks Greasy PC!

  • movieclip instance name to string

    Posted on April 8th, 2008 whodeee 3 comments

    The way to get the instance name of a movie clip to a string is to use

    [instanceName].toString();

    rather than

    instanceName.toString();

    the later will just return something to the effect of [Object object]
    This is a very simple script, but it also can be very useful!

  • Flash – dynamic text color and styles

    Posted on March 28th, 2008 whodeee 3 comments

    Another nuance of dynamically loaded text. In order to have your dynamic text have different colors or styles, what you need to do is select the “Render as HTML” button in the properties for your text box. Click either Bold or Italic, in the properties pane, then you need click the embed font button and select the character you want to embed. This will allow you to style that text box with the style you chose.

    If however you want to change the text within the same text box that requires a bit more work. You will have to create 3 text boxes 1 on stage and 2 off stage. The one on stage will be the normal style. Embed the characters for that text box, and then for the other two off stage, set one to be bold and the other to be italic, and then embed the characters for those. This will allow you to add dynamic HTML content that has both bold and italic styles in one text box.

    I have also found that you should write out in long hand the < and > symbols as &amp;&lt; and &amp;&gt;. Flash doesn’t seem to like to load the content if you aren’t typing them out that way.

    One final thing about text color in a dynamic text box. This can be achieved by using the deprecated HTML font tags and adding your color to them. For example:

    <FONT COLOR='#721d87'><B>www.grogler.com</B></font>

    NOTE – Be sure to use the long hand version of the greater than and less than symbols.

  • Flash Scrollpane – mouse wheel

    Posted on March 25th, 2008 whodeee 2 comments

    This was something that was driving me nuts a few months ago so I thought I would add it here. When I was dynamically loading content into a scrollpane in flash, I wanted to use the mouse wheel to scroll the content. I could adjust the amount that it would scroll by using:

    ///my_sp is the instance of the scrollpane
    my_sp.vLineScrollSize = 50;

    But it seemed to just randomly scroll every once in a while. I realized that is was because the mouse pointer just happened to be on the loaded text at that given time. So the work around I found for this was to add a rectangle to the lower most layer of the movieclip that was being loaded into the scrollpane. I set the alpha of it to zero and wahlah – it worked. Seems like a flaw in the scrollpane if you ask me.

  • Hello world!

    Posted on March 20th, 2008 whodeee 1 comment

    I am in the midst of redesigning my site, if you couln’t tell already. I will try it have as much info up asap. thanks for the patience.