Skip to main content
February 4, 2013
Question

1180: Call to a possibly undefined method Con2

  • February 4, 2013
  • 1 reply
  • 497 views

import com.greensock.*;

import com.greensock.easing.*;

Multitouch.inputMode = MultitouchInputMode.GESTURE;

var bigCon2:Sprite = new Sprite();

stage.addChild(bigCon2);

var ccon2:MovieClip = new Con2();

bigCon2.addChild(ccon2)

bigCon2.x=0

bigCon2.y=0

stage.addEventListener(TransformGestureEvent.GESTURE_SWIPE , onSwipe2);

function onSwipe2 (e:TransformGestureEvent):void{

if (e.offsetY == 1) {

//User swiped towards bottom

          TweenMax.to(bigCon2, 1, { y:bigCon2.y+500, ease:Sine.easeOut});

}

if (e.offsetY == -1) {

//User swiped towards top

          TweenMax.to(bigCon2, 1, { y:bigCon2.y-500, ease:Sine.easeOut});

}

}

im not sure why im getting this error.. it worked well for my other script though..

This topic has been closed for replies.

1 reply

sinious
Legend
February 4, 2013

var ccon2:MovieClip = new Con2();

Either the class "Con2" doesn't exist, a library item with a linkage (class) name of Con2 doesn't exist, or it may be spelled incorrectly. Bottom line, Flash can't find whatever "Con2" is.

February 4, 2013

So i should put 'Con2' as the AS linkage in the library right?

but there is another error now..

1046: Type was not found or was not a compile-time constant: Con2

what does that mean?

p.s sorry, im a noob at AS3

sinious
Legend
February 5, 2013

Let's take a step back. What is "Con2" to you? A library item? ActionScript code? Something from some source or component you downloaded and are trying to use? Something else?