A Flash Developer Resource Site

Results 1 to 9 of 9

Thread: VR Pan.swf keeps sticking when loaded externally

  1. #1
    Junior Member
    Join Date
    Jul 2007
    Posts
    17

    VR Pan.swf keeps sticking when loaded externally

    Hey,

    I have created a VR pan.swf that works well but when loaded into an ongoing project (through a blank MC and action script loader.loadMovie("pan.swf")) it keeps sticking and I have to go out of the frame and back in randomly.

    I loaded it into a new blank /project and it works. Very confused .

    Hope someone can help.

    Cheers
    P.

  2. #2
    Junior Member
    Join Date
    Jul 2007
    Posts
    17
    I think it has something to do with the getBounds command on the stroke i have around the pan (when the mouse goes over the stroke the pan stops). I think these boundaries have changed but how do I reset / change them back?

    This is the external flash pan script, i might help.

    panel.onRollOver = panelOver;

    function panelOver() {
    this.onEnterFrame = scrollPanel;
    delete this.onRollOver;
    }

    var b = stroke.getBounds(_root);

    function scrollPanel () {
    if (_xmouse<b.xMin || _xmouse>b.xMax || _ymouse<b.yMin || _ymouse>b.yMax) {
    this.onRollOver = panelOver;
    delete this.onEnterFrame;
    }

    if(panel._x >= -30){
    panel._x = -30;
    }

    if(panel._x <= -5750){
    panel._x = -5750;
    }

    var xdist = _xmouse - 250;

    panel._x += -xdist / 7;
    }

  3. #3
    Moderator whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,755
    var b = stroke.getBounds(_root);

    do you wanna be using -root?..or the clip you loading the .swf into?

  4. #4
    Junior Member
    Join Date
    Jul 2007
    Posts
    17
    hey, thanks again.

    The _root. does need to be changed to the external.swf bounds. What do I type instead?

    Sorry to be rubbish.
    P.

  5. #5
    Moderator whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,755
    Im not sure.. can you post the .fla ..

    hard for me to visualize what your doing with just that little bit of code..

    rollOver and scroll something...

    maybe try using the 'container' you are loading into??

  6. #6
    Junior Member
    Join Date
    Jul 2007
    Posts
    17
    Hey they are just too big to post, can i email you them?

    If not im sure you have named the problem, in the external.swf i have the code
    var b = stroke.getBounds(_root); // (stroke being a borderMC around a jpeg that pans on a rollOver)
    its just changing the (_root) to the new scene/swf. its being loaded inside a MC within the main scene/timeline.

    Cheers.
    P.

  7. #7
    Moderator whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,755
    ok.. I think I understand better...

    that code (with the _root reference) is in the external.swf..

    have you tried using _lockroot in each of the external.swf'?

  8. #8
    Junior Member
    Join Date
    Jul 2007
    Posts
    17
    just tried the _lockroot, it removes the boundaries and doesnt seem to work.

    With the (_root) on the boundaries appear to be lower and to the right of the loaded MC and its boundaries, is that any help? I tried moving the loaderMC lower and right but the boundaries just follow it.

    I made the external.swf the same size (800x600) as the new timeline, but still the sam e problem.

    Is it possible to email you the .fla's ??

  9. #9
    Junior Member
    Join Date
    Jul 2007
    Posts
    17
    Hey, i have kinda fixed it. I made the external 800x600 (the same stage size) and lined up the movie in the exact place that i wanted in and it works.

    One problem the btns on the external need to load up a frame in another MC which is inside another MC (the _parent. wont work because the external is within the same MC and i need to goto the 1st frame, (play the) MC and goto its 17th frame instantly.

    Any ideas?!

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