0

I have a large module written in JS which uses Canvas to draw and animate trees. This module was written for a product which is now being migrated to flex.

Is there a way in flex to embed this JS module as is? Or would I have to rewrite the whole module in AS3 (shudder)? Further, if embedding is possible, would user interactions (mouse clicks) etc. work seamlessly?

An example of the tree structure I am talking about can be found here - http://thejit.org

1 Answer 1

1

Don't know of anyway to embed JS into Flex, but it shouldn't be too difficult to convert to AS, just time consuming.

Another option, which really should just be an interim step to get the product out quicker is to open a browser within a frame in which you can just call the existing page in.

Sign up to request clarification or add additional context in comments.

2 Comments

The JS I am using has a lot of Canvas. I do not know the equivalents of Canvas drawing functions in AS. Can you please point me to a resource?
there's a Canvas in AS, but I don't know if it's comparable to the Canvas in JS, sorry but I'm not going to be much help there, hopefully another SO user can help you, or you can research and see if the AS Canvas is what you need.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.