Copy link to clipboard
Copied
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..
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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?
Find more inspiration, events, and resources on the new Adobe Community
Explore Now