A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: Get a handle on the handle_mc in a SEEKBAR

  1. #1
    Senior Member 4romAshz2Flashz's Avatar
    Join Date
    Mar 2004
    Location
    Ontario, Canada
    Posts
    213

    Get a handle on the handle_mc in a SEEKBAR

    I have a normal FLV seekbar component and I have rotated it slightly diagonal. The problem is when it plays the handle_mc continues in a straight line. How can I alter the course of the handle_mc? Thank you.



    Also, is it better to call the FLV components within the main FLA...or within the FLA that contains the FLV? The problem I have when attaching components to an FLV using my main timeline is that they don't work the first time they load. However, the second time their loaded they do. This only happens on the internet. Any ideas how this could happen? Thank you.
    Imagination is more important than Knowledge- Albert Einstein

  2. #2
    Product Designer keyone.it's Avatar
    Join Date
    Aug 2001
    Location
    Rome, Italy.
    Posts
    1,625
    Starting again from saying that components are total crap..

    If you want your handle to be transformed as the rest, you need to fit everything inside a MovieClip and transform it. Everything inside will receive relative transformations.

    For the loading problem, I have no idea what the problem is, but usually when dealing with components you need to use an external preloader (components need to be loaded in first frame, thus preventing an embedded preloader from being displayed soon enough)... and with an external preloader you would usually proceed this way:

    create an empty mc and use the MovieClipLoader class to load the final file in it.
    before the final file is executed (so at the onComplete event) you destroy the containing mc and re-load the final movie directly on stage, with a simple:
    _root.loadMovie("url");

    The second time it will load instantly, having been cached.

    If you need the movie to be loaded fresh everytime the user opens it's window, you can generate a random variable, that will be attached as a GET argument to both requests (thus caching the movie, but only for the single page request).
    Altruism does not exist. Sustainability must be made profitable.

  3. #3
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    hi,
    just a quick note on another way to deal with preloading anything that needs 'export on 1st frame'. If you un-check that 'export on 1st frame' and manually place the symbol/component on an empty and never visited keyframe, they will work as well, and you'll be able to have a normal preloading sequence.

    gparis

  4. #4
    Product Designer keyone.it's Avatar
    Join Date
    Aug 2001
    Location
    Rome, Italy.
    Posts
    1,625
    Hey gparis, I never thought of that..

    Once you get about advanced programming you miss some of the most basic and practical solutions... hehe..
    Altruism does not exist. Sustainability must be made profitable.

  5. #5
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    Stick in here and you'll never forget these

    gparis

  6. #6
    Senior Member 4romAshz2Flashz's Avatar
    Join Date
    Mar 2004
    Location
    Ontario, Canada
    Posts
    213
    Thank you keyone.it...I thought for sure I was going to have to do some actionscript to get that handle_mc to work properly.

    Perhaps its because I work the night shift...and not quite awake yet. But, i dont' fully understand gparis's method. Could you please explain it in more detail?
    Imagination is more important than Knowledge- Albert Einstein

  7. #7
    Product Designer keyone.it's Avatar
    Join Date
    Aug 2001
    Location
    Rome, Italy.
    Posts
    1,625
    It's pretty simple, in fact it's the anti-scripting method

    Flash movies load on a frame basis. So if you place all your stuff on frame 2, you can put a preloader on frame 1.
    All you will need to add is a stop() action on frame 2, to prevent the movie from looping, and add the preloader actionscript on frame 1 (or within the preloader itself).

    In case you are using components, you obviously need them to be fully loaded BEFORE you use them. For this reason there is a built-in feature that automatically loads all the components along with frame 1 content, so that you are sure they become available as soon as the movie starts working.
    This, as I said, prevents a preloader from working (because frame 1 will take probably most of the loading time, so the preloader will appear only once the movie is nearly fully loaded).

    But, what you can do, is uncheck the "load into first frame" option from the Linkage panel (that you access right clicking on the component's name in the Library).
    At this point you need to manually preload the components, like this:

    frame 1 - preloader (with preloader actions);
    frame 2 - all your components (with a gotoAndStop(3) action, so that frame 2 doesn't show);
    frame 3 - your content (with a stop() action, so that movie doesn't go back to frame 1 and loop);


    This way you are sure that all the components used in frame 3 have already been loaded for frame 2 and are therefor available.




    EDIT: I'm sure you noticed that there is no need to put a stop() action on frame 3, if frame 2 has a gotoAndStop(3) action... in fact it is better, in my opinion, to put double safe "locks" in such cases, because you might modify your project later on and forget about having to take care about fixing every related action. Another good reason is that unless you disable the context menu, users can manually navigate the movie with "Back", "Forward" and "Play", preventing some of your methods from working.
    Last edited by keyone.it; 02-10-2007 at 06:31 AM.
    Altruism does not exist. Sustainability must be made profitable.

  8. #8
    Senior Member 4romAshz2Flashz's Avatar
    Join Date
    Mar 2004
    Location
    Ontario, Canada
    Posts
    213
    Thank you so much keyone.it, I really appreciate your help. I should of probably explained this earlier but my components are actually loaded in the main timeline...and the FLV is loaded in seperate .SWF (components are attached when file is loaded). I put the preloader on and now the seekbar has no problems working the first, second, third, etc time around. Thanks again
    Imagination is more important than Knowledge- Albert Einstein

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center