Scrolling a movieclip

How do I have a standard ScrollBar (or ScrollPane) scroll a
custom MovieClip?
Basically, I am creating a custom menu list, and need to have
a standard looking scroll bar able to scroll all of the items. If I
am making this from scratch, what is the best method? It seems that
the ScrollBar component only works with a TextField, and that the
ScrollPane only works with importing external images or SWFs. Is
there a way to use the ScrollPane to target a MovieClip?

Found this option online:
http://www.flashscaper.com/blog/?p=3

Similar Messages

  • Horizontal scroll a movieclip in iOS

    Hello,
    I'm trying to found some extension or library to horizontally scroll a movieclip in a iOS aplication made with AIR 3.5.
    I tried some, but the perfomance are not so good, even in iPhone 5 or iPhone 3Gs, so if anyone knows a good way to do it, i'll be thankful.

    I just played a little with tweenlite, and bought a GreenSock Club membership, to get all the plugins. A bit expansive, but totally worth it, now my scroll works very well when moving a very big image, even in the old iPhone 3Gs.
    Thank you for your advices.

  • Dynamic Scrolling of MovieClip

    Hi everyone,
    I have an application in which i am making a dynamic photo
    gallery. I have made a scroller movieClip "thumbs_mc". Now i want
    to make it scroll. for that i created 2 movieClips ,left and right.
    and wrote some code. but its not working.
    1st depth is the main picture's movieClip's depth, 2nd depth
    is thumbs_mc, 3rd is mask movieClip. 4th and 5th are for left and
    right. Also, I am creating movieClips within Thumbs_mc for holding
    thumbnails.
    and two buttons leftScroll and rightScroll.
    can anyone tell me, why is it not working?, how should i
    modify it..
    waiting for someone to throw some good light on this peice..
    Thanks

    here are my files, Please have a look at them..I want to make
    the thumbnail movieclip scrolling...
    [deleted]
    I want to make the thumbnail movieclip scrolling...
    Thanks alot

  • Scrolling event: movieclip instead of dynamic text

    Hello everybody. I am very very novice to actionscript, so probably my question will sound a little silly.
    I am trying to put an arabic text to scroll with a custom scrollbar. So I found a nice video in youtube about doing that with a dynamic text field. It works wonderful for latin characters (left to right and separated letters) but unfortunately not for arabic characters (they don't get connected). Actually, I don't care to use just a movieclip with the text instead of the dynamic text field. But I don't know how to change the actionscript code for the movie clip instead of the dynamic text field.
    Here I show you the code for the scrolling text in a dynamic text field (it's a short code), on the stage I got just the dynamic text field (instance name: texto_txt), the scrollBar (a vertical line, instance name: scrollBar_mc) and the scroller itself (a little rectangle, instance name:scrollHandle_mc):
    var content:String = "cjeihfirehjfejlkfjkerjfirjfejifjrijwkjfirwjekñlkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkllllllll";
    texto_txt.text = content;
    texto_txt.wordWrap = true;
    var min: Number = scrollHandle_mc.y;
    var max: Number = min +(scrollBar_mc.height - scrollHandle_mc.height);
    var intervalo: Number = max - min;
    var arrastrando: Boolean = false;
    var bounds: Rectangle = new Rectangle (scrollHandle_mc.x, scrollHandle_mc.y, 0, scrollBar_mc.height - scrollHandle_mc.height);
    scrollHandle_mc.addEventListener (MouseEvent.MOUSE_DOWN, arrastrandoScroll);
    stage.addEventListener (MouseEvent.MOUSE_UP, stopIt);
    function arrastrandoScroll(mouseEvent:MouseEvent)
    scrollHandle_mc.startDrag(false,bounds);
    arrastrando = true;
    scrollHandle_mc.addEventListener(Event.ENTER_FRAME, progress);
    function stopIt(mouseEvent:MouseEvent)
    scrollHandle_mc.stopDrag();
    arrastrando = false;
    function progress(e:Event)
    var moverScroll:Number = scrollHandle_mc.y - min;
    var percent:Number = moverScroll/intervalo;
    if (arrastrando == true)
    texto_txt.scrollV = percent * texto_txt.maxScrollV;
    What I want to do is clear the dynamic text field and use instead a movieclip (text_mc) that includes already the text, the bounding box would be a mask. How do I change the actionscript? Could anyone help me out?

    It isn't really a matter of math, as much as it is logical reasoning, but if you plan to do things with programming, you better plan on getting comfortable with learning math as well.  Programming and math go hand-in-hand.
    Here's a simplified explanation of what your code needs to do -> If you move the scroller 25% of the total distance it can move, then the movieclip should be moved 25% of the distance it can move (in the oppostie direction).
    Your scroller handle can be moved a predefined distance.  In your code that value is called "intervalo".  See if you can figure out how that value is determined in the 3 lines of code.
    var min: Number = scrollHandle_mc.y;
    var max: Number = min +(scrollBar_mc.height - scrollHandle_mc.height);
    var intervalo: Number = max - min;
    Later on in your progress function you can see where the scrollbar handle values com into play again when determining where to place the textfield.  But if we change that to be the movieclip, it becomes more like the following...
    function progress(e:Event)
        var moverScroll:Number = scrollHandle_mc.y - min;
        var percent:Number = moverScroll/intervalo;
        if (arrastrando == true)
             yourMC.y = percent * (yourMCmaxY-yourMCminY) + yourMCMinY;
            // where  yourMCmaxY-yourMCminY is the mc's movement range
            // which is likely to be negative since yMax is likely < yMin for the mc.

  • Can someone please help me code scrollbars to scroll a movieclip?

    Hi guys,
    Thanks for the interest in my post...
    I've created a scrollbar with up and down buttons for a site
    in Flash 8 but the up button was behaving very oddly even though
    there were no syntax errors.
    Because of this I have decided to start again as nobody could
    find what was going wrong.
    I've created an fla (www.spindriftmedia.com/scroll.fla) with
    all all the elements that will be used but would really appreciate
    it if you wouldn't mind taking a few moments to add the code to the
    buttons and dragger to make it work if that's alright please. I've
    looked all over for tutorials but just can't find anything relevant
    other than the one I used originally.
    Thank you very much and I hope to hear from you.
    Take care,
    Mark

    Generally, people will not download files, so your chances of getting help improve if you include everything in your posting.  In this case you should include the relevant code with which you are having trouble.  Since you say it goes one way or another, I assume that involves coding it different ways, so it might be helpful to show and explain both.

  • How to scroll MC

    Hi guys..
    I am trying to scroll a movieclip with some scroll bar....I have tried ULscrollBar but it ends up only works for text...
    I also tried scrollBar but ends up it couldn't even use addChild to put it on the stage..(not sure why..)
    Are there anyway to scroll MC by using only AS3 in flex environment...? Thanks.

    Export ur movie clip for actionscript
    Than use the scroll component found in CS5 flash and in the properties panel of the scroll component give the class name of the class name of the movieclip as the source for the scroll component.
    Even in flex use scroller  componenet,add ur movie clip within the scroller.

  • Scroll script works in Flash 6, but not in 9

    I have a simple scroller script that works fine for scrolling
    a movieclip in Flash 6, but when I publish in anything later, it no
    longer scrolls. Both are set to AS2. Is there an obvious reason
    that anyone can see of why this should be? When I test the script
    syntax in the actions panel, it says there are no errors in the
    script. By tracing I can see that there's no trouble with targeting
    the up and down buttons or scroll slider, and the slider still
    drags, but the content MC doesn't move as it should. Thank you very
    much for your help, in advance. Here's the script, in case the
    answer isn't obvious from the description:

    You were right! It works now, even as posted above. I just
    remembered I had fixed an upper/lower case inconsistency just for
    neatness since I last tested, never thinking that would fix the
    problem! I just tested again and to my surprise, it works great. I
    guess neatness does count!!! Thanks again, kglad!

  • Scrolling mouse wheel

    Hi,
    Does anyone know how to make a movieclip scroll with the
    mouse wheel with a slowdown (makes the movie clip look like its
    slowing down) function so that with one scroll of the wheel the
    movie clip will move down then slow down and with another scroll it
    will go down further etc...? I can get the scroll wheel working
    with the slowdown function but what im finding is flash wont
    recognise the mouse wheel after one 'turn' of the mouse wheel. In
    other words i can scroll once and no more.
    I have attached the code. The code is all on one frame in the
    _root timeline and 'panel' is the movieclip to be scrolled...
    Any help would be great....

    thanks _name for your help, although i didnt have any luck
    with doing it that way. I have made a bit of progress though, i can
    get the mouse to scroll the movieclip (panel) in one direction with
    a friction function attached so once scrolled it goes from faster
    to slow to stop, the main problem is i cant get it to do the same
    thing when scrolled in the opposite direction (i have put a
    function in there to act as a 'stopper' to stop the scroll. Anyone
    have any ideas about this?
    cheers for any advice offered...

  • Scroll Bar with achor-type functionality

    Hi all,
    I was wondering if anyone has any reference to a horizontal
    scroll bar that scrolls a MovieClip and its functionality includes
    the ability to jump to a specific y position of the movieClip
    inside of the ScrollBar MovieClip and of course the scroll bar
    would move to its correct coordinates. For example, I need the
    MovieClip to go 333 pixels down (this is pretty easy) and then tell
    the scroll bar to go to its corresponding location. Anyone have a
    good example of this that is pretty dynamic?
    I have an example of this which is close to working, but I
    would like to know if there is a better more dynamic way of doing
    it.
    Thanks!!!

    Continuing this conversation with myself, I opted to use the
    ScrollPane component and use the vPosition property. We had to use
    all the event listeners before it worked,
    my_sp.addEventListener("complete", listener);
    my_sp.addEventListener("progress", listener);
    my_sp.addEventListener("scroll", listener);
    This worked well and I could feed the vposition and wind up
    where I needed to go in the scroll pane.
    So now I am having a problem with skinning the scroll pane. I
    can skin it just fine. But seeing as my scroll bar, the scroller in
    the middle of the scroll pane that you drag to get to the location
    you want to go is different in size from the original (aka scroll
    thumb). It does not adjust its size so it believes it has something
    like 56 more pixels in either direction.
    What happens is the scroll thumb will start 56 pixels below
    where it should and it stops about 56 pixels before it should stop.
    So, your content finishes scrolling and your scroll thumb does not
    finish its entire scroll - it is hanging 56 pixels above where it
    should. You drag it back to the top, the content that is being
    scrolled is back at it original position where it should be while
    the scroll thumb is hanging about 56 pixels below where it should
    ultimately be.
    Is there a way to adjust the size of the middle scroller
    – what in the skins is called the scroll thumb? I need it at
    a constant size. I can re-skin it so it looks like it should but it
    does not function as it should.
    Any suggestions?
    Anybody I can call at Adobe? (Should I send smoke signals?
    Rent the Goodyear blimb to post my Flash follies in desperation to
    solve this problem?)

  • Control MovieClip that's inside ScrollPane

    Does anyone know if it's possible to access and modify a
    MovieClip that's been placed in a ScrollPane? I want to be able to
    manipulate a MovieClip at runtime with ActionScript, but allow the
    viewer to scroll the MovieClip...
    Do I need to find a different approach that doesn't use the
    ScrollPane component?

    Is the movieclip part of the content of the scrollpane?
    I use the following line of code to affect one of the MCs
    that are in the
    scrollpane as part of the content.
    _root.csp_scrollingBullets.spContentHolder["bullet_1"].gotoAndPlay(1)
    HTH,
    If you have questions, my email is [email protected]
    -Marc Lee
    "stratosnatcher" <[email protected]> wrote
    in message
    news:edpqqh$1up$[email protected]..
    > Does anyone know if it's possible to access and modify a
    MovieClip that's
    been
    > placed in a ScrollPane? I want to be able to manipulate
    a MovieClip at
    runtime
    > with ActionScript, but allow the viewer to scroll the
    MovieClip...
    >
    > Do I need to find a different approach that doesn't use
    the ScrollPane
    > component?
    >

  • Flash Lite Y scrolling

    I'm building a simple game in flash lite.  Whenever I move the character, I instead scroll the movieclip the opposite way to give a moving effect while keeping the character in the center of the screen.  The problem is that whenever the top of the background image goes above the top of the screen, the entire image is no longer rendering, liked its being clipped or culled out by flash.  Its still visible, and runs fine in flash player and air.  The problem only seems to be recreatable in the device central testing on CS5.5.  I'm currently trying to get a phone that runs only flash lite to see if the error persists.
    I have tried the scrolling, which as I said doesn't work, scroll rect, which isn't allowed in Flash lite, thus doesn't work, and creating a bitmap background and using its draw method to copy the movieclip background onto the bitmap (which fails once the matrix passed in in the draw command has a negative y coordinate).  Copy pixels hasn't been successful either (copying the movieclip to a bitmap, and trying to copy a section of that bitmap onto the background bitmap).  The normal scrolling command, the scroll rect, and the draw method all work in flash player (even when compiling with flash lite), just not on the actual test with the flash lite phones in CS5.5.
    Does anyone know how to either A. get around this problem to allow negative y coordinates or B. disable the clip plane on the flash lite 2D version.  Currently, the movieclip that is being rendered is 2000x480, while the stage size is 480x320, so when the game scrolls down 100 units, it should show the background image between y coordinates 100 and 420, but instead doesn't render (as if being clipped).  Everything runs fine in flash player (even with a flash lite compile) and as an air application.

    There is no Flash Player available for Blackberry
    devices.

  • Communicating from a buton in a MovieClip to a gallery

    Hi, I'm trying to set a scrolling panel to load images of a
    gallery.
    So I embeded all my elements into a movie clip, everything
    work fine, except that I cannot use the buttons inside the
    scrolling panel MovieClip to load the pictures from the gallery.
    Here is
    the link to the gallery I'm working on:
    I also have another problem with the scrolling buttons. If I
    click to scroll down and then click to scroll up, the scroll up
    doesn't work on the first click, I need to click a second time.
    So if you can help me with any of those problems, with a
    tutorial or some explanation on how I can make this work, that
    would be a great help.
    Thanks in advance.

    I took a look at the fla file and have the following to
    offer:
    For the buttons, you probably need to code them with:
    function loadPicture(event:MouseEvent){
    (this.parent as MovieClip).gotoAndPlay("frame label");
    One problem I see is that the buttons themselves are static,
    so you'd need some way of changing what the frame label is for
    different sets of images relative to something about the button.
    What you might try instead is having each thumbnail as a
    button-movieclip that carries its own var identifier for the the
    frame label (call it framelabel). That way you could do something
    to the effect of...
    function loadPicture(event:MouseEvent){
    var frameLabel:String = event.target.framelabel;
    (this.parent as MovieClip).gotoAndPlay(frameLabel);
    As for the double clicking, I think the problem might lie in
    your having a stop(); at each menu set. So when you tell it to
    gotoAndPlay(...)... it goes to and stops. Instead of having those
    stops, while moving forward you could continually check the current
    frame number in a loop and have it stop when it reaches the desired
    frame number.
    A possible redesign, which could save you some effort when
    more menues get added is to only have the forward going transitions
    for the timeline, and then have the timeline play in reverse when
    you intend to move backwards (looping current frame-1 until you
    reach the destination). If you tie in a 'direction" variable
    (assigned 1 or -1), you could have the same function for moving in
    either direction... as in gotoAndPlay(currentframe + direction);
    A project like this gives you plenty of opportunity to learn
    some good stuff that will make creating it much simpler the next
    time around.

  • How do you horizontal scroll a movie clip?

    Can anyone suggest any resources for horizontal (left to right) scrolling a movieClip? I want to be able to scroll through a movie clip that has pictures in it. I can't find any good ones that explain the code. FYI, I do not want the user to use a scroll bar to scroll through. They should be able to touch the screen (on the movieClip) and scroll left or right. I looked at the ThrowPops plugin example on Greensock's website but the code is not explained very well.  So I need a basic description of how to scroll a movie clip.

    google: as3 beginner tutorial flash ios movieclip scroll

  • Drag and scroll PLEASE HELP im desperate!

    a script that does this:
    movieClip clicked = start drag
    if it is dragged to the LEFT 100pixels it stops drag and
    scrolls to the left that is -800pixels if it is dragged to the
    RIGHT 100pixels it stops drag it scrolles +800pixels.
    movieClip on release = stop drag
    it returns to its position before dragging.
    I made this so far (DOESN'T WORK):
    stop();
    background.onPress = function () {
    if (this.hitTest(_root._xmouse, _root._ymouse)) {
    this.startDrag();
    mouseX= _xmouse;
    onMouseMove = function () {
    mouseX2 = mouseX - _xmouse;
    if (mouseX2 > 100) {
    this.stopDrag();
    _root.lokacija1 = _root.background.targetx = background._x -
    Stage.width;
    mouseX= 0;
    mouseX2 = 0;
    play();
    } else if (mouseX2 < -100) {
    this.stopDrag();
    _root.lokacija1 = _root.background.targetx = background._x +
    Stage.width;
    mouseX = 0;
    mouseX2 = 0;
    play();
    background.onRelease = function () {
    if (this.hitTest(_root._xmouse, _root._ymouse)) {
    this.stopDrag();
    delete (mouseX2);
    mouseX = 0;
    mouseX2 = 0;
    Text

    Alright, accepted. Here's the thing, it was very difficult to
    tell what you were needing from your first post, and now having
    reviewed the file, it is much more complex than you had indicated.
    However, there still is a great deal of extraneous code in the
    scripts you have been working on, and the task can be accomplish
    much more simply.
    I have taken a moment to reconfigure an example of your file,
    you'll find that the operating code is far less complex than that
    which you had been trying to force into functioning, and requires
    very few variables, and loops the panning between the two images.
    this script can be modified to accomidate more images or use the
    speed of the mouse movement as a ratio to effect the speed of the
    tween, or any number of other effects. The codes you previously had
    on the p1 and p2 MCs have been stripped out, as well as the
    'symbol(s)', all of which are not necessary. I haven't done any
    testing as to scaling the swf in a html doc, but if you set this
    publish settings up correctly it should scale to the right size
    without have to use the onResize method. so here's the file:
    FLA
    good luck, I hope this helps you out.

  • How do I make a custom Scrollbar Text area in FlashCC HTML5 Canvas?

    Hello,
    I need to make a scrollbar for a long text area. I wonder how can I achieve this with HTML5 canvas in Flash CC2014?
    Thanks,
    Rodrigo

    the text looks ok to me, http://www.kglad.com/Files/forums/test2.html
    but yes, you can scroll a movieclip too.

Maybe you are looking for

  • TV and audio output

    I have a TV and stereo in close proximity. I'm wondering if there's anyway to rig a single dock so it will output to the stereo for music and to the TV for for video, hopefully without swapping cables. I guess I'm wondering if the Universal Dock acco

  • How do i get icloud contacts back into Outlook contacts?  My outlook contacts got wiped off in a pst export.

    How do i get icloud contacts back into Outlook contacts?  My outlook contacts got wiped off in a pst export. I think i want to tell icloud to sync with Outlook and make icloud the controlling account.  NOT outlook to iclout.  there are 6325 contacts

  • Update PR delivery date via CN22

    Hi all, I'm looking for a way to change the PR delivery date from CN22. I managed to update via IW32 using user exit 'EXIT_SAPLCOZF_002', but couldnt find an equivalent exit for CN22. Have also tested using BAPI_REQUISITION_CHANGE but it locks the sc

  • Installing on MAC OS

    I have problems installing adobe reader. Being told I need to agree the license agreement Where do I find that I wonder?

  • Trying to install Classic in OS 10.4.3

    Hi, The CD that came with the lap top is OS 10. I dont have any cds that is older than OS 10. I am unable to run many of the application without the Classic Environment. I am unable to run even small applications or for that matter install any study