SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Member
    Join Date
    Jun 2002
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Movie into an object or with coordinates.

    hi

    can somebody tell me how i can do the following? i want to load a flash movie into another one. The movie i want to load has the size 165x263px. in the movie i want to have that part it sould be at a specific position (coordinates x=-82 and y=-130.9).
    so, can i load the movie as filling into a rectangle or just load the movie into a layer x at the specific position? what is the action code for that?

    thx for you help
    With best regards

    Darkside_Golem

  2. #2
    SitePoint Zealot flashswami's Avatar
    Join Date
    Jun 2002
    Posts
    101
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The way to do this is to create, then place an empty movieclip on your swf's stage. You will load your second swf into this empty mc.

    First place this code on your empty mc (BTW, call this mc 'holder')-

    Code:
    onClipEvent(enterFrame){
    this._x=-82; 
    this._y=-130.9;
    }
    Now, either on a frame or button action use this code-

    Code:
    loadMovie("second.swf", "holder");
    Which will load a movie called second.swf into the blank movieclip 'holder'.

    Thats it.
    FlashSwami //Flash & server side fun
    DotDragNet //General web help
    [>Now available for freelance web work<]

  3. #3
    SitePoint Member
    Join Date
    Jun 2002
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    well, i tryed that out... perhaps i dont have understood something right or something else was going wrong... i get the message:
    scene=Mainsite, Layer=Holder, Frame=1: Line 1: Clip events are permitted only for movie clip instances onClipEvent(enterFrame){this._x=-82; this._y=-130.9;}

    i did the following:
    i started my flashsite (called SRAS HP) and the scene 1 is called "Mainsite". in this scene i have 3 layers: the first is a text (layer called text), the second is the layer where the movie should be placed (called Holder??) and a third which is the background picture (called background).

    in the first frame of the "holder"layer i entered your code: onClipEvent(enterFrame){this._x=-82; this._y=-130.9;}

    at the first frame of the layer "text" i entered your code: loadMovie("second.swf", "holder");

    so, what have i done wrong??

    thx for your assistance!
    With best regards

    Darkside_Golem

  4. #4
    SitePoint Zealot flashswami's Avatar
    Join Date
    Jun 2002
    Posts
    101
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    in the first frame of the "holder"layer i entered your code: onClipEvent(enterFrame){this._x=-82; this._y=-130.9;}
    Thats the problem- this code needs to be placed on an *empty movieclip*- not a layer.
    FlashSwami //Flash & server side fun
    DotDragNet //General web help
    [>Now available for freelance web work<]

  5. #5
    SitePoint Member
    Join Date
    Jun 2002
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    plz look pm
    With best regards

    Darkside_Golem

  6. #6
    SitePoint Zealot flashswami's Avatar
    Join Date
    Jun 2002
    Posts
    101
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Grab this file, it'll help you out-

    http://www.flashswami.com/downloads/loadexample.zip

    HTH
    FlashSwami //Flash & server side fun
    DotDragNet //General web help
    [>Now available for freelance web work<]

  7. #7
    SitePoint Member
    Join Date
    Jun 2002
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    NOW IT WORKS!!

    first it was still not working. as i looked at your action script, there are properties at the bottom. but if i create an action script there are no properties. then i found out, that in the instances i have to give also the name holder. then it worked.
    i also discovered a easier way for my idea (to load it randomly) now.

    thx for your help! i get now a little piece further on my project

    PS: i see... i was in expert mode instead of normal mode...
    With best regards

    Darkside_Golem


Bookmarks

Posting Permissions

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