When you say your canvas API, do you mean you create a custom Canvas? It
really depends, you could create your own API like the guys at Ribbit have
done with their product. I don't really understand what you mean, give us a
clearer picture and will be able to help you.
I want to make a custom drawable canvas. I want to add images, text and various shapes on it.
I want my action controls in another technology. Like if i want to add text then my button for adding text will be in .Net.
When I click a button on .Net it should add text in my flex canvas.
If that's not what you want then the problem can get quite tricky. Maybe try playing around with the ExternalInterface.
With best regards,
this is an interesting mix of technologies. You will probably need to look into the documentation for ExternalInterface. This allows Flex apps to talk to the pages in which they are embedded, for example to access DOM elements. The most obvious vehicle (to me, at least) for doing what you want is:
1) The .NET button does whatever in the code-behind file, eg talking to a database, and then writes the relevant bits into a DOM element which you keep hidden.
3) A Flex method uses ExternalInterface to call said function and inspects the contents to do the necessary inside the Flex app.
I have used this in a few cases to respond to actions in the ASP-managed parts of the page.
There are a couple of problems with the scenario, namely
1) The .NET part when managed this way normally triggers a page refresh, which can be visually disturbing and also means you wil have to track your previous actions/state carefully enough to reproduce where you were
Are you committed to using a button in the containing page? If you went for controls inside the Flex app itself then you can invoke server-side functionality without the need for page refresh (using HTTPService, URLRequest etc) and I suspect the user experience would be better.
Hope that helps,
You are right man.