Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

1180: Call to a possibly undefined method Con2

Guest
Feb 03, 2013 Feb 03, 2013

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..

TOPICS
ActionScript
459
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 03, 2013 Feb 03, 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Feb 03, 2013 Feb 03, 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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 04, 2013 Feb 04, 2013
LATEST

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?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines