Mailing List
Home
Forum Home
Flash Pro
Subjects
Firework Effect
setInterval bug identified and fixed
setInterval bug identified and fixed
ScrollPane component doesn 't auto update
Help: MX 2004 How to script a print button to print the entire sli
Event Dispatcher between classes
memory management removeMovieClip /
MX2004 Dataset itemClassName
Order of events per frame
XML to Object help
Textfield prototype question
Flash and QuickTime VR
Reading and displaying RSS feeds in Flash MX
Flash MX 2004 Sucks
AW: [Flashcoders] Switch/Case vs If/else
AW: [Flashcoders] Switch/Case vs If/else
Flash Interface with 10mb xml file
Web Service Results
Listener Object 's best practice
 
Re: [FlashComm] Newbie: Flash remoting and Javascript - push only?
no pull?

Re: [FlashComm] Newbie: Flash remoting and Javascript - push only?
no pull?

2004-02-26       - By Collin Peters

 Back
Thanks for the quick reply!

The variable is static so you first method will work great.

A question about the second method, though (in the case of a dynamic
variable).  How do you know when to call setVariable?  In my case, when
the SWF loads, the remoting call to the DB is made immediately, so is it
possible to use setVariable in this scenerio?  I suppose the flash movie
could call a JS function which could then use SetVariable to set a
property that has a watch on it, but this seems like a bit of a hack.

Collin

Mark R. Jonkman wrote:

> Hi Colin
>
> If the variable is static, then why not just have JavaScript write the value
> of the variable into the Object/Embed tags as part of the src. ie.
> MyFlashMovie.swf?usertype=1. Then in the swf file it will appear on _level0
> as _level0.usertype with the value of 1 in this case. Then you don't need to
> talk back and forth with JavaScript to get the value of the variable. If its
> a dynamic variable that is being calculated post page load, then you can set
> the value into the swf using setVariable syntax from JavaScript and then
> responding to the variable change in the swf either by monitoring the value
> or placing a watch on the variable.
>
> Sincerely
> Mark R. Jonkman
>
>
>>-- --Original Message-- --
>>From: Collin Peters [mailto:collin@(protected)]
>>Sent: Wednesday, February 25, 2004 11:14 PM
>>To: flashcomm@(protected)
>>Subject: [FlashComm] Newbie: Flash remoting and Javascript - push only?
>>no pull?
>>
>>
>> From what I can see in the documentation
>>(http://www.macromedia.com/support/flash/ts/documents/java_script_
>>comm.htm),
>>you only seem to be able to send a value from Flash to Javascript, or
>>from Javascript to Flash.
>>
>>Is there no way to grab a javascript variable from flash?  Or grab a
>>flash variable from javascript?
>>
>>Perhaps I am approaching this the wrong way (I am a flash remoting
>>newbie).  I have a SWF which performs a simply query on the database.
>>The query returns a list of users.  I need to be able to use a WHERE
>>clause on the the query so it only return the relevant data.  The value
>>in the where is stored in the web page (javascript).  To be a bit more
>>specific, I am trying to return a list of users where the user_type
>>field is 1 (SELECT * from users where user_type = 1).  The user_type
>>field is the one stored in the web page.  What is the best method to do
>>this?
>>
>>Collin
>>


-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
Supported by Fig Leaf Software
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
Lower Prices for Certified Training! Check out new lower prices for
Certified Macromedia Training from Fig Leaf Software. Expand your
skill set with courses in ColdFusion, Flash, Rich Internet
Applications and .NET in the new year.  Fig Leaf Software provides
the highest caliber instruction at our training centers in Washington  
D.C., Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at
your location.

Get the details at http://training.figleaf.com/
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
To unsubscribe, e-mail: flashcomm-unsubscribe@(protected)
For additional commands, e-mail: flashcomm-help@(protected)