Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,207,513 members, 7,999,290 topics. Date: Sunday, 10 November 2024 at 11:38 PM

Flex Builder Tutorial / Using Some Dhtml Techniques - Webmasters - Nairaland

Nairaland Forum / Science/Technology / Webmasters / Flex Builder Tutorial / Using Some Dhtml Techniques (2881 Views)

My Dhtml Board Games Project :: Featuring Ludo, Snakes And Ladder / Form Validation Tutorial Using Javascript, Php, Ajax / Form Validation Tutorial Using Javascript, Php And Ajax! (2) (3) (4)

(1) (Reply) (Go Down)

Flex Builder Tutorial / Using Some Dhtml Techniques by Nobody: 6:59pm On Mar 13, 2009
Adobe Flex Builder
Adobe Flex Builder is an integrated development environment (IDE) built on the Eclipse platform meant for developing rich Internet applications (RIAs) and cross-platform desktop applications, particularly for the Adobe Flex platform. Support for cross-platform desktop applications was added in Flex Builder 3 with the introduction of AIR.

WYSIWYG Editor
In addition to the built-in code editors for MXML and ActionScript, Flex Builder supports a WYSIWYG editor for modifying MXML applications and components.

Debugger
Flex builder includes an integrated interactive debugger that lets you step through the execution of the code while inspecting variables and watching expressions.

Profiling
The release of Flex Builder 3 added support for profiling or performance analysis. The profiling view displays statistical information about where and how much memory is being consumed in addition to the execution time of function calls.

To read more please follow this link

If you are interested in flex tutorial, please signify before i continue, i must be sure i am not wasting my time here. . .

In summary, flex builder is for building flash applications. . .to run on internet / intranet . . .
Re: Flex Builder Tutorial / Using Some Dhtml Techniques by segsalerty(m): 7:05pm On Mar 13, 2009
Uhmm , Lovely Into to a new thing to me !
go on DHTML sir !
Students Listening, kiss
Re: Flex Builder Tutorial / Using Some Dhtml Techniques by Nobody: 3:32pm On Mar 14, 2009
Only one student? i am still not encouraged. . .
Re: Flex Builder Tutorial / Using Some Dhtml Techniques by segsalerty(m): 12:15am On Mar 15, 2009
You know NUT just called off the strike tongue Students will resume soon in class , but before then , Pls carry go and make the board full for students to gothru when they arrive !
Re: Flex Builder Tutorial / Using Some Dhtml Techniques by Nobody: 11:05am On Mar 15, 2009
we are here sir, carry on
Re: Flex Builder Tutorial / Using Some Dhtml Techniques by yawatide(f): 1:57pm On Mar 15, 2009
To think that after learning all there is to know in flex, you could be earning as much as is specified here wink

http://www.careerbuilder.com/JobSeeker/Jobs/JobDetails.aspx?cbRecursionCnt=1&siteid=cb_emailrec&APath=1.8.0.27.0&HostID=US&IPATH=JEH3RA&je=myrec&sc_cmp2=10_JobMat_JobDet&Job_DID=J3G4236QT0K5VJ63361&cbsid=58cd227696324b289233b1e505e0d9e2-290422454-JJ-5

I just got that in my inbox. Quite impressive! Does that mean I will be learning Flex anytime soon? Probably not but I thought you guys might want to use this as motivation cool
Re: Flex Builder Tutorial / Using Some Dhtml Techniques by Nobody: 3:08pm On Mar 15, 2009
Wow! Maybe i should stop freelancing and start working as a flex programmer. . . .ok, i am encouraged. . .i will try to do what i can. . .
and hope the flex masters in the house will pop in when we need them. . . .

So for now, you should should get the IDE and install. The one i have is flex builder 3.0

For newbies, please make sure you learn your xml, php and mysql properly. . .they are all very important in learning and using flex builder.
Javascript is optional. . .not even needed like that self. . .the only place you may need javascript is to communicate between two flex applications running on the same page, or to communicate from a flex application (embedded as flash on a web page) to a DOM element such as form or whatever object you have on a web page. . .
Re: Flex Builder Tutorial / Using Some Dhtml Techniques by Nobody: 10:39pm On Mar 15, 2009
By the way, i will like you to read the former thread to know a little bit more about flex
Flash / Flex Builders: Please Let's Know You

THat shows the screenshot of flex builder 3.0 and you will also get to learn some stuffs about flex builder. . .
Re: Flex Builder Tutorial / Using Some Dhtml Techniques by Nobody: 12:56am On Mar 17, 2009
Please if anyone has installed the flex builder IDE, lemme know so i start the tutorial proper. . .by building a sample project. . .

By the way, we are going to integrate the IDE with an offline server like wamp, reactor or even IIS sef. . .
Re: Flex Builder Tutorial / Using Some Dhtml Techniques by cyberomin(m): 11:28am On Mar 17, 2009
Ogar DHTML i have installed Flex 3 IDE so u can start ur lessons
Re: Flex Builder Tutorial / Using Some Dhtml Techniques by Nobody: 12:42pm On Mar 17, 2009
No problem, i have prepared the first set of lessons, when i get back to my pc later in the night, i will start posting. . .meanwhile if you have started using flex already, you can ask questions so that everyone will learn o. . .
Re: Flex Builder Tutorial / Using Some Dhtml Techniques by Nobody: 10:41pm On Mar 17, 2009
Here we go. For the purpose of this class, i decided to use reactor 1.4 - lemme explain the mapping.
I created the local folder: C:\Reactor\Core\htdocs\flexbuilder
On local server will be: http://localhost/flexbuilder/

I want to create a blank flex application inside the folder and view it on my local server. . .

Please note that on step 3: you need to do a validation. To do that validation, your local server must be running.

On that step, as you will see on the screenshot, i specified web root: C:\Reactor\Core\htdocs\flexbuilder
and Root url of the project as: http://localhost/flexbuilder
and then clicked validate - that will crosscheck and give you valid if it is correct. . .let us call it resolving the paths.

Re: Flex Builder Tutorial / Using Some Dhtml Techniques by Nobody: 11:03pm On Mar 17, 2009
Next step . . .

Re: Flex Builder Tutorial / Using Some Dhtml Techniques by Nobody: 11:07pm On Mar 17, 2009
Hope you are following. . .

Re: Flex Builder Tutorial / Using Some Dhtml Techniques by Nobody: 11:11pm On Mar 17, 2009
Aaaaand, them decide to carry the light go (to the non-nigerians, that is the local term for power failure). . .oops. . .guess i will continue tomorow. . .
Re: Flex Builder Tutorial / Using Some Dhtml Techniques by Nobody: 12:21pm On Mar 18, 2009
nice job i'll join you guys when am thru still on php.as for javascript i've covered them but i need to practice.no pc in village here.Good Work Dhtml
Re: Flex Builder Tutorial / Using Some Dhtml Techniques by Nobody: 2:48pm On Mar 18, 2009
By now, a sample project has been built. . .we now want to execute it. . .

Re: Flex Builder Tutorial / Using Some Dhtml Techniques by prodgalson: 6:46pm On Mar 19, 2009
good effort on spreading the word, dhtml.

If I have the time, I may start a complementary thread on building non server-dependent desktop apps, using free tools and the flex sdk.
Re: Flex Builder Tutorial / Using Some Dhtml Techniques by Nobody: 6:47pm On Mar 19, 2009
Thanks man. . .i was hoping you will show up sooner or later. . .And if i go wrong at any point, or paste an inefficient code. . .or anything, please
give us the correct one o. . .my flex is rather limited. . .i did not even create an AIR application sef. . .just learnt how to build some web server
dependent application. . .

For those that are learning, please feel free to ask questions o . . . so that ends our first sample projects. . .let us try to move forward. . .

There are so many different controls in flex like textbox. . .image. . .some of which we are already familiar with.

And there are also some weird looking objects in flex. . .i am going to skip those simple ones like textboxes for now. . .i will still use them
later. . .those ones are easy to learn. . .it is the complicated ones that i am going to put emphasis on. . .like all of those them repeaters. . .
tile list. . . connect to xml. . . connect to mysql database. . .
Re: Flex Builder Tutorial / Using Some Dhtml Techniques by Nobody: 9:15am On Mar 21, 2009
I have been getting feedbacks offline that i should go right on. . .so lemme proceed quickly to the first real project here. . .how to build a
simple slideshow with flex. . .
Re: Flex Builder Tutorial / Using Some Dhtml Techniques by Nobody: 9:50am On Mar 21, 2009
The necessary items in this project will be posted into my dhtml browser
a utility i introduced in another thread. . .i am extending it here. . .it was [https://www.nairaland.com/nigeria/topic-213492.32.html#msg3449080]introduced here[/url] and further explained here

So you will find the flex projects stored on: flexi/slideshow/step1 . . . later step2 . . . screenshot will be seen shortly

Step 1: i added some photos into a folder. . .of people like usher ramoni, jlo. . .
step2 : i want to read the images folder with php and render the output as xml . . .

so the output i want you to see at this point is: the generated source

Re: Flex Builder Tutorial / Using Some Dhtml Techniques by Nobody: 9:53am On Mar 21, 2009
It is very important for you at this point to know how to code xml . . . if you have never written xml before, please learn it from w3schools.com

If you examine the structure of that xml well. . .you will see a childnode of image is repeated each time, and carries 2 things, src and caption
<image>
<src>http://localhost/slideshow/images/1.jpg</src>
<caption>JLO</caption>
</image>

These will be used by flex to get the information and translate them accordingly. . .as you will see later. . .
Re: Flex Builder Tutorial / Using Some Dhtml Techniques by Nobody: 10:14am On Mar 21, 2009
At this point, i will want you to do a quick checkup on the datagrid control. . .it is somewhat similar to a table in html. . .but the differences is like night and day. .
Anyway, when data repeats itself, like xml data, datagrid can help you build something like a table to render those repetitive elements. . .

Instead of using our regular looping codes. . .for. . . .while. . .a datarepeater will just do the magic. gbam!
This is the reason why i want to use slideshow as a good way to start. . .as you will see. . .i will not use any loop at all. . .and yet flex actionscript
contains all those loops too. . .!

The first mistake i made when i went into flex was, after learning few things. . .i though i could just rough my way through it because i am a grade A+ actionscript user. . .only to discover that i was wasting my time. . .writing what is staring at me in the face. . .
So my advice is to learn the regular flex objects first, before rushing off to create your own components and libraries. . .




So slide1.mxml will be:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application creationComplete="userRequest.send();" xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns:ns1="*" xmlns:ns2="myComponents.*">
<mx:HTTPService id="userRequest" url="http://localhost/slideshow/index.php" useProxy="false" method="POST">
<mx:request xmlns="">
</mx:request>
</mx:HTTPService>


<mx:DataGrid id="myGrid" width="350" height="200"
dataProvider="{userRequest.lastResult.slideshow.image}" >
<mx:columns>
<mx:DataGridColumn dataField="src" />
<mx:DataGridColumn dataField="caption" />
</mx:columns>
</mx:DataGrid>


</mx:Application>

That will be responsible for displaying the image below:

Re: Flex Builder Tutorial / Using Some Dhtml Techniques by Nobody: 10:21am On Mar 21, 2009
I made use of the xmlhttp service up there. . .that is what is responsible for fetching the slideshow data located
in http://localhost/slideshow/index.php

while the datagrid is bounded to that service like this: {userRequest.lastResult.slideshow.image}
so that if the data in xmlservice changes. . .the datagrid will automatically read the new xml data available. . .

The grid has 2 values it displays, the src and the data. . .which are the repeating elements in that xml. . .

I know my information is not sufficient on xhmlhttpservice and datagrid. . .but read it up in the flex builder help. . .then come
back to read what is here. . .
Re: Flex Builder Tutorial / Using Some Dhtml Techniques by Nobody: 10:28am On Mar 21, 2009
By the way. . .i think you guyz should read this info

That gives more insight into flex building. . .pending my next post. . .
Re: Flex Builder Tutorial / Using Some Dhtml Techniques by Nobody: 10:37am On Mar 21, 2009
So now, we have been able to render the content of the xml correctly in the datagrid. . .but we want the src to display as image. . .
So we now bring in another technique in flex, using what is called item renderers

Now, as we all know, you can return various kinds of information through xml. . .it may be number, it may be text, it may be image
or whatever. . .so flex knows this, and so there are times you need to specify a renderer aside of the default text. . .
check this out

slide2.mxml
<?xml version="1.0" encoding="utf-8"?>
<mx:Application creationComplete="userRequest.send();" xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns:ns1="*">
<mx:HTTPService id="userRequest" url="http://localhost/slideshow/index.php" useProxy="false" method="POST">
<mx:request xmlns="">
</mx:request>
</mx:HTTPService>


<mx:DataGrid id="myGrid" width="350" height="200"
dataProvider="{userRequest.lastResult.slideshow.image}" >
<mx:columns>
<mx:DataGridColumn dataField="src">
<mx:itemRenderer>
<mx:Component>
<mx:Image height="45"/>
</mx:Component>
</mx:itemRenderer>
</mx:DataGridColumn>
<mx:DataGridColumn dataField="caption" />
</mx:columns>
</mx:DataGrid>


</mx:Application>


I have introduced an image item render. . .so the output becomes. . .

Re: Flex Builder Tutorial / Using Some Dhtml Techniques by Nobody: 10:50am On Mar 21, 2009
So now, i decided to another of them data repeaters called tile list:

slide3.mxml
<?xml version="1.0" encoding="utf-8"?>
<mx:Application creationComplete="userRequest.send();" xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns:ns1="*">
    <mx:HTTPService id="userRequest" url="http://localhost/slideshow/index.php" useProxy="false" method="POST">
        <mx:request xmlns="">
        </mx:request>
    </mx:HTTPService>


   <mx:TileList dataProvider="{userRequest.lastResult.slideshow.image}">
               <mx:itemRenderer>
                    <mx:Component>
                        <mx:Image  source="{data.src}" height="60"/>
                    </mx:Component>
                </mx:itemRenderer>
    </mx:TileList>


</mx:Application>



Notice the similarities in all of these steps. . .we are almost there. . .

Re: Flex Builder Tutorial / Using Some Dhtml Techniques by Nobody: 11:01am On Mar 21, 2009
So now. . . i need a control that will show the image and the caption below. . .oops there is none

So. . .i created my own custom control

ImageViewer.mxml
<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="92" height="108">
<mx:Image x="8" y="9" source="{data.src}" width="75" height="72"/>
<mx:Label x="0" y="86" text="{data.caption}" textAlign="center" width="100%"/>
</mx:Canvas>

And decided to use my own control with the TileList to render the images with caption


slide4.mxml
<?xml version="1.0" encoding="utf-8"?>
<mx:Application creationComplete="userRequest.send();" xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns:ns1="*" xmlns:ns2="myComponents.*">
<mx:HTTPService id="userRequest" url="http://localhost/slideshow/index.php" useProxy="false" method="POST">
<mx:request xmlns="">
</mx:request>
</mx:HTTPService>

<mx:TileList dataProvider="{userRequest.lastResult.slideshow.image}" itemRenderer="ImageViewer" width="342" height="291" y="0">
</mx:TileList>

</mx:Application>

Re: Flex Builder Tutorial / Using Some Dhtml Techniques by Nobody: 11:04am On Mar 21, 2009
So read-up creating custom components. . .at least i have given an instance of a real-world stuff. . .
That is it for today. . .

So on our next session, we are going to look for how to now zoom the image when it is clicked. . .

A little actionscript will be needed there. . .just little. . .that will be easy to follow. . .have 9ce day.

Aaaaand, questions are most welcomed and will be appreciated. . .i hate posting on and on like this. . .
it makes me feel like a spammer. . .
Re: Flex Builder Tutorial / Using Some Dhtml Techniques by spaxx: 9:21pm On Mar 06, 2011
hi, i'm a freelance flex app developer. is there anyone or any firm interested in hiring my services. contact me @ spaggyfc@yahoo.com

(1) (Reply)

Best Website So Far 2009: Drop Yours / How To Share Your Glo Data Plan / Amazon SES AWS Accounts For Sale - 50k Sending Limit Approved

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 67
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.