A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: Load Movie Help

  1. #1
    Junior Member
    Join Date
    Apr 2001
    Posts
    22
    I have a couple of questions.

    1. When I load a movie on top of another how can I position it where I want it? Example my movie is 800x400 and my new movie is 400x200 and I want to load it at the bottom center.

    2. In the movie I am loading on top I would like to load text to it from another file example.txt. How is this done? I have tried loadvariables and loadmovie but nether worked.


    Thanks and sorry if this sounds stupid
    Eric


  2. #2
    Senior Member sofiebel's Avatar
    Join Date
    Feb 2001
    Posts
    1,044
    In a frame, you create a MC and make it a square that is 400*200. Only leave the outlines of the square, set the colors to be the same as your background or set it's alpha to 0%, anyway, make it so that you don't see it in your main movie. You name this MC for example 'movieframe'. Place it in your movie where you want the smaller movie to be placed. When you set the action LoadMovie you can choose Target from the drop down menu. Add movieframe to the box next to it. This should answer your first question.

    Then for the second. You create an external textfile that start with: text=and here follows the text you want to be loaded.
    This means I've set my variable to 'text'. Now in your movie, you create a dynamic text box and also name it 'text'. Of course you can change the names of the variables, just make sure they match.
    You use the loadvariables to, of course, load the variables.

    This should to it, unless i've looked over something. I didn't check, I just how I think it is done. I've encounter eny problems, feel free to ask!

  3. #3
    Junior Member
    Join Date
    Apr 2001
    Posts
    22
    Thanks alot
    With the load movie it is still not working I am not sure what I have done wrong. I created a mc named container and then put it into my existing scene on a new layer. Then on buttun release
    Code:
        loadMovie ("aboutme.swf", "_root.container");
    Is this correct?


    Load Text
    When I bring out my dynamic text do I set the variable in the text options to text? This is what I came up with but I still can not get the text to show up.
    Code:
    loadVariables ("aboutme.txt", "text");

  4. #4
    Senior Member sofiebel's Avatar
    Join Date
    Feb 2001
    Posts
    1,044
    you do not really need to use the _root.container. container itself is ok. But that is not the answer to why it isn't working. Do you see your movie but not in the wright position, or do you see nothing at all?

  5. #5
    Junior Member
    Join Date
    Apr 2001
    Posts
    22
    When I set the container to alpha 0% I see nothing. When I leave it at 100 I can see my loaded movie. Now it is not in the right place.

  6. #6
    Senior Member sofiebel's Avatar
    Join Date
    Feb 2001
    Posts
    1,044
    I guess I was wrong about the alpha-setting. Just make it match the color of your background. The reason it is not in the wright place is probably because of the settings of the rectangle in your MC. You have to set the x and y value to zero, but not from the middle of your square but from the left top. Hard to find the exact words for it... So the little cross has to be on the left top of your square when you put it on your main movie. This should get it in the wright position.

    For the loaded text use:

    loadVariables ("aboutme.txt", "_root.container");

    in the first frame of your movie that has to go into the target 'container'.

  7. #7
    Junior Member
    Join Date
    Apr 2001
    Posts
    22
    Thanks,
    Finally got it to work.

    Now with the text again. Do I create another contanier mc in this movie then put it where I would like the text to show up? Or can I just use the dynamic text block for the inport place?

    Sorry I am kinda of slow


  8. #8
    Junior Member
    Join Date
    Apr 2001
    Posts
    22
    Got the text to work

    Here is what I did

    frame 1
    Code:
    loadVariablesNum ("aboutme.txt", 0);
    frame 3
    Code:
    if (contentLoaded == "1") {
        play ();
    } else {
        gotoAndPlay (2);
    }
    Then in my text file
    text= my text

    I found a thread on it.
    Thanks again for the help

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