Skip to main content
Inspiring
January 17, 2013
Answered

I need someone to do some actionscript for me.

  • January 17, 2013
  • 2 replies
  • 536 views

I have been working on a project for awhile and now I am running out of time as I cannot fully grasp the actionscript coding. I tried to learn as I go, but it isn't working. I need someone to do some actionscript for me. The final product is an ipad application. The movie clips that are in color at the bottom need to be able to be dragged and dropped into the preview window then play at the size of the preview window, so the user can decide if that is the movie they want. They also need to be able to drag and drop the movie clips in color into the Drop Zone Play Order so that when you press the "build" button, they will play in the order they appear, in full screen. The user should also be able to rearrange them in the play order if they change their mind. If they miss the target, it should return back to the movie library in its original position. There will need to be more than just 5 movie clips and 5 drop zones. I have some of this complete (probably 1/2 way) and can send you the .FLA file. If you are interested we can discuss compensation.  My code is below. 

mc.stop(); mc1.stop(); mc2.stop();mc3.stop();mc4.stop();

import fl.transitions.Tween;

import fl.transitions.easing.*;

var draggedMc:Object = new Object

// draggable objects in array

var mcs:Array = [mc,mc1,mc2,mc3,mc4];

// targetzones in array

var targetzones:Array = [targetZone,targetZone2,targetZone3,targetZone4,targetZone5, preview_mc];

for(var i:int =  0; i < mcs.length; i++){

    mcs.addEventListener(MouseEvent.MOUSE_DOWN, mouseHandler);

    // individual positions for each draggable object

    mcs.xpos = mcs.x = 60 + 65 * i;

    mcs.ypos = mcs.y = 460;

}

function mouseHandler(e:MouseEvent):void{

    switch(e.type){

        case "mouseDown":

            draggedMc = e.target;

            setChildIndex(getChildByName(e.target.name), this.numChildren-1);

            e.target.startDrag();

            stage.addEventListener(MouseEvent.MOUSE_UP, mouseHandler);

            break;

        case "mouseUp":

            stopDrag();

            stage.removeEventListener(MouseEvent.MOUSE_UP, mouseHandler);

            checkPosition();

            break;

        default:

            trace("Error");

        break;

    }

}

function checkPosition():void{

    var xEndPoint:Number;

    var yEndPoint:Number;

    for(var i:int = 0; i < targetzones.length; i++){

        if(draggedMc.hitTestObject(targetzones)){

            xEndPoint = targetzones.x + ((targetzones.width / 100) - (draggedMc.width / 100));

            yEndPoint = targetzones.y + ((targetzones.height / 100) - (draggedMc.height / 100));

            for(var j:int = 0; j < mcs.length; j++){

                if(mcs.hitTestObject(targetzones) && mcs != draggedMc){

                    tween(mcs,mcs.x,mcs.xpos,mcs.y,mcs.ypos);

                }

            }

            tween(draggedMc,draggedMc.x,xEndPoint,draggedMc.y,yEndPoint);

            break;

        }else{

            tween(draggedMc,draggedMc.x,draggedMc.xpos,draggedMc.y,draggedMc.ypos );

        }

    }

}

function tween(obj:Object,xStart:Number,xEnd:Number,yStart:Number,yEnd:Number) :void{

    var tween1:Tween = new Tween(obj,"x",Strong.easeOut,xStart,xEnd,.5,true);

    var tween2:Tween = new Tween(obj,"y",Strong.easeOut,yStart,yEnd,.5,true);

}

This topic has been closed for replies.
Correct answer richhennosy

Interesting. I make a post offering to pay someone to write code for me and you (moccamaximum) come in and trash me telling me to go someplace else to hire someone. You tell me it is titled so poorly that no one will even look at it, however it caught your eye. In the first few minutes 25 others have viewed it and as you can see I have an offer.

If something doesn't interest you, just skip to the next one, you don't have to trash other peoples posts. What do you get out of it?

2 replies

kglad
Community Expert
Community Expert
January 17, 2013

if you want to hire someone, send me an email via:  www.kglad.com, contact.

Inspiring
January 17, 2013

You need some professional help...like actually hiring someone.

Google for sites that provide services like that.

I doubt anyone on these forums will even care to read over a post that is titled as awful as yours.

I have some of this complete (probably 1/2 way) and can send you the .FLA file. If you are interested we can discuss compensation.  My code is below.

PS: It´s even more disrespectful, when you consider the fact that guys like kglad and ned murphy probably wrote and debugged 80% of "your" code already.

richhennosyAuthorCorrect answer
Inspiring
January 17, 2013

Interesting. I make a post offering to pay someone to write code for me and you (moccamaximum) come in and trash me telling me to go someplace else to hire someone. You tell me it is titled so poorly that no one will even look at it, however it caught your eye. In the first few minutes 25 others have viewed it and as you can see I have an offer.

If something doesn't interest you, just skip to the next one, you don't have to trash other peoples posts. What do you get out of it?