Select to view content in your preferred language

Beginner: Running Applications from Sample Code

791
4
12-19-2011 01:29 PM
N_Young
Deactivated User
Hello,

I copied the sample code for select and zoom to my server to try to run it myself.  I am working on the code from notepad++.  In notepad, everything appears as it should EXCEPT for anything within the script section.  This whole section appears in orange instead of having variables, etc in different colors as it should.

I am brand-new at Flex.  What could be the reason for this whole script section not working?

Thank you.
Tags (2)
0 Kudos
4 Replies
N_Young
Deactivated User
Still having trouble utilizing the samples.

Step 3 on the getting started page says "Compile the code to create your application."

First, how I can be sure I am compiling the sample properly?  I am using FlashDevelop, not Adobe Flash Builder.

Second, how do I run that code/application on an internet browser?  I am not coding anything new, I am really just trying to run the sample applications from the samples folder in the ArcGIS API for Flex download.  I have read and watched a lot but I somehow don't understand this part.  Where does the .mxml file of the sample need to be?  I have access to ArcGIS server.  Are there other files or steps necessary for me to run one of the samples on the web?

Thanks for the help.  I hope I can make some leaps in knowledge once I can play with the samples.
0 Kudos
IvanBespalov
Frequent Contributor
FlashDevelop -> Getting Started - > Action Script 3 ->Choosing a compiler

Just read the help for the tools, plugins, developer kits that you use.
0 Kudos
N_Young
Deactivated User
In case this helps any fresh beginners:

I asked my original question because I thought running the flex samples was something that could be done easily from notepad, but it is not that simple.  You need a program that can build/compile flash files (once created these are .swf files).  It seems that the most common is Adobe Flash Builder.  You could try FlashDevelop, a free program, but personally I am still having some trouble getting maps to show with this program.  The program you choose will be where you copy the sample code and run the sample.  It should run in a window produced by the program as opposed to popping up in an internet browser.

You need to have two resources set up in your program in order to run the flex samples found in the arcgis API for flex.  Instructions for this may vary with the program you use.  Both are free online downloads.
1.  the flex SDK (software development kit).  this makes it possible to...well, do flex things.  it is a folder full of folders of necessary things!
2.  the arcgis API for flex must be set up.  this makes it possible to do GEOGRAPHIC flex things.  the file extension for the "library" you need to add to your project or program is .swc

A flex project contains multiple files.  Make sure you copy the code in to the correct file of your project.

Maybe it was just me, but I needed some more dummy-proof explanation of how to get set up to use flex and the arcgis API, so I hope it helps someone.
0 Kudos