• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 269
  • Last Modified:

ScrollPane External Control from Buttons in Flash 8

I give up before I pull all my hair out.......I am simply trying to load a large movieclip into a scrollpane so I can scroll the movie...and I want to be able to control frames from external buttons...I've googled, i've yahooed, and I've almost tossed a brand new 19" LCD across the room...help....

I'm fairly new, but in a bind. The code I'm working with can be found at http://dfwhomesales.com/flashhelp/main.zip

It should be simple...One file main.swf (I only included the .fla) has a scroll pane and loads a movieclip into the pane. It then has an external button that "should" move frames and control the movieclip within the scrollpane...but obviously it doesn't  or I wouldn't be typing this....

below I will post what I found as the closest solution googling around...

FYI...what I am trying to accomplish...This will be a form based app. The forms are already in pdf format..so I am going to import (and already have) into seperate swf...either as scenes or frames...I can't get either to work in the scroll pane. I would like to use an outside dropdown to decide which form swf to load. The use the external buttons to go from page to page....That way, when I fill out the form and go to print...I can resize and print just the area inside the scrollpane easily.


thanks in advance
0
chuckbeats
Asked:
chuckbeats
  • 2
  • 2
1 Solution
 
chuckbeatsAuthor Commented:
What I found googling:
--------------------------------------------------------------------------------

you need to set a reference to target the contents of a scroll pane. you cannot reference it directly. you need to use the getScrollContent() method.

say you want to send the the movieclip inside of your scroll pane to a frame labeled "chihuahua".

wrong:

ActionScript Code:
_root.myScrollPane.myMovieClip.gotoAndPlay("chihuahua");
right

ActionScript Code:
myMovieClipRef = _root.myScrollPane.getScrollContent();
myMovieClipRef.gotoAndPlay("chihuahua");__________________
0
 
Aneesh ChopraCommented:
Hi,

just replace your button code with the following:
--------------
btn.onRelease = function() {
      myMovieClipRef = _root.myScroll.content;
      trace(myMovieClipRef);
      myMovieClipRef.gotoAndPlay(5);
};
------------

you are done, enjoy

Rgds
Aneesh
0
 
Aneesh ChopraCommented:
following Issue were in your code:

1.
onRelease were not declared properly...

2.
use need to use ScrollBar.content property, instead of ScrollBar.contentPath

I hope all would be clear


Rgds
Aneesh
0
 
chuckbeatsAuthor Commented:
Thank you, thank you, thank you!!! This isn't the first  time you've bailed me out.
Thanks
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now