A Flash Developer Resource Site

Page 1 of 2 12 LastLast
Results 1 to 20 of 21

Thread: can i load a video using

  1. #1
    Senior Member pelegku's Avatar
    Join Date
    Nov 2002
    Posts
    116

    can i load a video using

    loadMovie, and the movie i am loading is a video that i have imported into the fla
    ,made an swf of it and now i want to load and play it!
    is it possible?
    if not is there any other way?
    beacuse if i have 100 movie s to show i can't make an swf that weight's 100 MB!
    thanks in advance
    peleg

  2. #2
    Wildform Moderator
    Join Date
    Sep 2000
    Posts
    2,070
    Hi.
    Yes, you can use LoadMovie to load the SWF you made (it sounds like you're saying that you made a SWF of an FLV).
    For more information on using LoadMovie, you can check out our tutorials at:
    http://www.wildform.com/tutorials

    jb

  3. #3
    Senior Member pelegku's Avatar
    Join Date
    Nov 2002
    Posts
    116

    thats didn what i was asking

    i know how to u use loadMovie!

  4. #4
    Wildform Moderator
    Join Date
    Sep 2000
    Posts
    2,070
    What were you asking?

  5. #5
    Senior Member pelegku's Avatar
    Join Date
    Nov 2002
    Posts
    116

    my question is:

    i want to show a video (like avi,mpg....)
    i dont to upload the video in advance!!!
    beacuse if i do that the swf will weight about 100MB!
    what i thought of doing is to make 100 swf that each 1 contains execlly 1 video!
    and in run time by using loadMvie() i will load a diffrent swf containning a diffrent swf
    is that posiible?
    if not what else can i do?

  6. #6
    Wildform Moderator
    Join Date
    Sep 2000
    Posts
    2,070
    I'm sorry, but I'm still confused about what you're asking.
    Are the videos in AVI, MPG or SWF?
    If you've converted them to SWF then yes, you can load them at run time.
    Do you want to load a different video randomly? Or do you want to let people select?

    jb

  7. #7
    Flash Video Moderator Wheels's Avatar
    Join Date
    Dec 2000
    Location
    Minneapolis
    Posts
    1,590
    The answer is yes.

    Use loadMovieNum(); and load to _levels. You just need buttons to tell the main movie which one to load, and where (to a _level).

    So you'll have 101 movies.

    one Called main.swf
    100 of different names ("name.swf")

    You'll load to level 1 (_level1)

    You load to the main.swf w/loadMovieNum("name.swf", 1);

    If you compress your movies properly, they will stream as they load.

  8. #8
    Senior Member pelegku's Avatar
    Join Date
    Nov 2002
    Posts
    116

    THANKS IT WORKED BUT ....

    what is the execlly diffrence between loadMovieNum() and loadMovie()

  9. #9
    Flash Video Moderator Wheels's Avatar
    Join Date
    Dec 2000
    Location
    Minneapolis
    Posts
    1,590
    The two methods were very similar before Flash MX, so there has been quite a bit of confusion about how to use them. But MX is very specific about how they get used.

    loadMovie(); is used for loading into movie clips.

    loadMovieNum() is used to load to a _level

    The same holds true for their conterparts:

    unloadMovie();

    unloadMovieNum();

    removeMovieClip(); is used for MC's that were loaded from linkage with attachMovieClip();

    Glad it worked.

  10. #10
    Senior Member pelegku's Avatar
    Join Date
    Nov 2002
    Posts
    116

    Thanks again and another question if i may....

    i read some where that if u have movieClips in the Library and you dont put them any where in a time line in the movie, when we will make swf they will be deleted!
    is that correct? can't i use the the movieClip's that are in the Librery at run-time in the movie?
    thanks again

    peleg

  11. #11
    Flash Video Moderator Wheels's Avatar
    Join Date
    Dec 2000
    Location
    Minneapolis
    Posts
    1,590
    Yes, that's how you use attachMovieClip();

    They don't have to be on the stage, but under the properties in the library (or linkage) you simply give it a linkage name, check the "export" checkbox.

    Then you call it to the stage with:

    _root.attachMovieClip("linkageName", "newName_mc", 1);

    1 being a _level.

    You then target it with _root.newName_mc.play(); for example.

    These clips can have MC's and scripts inside them. It helps to use _parent when targeting from within the clips used this way.

    I use this method often to duplicate things like buttons and text boxes with loops.
    Code:
    makeButtons = function(){
                var i=1;
                while (i>5){
                     _root.attachMovieClip("myButton", "newButton"+i, i);
                     _root.newButton[i]._x = i+40;
                      i++
                }
    }
    makeButtons();

  12. #12
    Senior Member pelegku's Avatar
    Join Date
    Nov 2002
    Posts
    116

    ok anothr question is is there a way to change

    the regPoint of a movieClip?

  13. #13
    Flash Video Moderator Wheels's Avatar
    Join Date
    Dec 2000
    Location
    Minneapolis
    Posts
    1,590
    Sure, that's what this line does:

    Code:
                     _root.newButton[i]._x = i+40;

  14. #14
    Senior Member pelegku's Avatar
    Join Date
    Nov 2002
    Posts
    116

    how is it possible?

    when u do _x it means u change the location of the x coordinat not the regpoint!

  15. #15
    Flash Video Moderator Wheels's Avatar
    Join Date
    Dec 2000
    Location
    Minneapolis
    Posts
    1,590
    Unless the registration point is 0,0. Just make sure your movie clips are set up with the registration point at 0,0 and base everything off of that.

    This is a common practice for us old-timers. But if need be, you can always do calculations to find the reg. point offset first.

  16. #16
    Senior Member pelegku's Avatar
    Join Date
    Nov 2002
    Posts
    116

    if so how can i find what is the regPoint of a movie

    of a movieClip i import?

  17. #17
    Flash Video Moderator Wheels's Avatar
    Join Date
    Dec 2000
    Location
    Minneapolis
    Posts
    1,590
    You want to call this function to load your movie.
    Code:
    function placeMovie(){
         loadMovieNum("my.swf", 99);
         this.onEnterFrame =function(){
               if(_level99._currentframe==1){
                      _level99.stop();
                      _level99._visible=false;
                      _level99._x=100;
                      _level99._y=200;
                      _level99._visible=true;
                      _level99.play();
                      this.onEnterFrame=null;
                 }
         };
    };
    placeMovie();

  18. #18
    Senior Member pelegku's Avatar
    Join Date
    Nov 2002
    Posts
    116

    another question :

    how or can i swap the "locz/depth" of a mc that i have put on stage?
    like make it up 10 layers or lower 10 layers?
    if yes then how?
    thnaks
    peleg

  19. #19
    Flash Video Moderator Wheels's Avatar
    Join Date
    Dec 2000
    Location
    Minneapolis
    Posts
    1,590
    You can try:
    Code:
    _level99 = _level89;
    If that doesn't work, I'm not sure.

    Are you talking about levels inside MC's or levels on the stage?

  20. #20
    Senior Member pelegku's Avatar
    Join Date
    Nov 2002
    Posts
    116

    i talk about level's on stage!

    i talk about level's on stage!

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