A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: images slider swishmax actionscript 2 need help

  1. #1
    Senior Member
    Join Date
    May 2016
    Posts
    232

    images slider swishmax actionscript 2 need help

    hello all

    this is an image slider

    this is moving to left and right where mouse moving

    I want this frame to appear around every button when I click it

    I tried a lot but I failed




    thanks for help
    Attached Files Attached Files

  2. #2
    Senior Member
    Join Date
    May 2016
    Posts
    232
    help

  3. #3
    Senior Member
    Join Date
    Feb 2005
    Posts
    1,823
    I've seen two problems so far. 1) You have it automatically set to not visible and never set it visible. Not sure if there's a quirk with swishmax or something. 2) For some reason it's handling it different from the other squares. I did some testing and it's _x isn't changing. I need to sleep so there's more to figure out.
    .

  4. #4
    Senior Member
    Join Date
    May 2016
    Posts
    232
    hello swak

    can you edit it as you like

    i want images scroller with frame when pressed image

    happy dreams , happy time

  5. #5
    Senior Member
    Join Date
    Feb 2005
    Posts
    1,823
    So I haven't had much time to update things but the main problem you're having is you're containing everything in a movieclip and then just moving that. All the shapes will be effected by that movement. The end result should be all the shapes just moving along with the movieclip "thumbnails".

    For example, you're set up to move the thumbnails movieclip. Every shape in the thumbnails movieclip will end up having a relative position to the parent movieclip. So strok's _x and _y will always be 45. It's positioned like: strock._x = thumbnails._x+strock._x. And since you're not changing the strock position at all.
    There's no good way to do anything with it's position. I suppose you could use take thumbnails into account. Either way I suggest you don't contain multiple objects in a single movieclip, unless you want to group them together.

    With that said, I'm working on a version of your code from scratch. Instead of creating shapes on the stage, I like to work everything with code. I'm not sure when I'll be able to finish it but I have it set up to dynamically draw and color the strock object.

    Code:
    onFrame (1){
        stop();
        //Add a rectangle draw function to movieclip.
        MovieClip.prototype.drawRect = function (x, y, w, h, RGB, alpha) {
            this.moveTo(x, y);
            this.beginFill(RGB, alpha);
            this.lineTo(x+w, y);
            this.lineTo(x+w, y+h);
            this.lineTo(x, y+h);
            this.lineTo(x, y);
            this.endFill();
            _root.output.text="drawing";
        }
        //Create the strok movieclip
        createEmptyMovieClip("strok",_root.getNextHighestDepth());
        addChild(strok1);
        //Draw the shape
        strok.drawRect(175,23.6,250,252.8,0x666286,100);
        //Color the shape
        strok.color = new Color(strok);
        strok.color.setRGB(0xFF6600);
    }
    Starting a new project and copying that code will set up the strok object right away.
    .

  6. #6
    Senior Member
    Join Date
    May 2016
    Posts
    232
    hello swak

    addChild not supported in actionscript 2





    can you solve it

    thanks my friend

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