Welcome, Guest. Please login or register.
Did you miss your activation email?
05/21/12, 03:11
Home Help Search Login Register
News: Parsley Flex framework review featuring quiz application, in our Flex frameworks series
Flex SDK 4.5 mobile roadmap: begin with your mobile development
Swiz Flex framework review featuring quiz application
New homepage we release our new Homepage, take a look ...

+  Flash-db
|-+  Server side Scripting and Database Support
| |-+  Flash Remoting with AMF (Moderators: Flash-db, Musicman, Jorge Solis, papachan, nothingGrinder)
| | |-+  AMF and PHP5, Hello World Remoting
0 Members and 2 Guests are viewing this topic. « previous next »
Pages: 1 [2] Print
Author Topic: AMF and PHP5, Hello World Remoting  (Read 8171 times)
Ronald Wernecke
Administrator
Systems Administrator
*****
Posts: 6175


View Profile WWW Email
« Reply #15 on: 11/19/04, 14:11 »

Basicly yes, but not functions. It makes sense to combine loadMovie with data loaded via AMFPHP.
This combination gets you easyly where yu want to go.

Replace the label-value pairs with amf calls and replace the php files with service classes.
« Last Edit: 11/19/04, 14:13 by Ronald Wernecke » Logged

happy flashing
Cool
Ronald
Jorge Solis
Administrator
Systems Administrator
*****
Posts: 14600


View Profile
« Reply #16 on: 11/19/04, 14:12 »

Remoting can pass data of any kind, but no functions, that should be compiled on Flash. If you pass the name of a function, say "makeGrid", you can use in flash (assuming it's declared in the same timeline)  this[functionName](params)

Jorge
Logged

Adam Schroeder
Server what's that
*
Posts: 14



View Profile WWW
« Reply #17 on: 11/19/04, 14:33 »

Ok.  Thank you very much for the clarification and the tips.  It does make sense that it works this way,  although I must admit it would fun if I could pass a function down by itself.   This bothers me far less than the near uselessness (reverting to initial object state) of the duplicateMovieClip function.. but that is a rant for another day.


One more question if I haven't bugged you guys enough today.  (last one, I promise)

I have a class called NavigationMenu with a method gotoPageID(pageID:Number)

If i load an external SWF with a button, that I want to access an existing instance of this class what is the best way to do it?

I imagine I could do something like this

pseudo code:
--create new movie clip
--load external movie
--on loadInit()
  --newClip_mc.navMenu= navigationMenu --reference to existing NavigationMenu

then my buttons inside the recently loaded SWF could call _parent.navMenu.gotoPageID(whatever)

I know in general it is not a good idea to assign dynamic variables to a movieclip, is there a better way to get the internal workings of my SWF access to my instance of the Navigation Menu?


Thanks!
Adam



« Last Edit: 11/19/04, 14:34 by Adam Schroeder » Logged
Jorge Solis
Administrator
Systems Administrator
*****
Posts: 14600


View Profile
« Reply #18 on: 11/19/04, 14:47 »

If you're trying to do something general, the main movie should provide the framework, the loaded movie use it. So all your loaded movies knows that there's a method to go to some section or frame tha they can use, so just calling _parent.gotoPageID, or _parent._parent or whatever path needs to find it is a good approach.

Post new threads for different questions, this helps others to find specific answers when searching on boards.

Jorge
Logged

Pages: 1 [2] Print 
« previous next »
Jump to:  


Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!
anything