Skip to main content
July 14, 2007
Answered

am trying to use an indirect reference

  • July 14, 2007
  • 2 replies
  • 246 views
hi folks,

here is an example line of code i'm currently using where "clipXords" is a 'string literal' and everything works fine:-
var LsoXords:SharedObject = SharedObject.getLocal("clipXords");

HOWEVER
i'd like to use something along the lines of:-
var clipXords:String = anyDynamicFilename
var lsoXords:SharedObject = SharedObject.getLocal( clipXords );

SO NOW clipXords is not a 'string literal' but is an indirect reference to anyDynamicFilename.

trouble is i'm not sure if that is just a dumb question; or whether it's 'off limits'; or whether it is possible but i'm coming at it 'half coc-ed'.

any suggestions greatly appreciated.
This topic has been closed for replies.
Correct answer Newsgroup_User
>> var clipXords:String = anyDynamicFilename
var lsoXords:SharedObject = SharedObject.getLocal( clipXords );

What's not working? This should be fine, as long as clipXords equals a valid
name.

--
Dave -
Head Developer
http://www.blurredistinction.com
Adobe Community Expert
http://www.adobe.com/communities/experts/


2 replies

July 14, 2007
d-u-h, my brain, that's what's not working clearly as it's locked into working with and 'getting around' using arrays.

in my code i had:-
var clipXords:Array = anyDynamicFilename

but i couldn't see the typo until your feedback, many thanks for your input.

best wishes, avonova
Newsgroup_UserCorrect answer
Inspiring
July 14, 2007
>> var clipXords:String = anyDynamicFilename
var lsoXords:SharedObject = SharedObject.getLocal( clipXords );

What's not working? This should be fine, as long as clipXords equals a valid
name.

--
Dave -
Head Developer
http://www.blurredistinction.com
Adobe Community Expert
http://www.adobe.com/communities/experts/