|
|
|
home
|
UPDATE: First of all you need to install the FlashCom Communication Components. The download-package is available at Macromedia DevNet Center for free. In
Flash MX create a new file and save it as AdminConnect.fla within your
FlashCom environment. Goto the Components Panel and choose "Communication
Components" from the pull-down menu. Create
2 dynamic textfield on your main timeline and name them: Now
we need do set some Component Parameters to make sure we are connected
with the desired application: Mark the "Simple Connect"-Component
and fill the first parameter called Application Directory with i.e. Open the application from which you want to read the data (here: Sample Panel Presentation). Find out, what name the PeopleList-Component was given in this movie. (it is: people_fc) Go back to your Admin-Movie and fill the second parameter of your SimpleConnect-Component (Communication Components) with "people_fc" and add another value "light_fc". Also fill the instance name of the People-List Component with that name (people_fc) Now what we have done here was to establish a connection with another application plus the integrated people-list component. In our AdminConnect-Movie enter the following Actionscript in the first frame of your main timeline: stop(); In line "3" we have: people_fc.watch('users', function (id,
oldval, newval) { where ... people_fc.watch ... But at in AdminConnect-Movie we don´t want to login at all.
So we have to change the SimpleConnect-Component a little. In our AdminConnect-movie there is no auto-login anymore and the PeopleList-Field is filled with data from the target application only. You may want to add the following script to either the "SimpleConnect"-Component and the "ConnectionLight"-Component: onClipEvent (enterFrame) { // Remember this is the "dirty" version so feel free to optimise my code here and there as long as you know what you are doing. Testing: Enabled your live-preview options in FlashMX and preview the AdminConnect Movie (CTRL + ENTER). Open 2 instances of the sample_panel_presentation.swf and connect as a participant. Now you see 2 Users online (1st textfield) + 2 participants and 1
guest (2nd textfield). The "1 guest information" is a result
of the 2-sided connection running in the background. I didn´t
have the time to find a good workaround for that issue. Remember that
this is the quick'n'dirty version. You
can now modify the movie matching your needs and import the published
movie into i.e. a html-document to show your statistics on the frontpage
of your website.
|
|