A Flash Developer Resource Site

Results 1 to 16 of 16

Thread: loadmovie

  1. #1
    FK Jedi Pimp
    Join Date
    Jan 2001
    Posts
    405
    Hey,

    I have some flash footers that i want to load into a site.

    I don't know how to load the flash footers exactly where i want them to load.

    How do i do this?

  2. #2
    deva_station
    Guest
    Code:
     onClipEvent(load){
    loadMovieNum("fileName.swf",1);
    }
    i think that is something like what you are looking for? hope that helps.

  3. #3
    deva_station
    Guest
    you can set the position of the loaded movie by adding the little extra code shown below:

    [code] onClipEvent(load){
    loadMovieNum("fileName.swf",1);
    }
    onClipEvent(enterFrame){
    _level1._x=150;
    _level1._y=50;
    } [code]

  4. #4
    Senior Member
    Join Date
    Jun 2001
    Location
    las vegas,nv
    Posts
    694
    deva_station;

    Thanks for the swf tip. I just tried it and by using a blank clip (enterFrame) in the main movie you can position the loaded swf in question anywhere on the main stage. Very cool.

    This site I'm working on now has a huge amount of high resolution jpeg's and this is just the ticket to keep file size down and content ready on demand and the best part is precise placement. Thanks!

  5. #5
    deva_station
    Guest
    sure no probs DZL,

    i often do this with images and sounds too. it allows me to create preloaders for each part of the site and enables idle areas of the animations to be unloaded.

    by the way you forgot to incude the URL for your site.

    chow

  6. #6
    Miss Understood miffy's Avatar
    Join Date
    Oct 2001
    Location
    Australia
    Posts
    150
    Originally posted by deva_station
    sure no probs DZL,

    i often do this with images and sounds too. it allows me to create preloaders for each part of the site and enables idle areas of the animations to be unloaded.

    by the way you forgot to incude the URL for your site.

    chow
    can you tell me what clip event means? hate to be so thick but i'm still getting my head around it.

  7. #7
    Senior Member
    Join Date
    Jun 2001
    Location
    las vegas,nv
    Posts
    694
    ClipEvent is the handler and in this case it's a blank clip (just code) that constantly (each frame) evaluates and sets conditions for the loaded swf. In our example it sets the _x and _y of the swf. Otherwise when you use loadMovie it just dumps the swf onto the stage with all the grace of the Jolly Green Giant after a case (truckload?) of brews.

    Using this method allows us to place the swf exactly where we want it which is vital for aesthetic reasons. EnterFrame means that the blank clip is constantly making sure the swf stays put. In basic form it looks like this:

    onClipEvent(enterFrame){
    doYourStuffHereEachFrame;
    }

  8. #8
    Miss Understood miffy's Avatar
    Join Date
    Oct 2001
    Location
    Australia
    Posts
    150

    thanks

    thank you

  9. #9
    Junior Member
    Join Date
    Nov 2001
    Posts
    21

    Smile Re: thanks

    I needed to learn that too ..cool

  10. #10
    Miss Understood miffy's Avatar
    Join Date
    Oct 2001
    Location
    Australia
    Posts
    150
    Originally posted by deva_station
    you can set the position of the loaded movie by adding the little extra code shown below:

    [code] onClipEvent(load){
    loadMovieNum("fileName.swf",1);
    }
    onClipEvent(enterFrame){
    _level1._x=150;
    _level1._y=50;
    } [code]
    hi i tried to do this and i got an error message saying "Clip events are permitted only for movie clip instances"
    where does this script go? i tried using it instead of load movie as i thought this is where it'd go. can you enlighten me
    cheers
    miffy

  11. #11
    Senior Member
    Join Date
    Jun 2001
    Location
    las vegas,nv
    Posts
    694
    miffy,

    Just create a blank clip with nothing in it. (The code doesn't reside within the clip itself.) Then drag a copy of it on to the stage and add the code there in the actions panel. Provided you haven't tried to nest onLoad and enterFrame together you shouldn't get any error messages.

    You may need to click on the white dot to get the actions panel to go from frame actions to object actions. That may be your problem. In fact, this happens quite a bit even with normal clips. If you try to type in the clip event actions while the actions panel is in frame mode you'll get the error you described when you test the movie. It has to be one of these things.

  12. #12
    Junior Member
    Join Date
    Nov 2001
    Posts
    21
    hi, well I have a few problems 2... I created a movie clip placed it on the main time line, and set the actions... but it doesn't load the swf file.

  13. #13
    deva_station
    Guest
    show us your version of the code and the file name you wish to load

  14. #14
    Junior Member
    Join Date
    Nov 2001
    Posts
    21

    Thumbs up

    oops... my mistake it works .. is there another way to do this ?? because one of my friends tried to explain to me a way but I didn't understand much... but he said something about coordinates so maybe he was talking about the same thing.

  15. #15
    deva_station
    Guest
    there can be more than one way of doing something, obviously the long and short way. I dont really care as long as it does the job i want i'll be well happy!

  16. #16
    Miss Understood miffy's Avatar
    Join Date
    Oct 2001
    Location
    Australia
    Posts
    150

    Smile worked for me

    well i'm happy. it worked for me.
    thanks to you deva_station


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