|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
multiple rows from DB to php to flash Again!
Hi,
I'm referring to a previous post but want some more input and I'm not sure how to follow up on an older post dealing with this issue. http://forums.devshed.com/showthrea...0&highlight=php The essence of this is creating variables in php and then reading the variables into Flash and creating duplicate movies for each loop. Problem being in the example of the quoted post we get a syntax error. x=1; position=0; while(x<=numberRows){ duplicateMovieClip( "movieClip", "post" + x, x); setProperty("post" + x, _y, position); this["post" + x].flashVarTitle = _root.["varTitle" + x]; position = position + 64; x++; } Can anyone explain the Flash ActionScript of this line: this["post" + x].flashVarTitle = _root.["varTitle" + x]; Error message when we run this line in Flash 5 or MX Symbol=text, Layer=actions, Frame=10: Line 17: Expected a field name after '.' operator. this["post" + x].flashVarTitle = _root.["varTitle" + x]; However if we remove the _root from ["varTitle" + x]; then the script runs. See below. this["post" + x].flashVarTitle = ["varTitle" + x]; However this means that if we want to embed the script in a movieClip we need to put _root or _parent etc back in front of the ["varTitle" + x]; when it will fail again. Can anyone help? |
|
#2
|
|||
|
|||
|
Code:
this["post" + x].flashVarTitle = _root.["varTitle" + x]; Just needs the dot taken out after _root Code:
this["post" + x].flashVarTitle = _root["varTitle" + x]; Notice how this[ is different from _root.[ When refrencing a member of the _root object you just need the brackets and not the dot syntax. |
|
#3
|
|||
|
|||
|
Thanks
Thanks a lot
Bob |
![]() |
| Viewing: Dev Shed Forums > Web Design > Flash Help > multiple rows from DB to php to flash Again! |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|