Link to home
Start Free TrialLog in
Avatar of chuckbeats
chuckbeats

asked on

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
Avatar of chuckbeats
chuckbeats

ASKER

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");__________________
Avatar of Aneesh Chopra
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
ASKER CERTIFIED SOLUTION
Avatar of Aneesh Chopra
Aneesh Chopra
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank you, thank you, thank you!!! This isn't the first  time you've bailed me out.
Thanks