Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6891815
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:27:27+00:00 2026-05-27T06:27:27+00:00

I would like to learn Adobe Flex mobile development. I have created a new

  • 0

I would like to learn Adobe Flex mobile development.

I have created a new project called SampleProject, then I got SampleProject.mxml in default package and SampleProjectHomeView.mxml.

I have used a script tag for implementation as follows:

 <?xml version="1.0" encoding="utf-8"?>
 <s:View xmlns:fx="http://ns.adobe.com/mxml/2009" 
    xmlns:s="library://ns.adobe.com/flex/spark" title="HomeView">
<fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>

<fx:Script>
    <![CDATA[

              // here I would like to call methods from java class      

    ]]>
</fx:Script>

From the code above I would like to call methods from a Java class in script. I have written the Java code as follows:

   public class Sample 
  {

public void add(int a,int b)
{

    int c;

    c=a+b;

    System.out.println("addition of two"+c);

}

public void sub(int a,int b)
{

    int c;

    c=a+b;

    System.out.println("subtraction of two"+c);

}

}

How can I call the add and sub methods from the class above in SampleProjectHomeView.mxml?

Please, anybody, help me.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T06:27:28+00:00Added an answer on May 27, 2026 at 6:27 am

    You can make your Flex application talk to a Java application using BlazeDS. http://opensource.adobe.com/wiki/display/blazeds/BlazeDS. And usually people use Spring-Flex (http://www.springsource.org/spring-flex) for integration.

    I have done this before and there is a lot of integration effort, especially if you want to automate the whole build process. Maybe it is much easier now, but I do not really recommend you go this route unless you have significant investment in your Java code.

    Another alternative approach is create a simple RESTful webservice (play-framework is recommended) and let Flex talk to the web-service. After all it boils down to the trade-off of your technology decision.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to learn mobile development for fun and as well to enrich
I'm new to assembly language, and would like to learn. I have Vista-64 (will
I would like to learn objective-c, but don't have a Mac. How would I
I would like to learn Objective C, proficiently. I have a decade of extensive
I would like to learn the difference between XMLReader.Create and new XMLTextReader() to read
I would like to learn about streams in C++. I have done some googling
I would like to learn what is bit interleaving. I have an example: a:
I've never used Git before and would like to learn. I have a private
I've got some time, and I really would like to learn to get my
I would like to learn OpenGL programming on LINUX. I have found that I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.