A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Code to play movie outside of scrollpane

  1. #1
    Member
    Join Date
    Aug 2007
    Posts
    40

    Code to play movie outside of scrollpane

    Basically I have used this code on a button when I want to play a movie:


    on (press) {

    //load Movie Behavior
    if(this.Work == Number(this.Work)){
    loadMovieNum("NADP1.swf",this.Work);
    } else {
    this.Work.loadMovie("NADP1.swf");
    }
    //End Behavior

    }


    How do I do this if the button is located within a movie within a scrollpane. The movie is outside of the scrollpane.

    Thanks-

  2. #2
    Member
    Join Date
    Aug 2007
    Posts
    40
    I know this post is several years old, but I thought I would activate the question again.

    Thanks!

  3. #3
    . fruitbeard's Avatar
    Join Date
    Oct 2011
    Posts
    1,780
    Hi,

    You might need to attach your *.fla for this one as scrollpanes can be different according to which as version and cs version you use.

  4. #4
    . fruitbeard's Avatar
    Join Date
    Oct 2011
    Posts
    1,780
    Hi,

    Without seeing your file or other code, you can do it from outside of the scrollpane, which is better than on the button itself.

    so remove the code from the button and try this
    PHP Code:
    scrollPaneName.contentPath "movieClipinLibraryName";
    scrollPaneName.content.myButtonName.onPress = function()
    {
        if (
    this.Work == Number(this.Work))
        {
            
    loadMovieNum("NADP1.swf"this.Work);
        }
        else
        {
            
    this.Work.loadMovie("NADP1.swf");
        }
        
    trace("clicked");
    }; 
    or alternatively attach your *.fla

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