Quantcast
Channel: Adobe Community : All Content - Edge Animate
Viewing all articles
Browse latest Browse all 9897

Collision-Detection with CSS and jQuery - How to start animation, when symbol reaches special point?

$
0
0

Hey there,

 

I know, that there is a solution for my problem, but I am totally not able to find it yet.

I want to have some kind of collision-detection within two symbols. So when one symbol collides with another there will appear be text like "squaaaaash" or something.

 

I haven't found anything about collision-detecting in edge animate, but I thought I could handle it with looking for the same css-parameters of both symbols. Obj1 is moving to Obj2 on a motion path. Now I want to have a Text, when it reaches Obj2.

 

So I tried it like this:

 

var positionobj1 = sym.$("obj1").css("left");

var positionobj2 = sym.$("obj2").css("left");

 

if (positionobj1 == positionobj2){

sym.play("Text");

}

 

 

But it totally isn't working at all.

 

Do you have any idea how to solve this problem?


Viewing all articles
Browse latest Browse all 9897

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>