Are you sure the player swf is loading? Where is the code you show located?
Yes, the player seems to load fine. The project is loaded up into it exactly how it is suppose to and everything functions properly until you get to the end and the score doesn't display. The text box is completely empty. The code is on the main timeline in the actionscript layer.
I also have a project I created using the drag and drop feature. It works perfectly fine when tested on my computer. As soon as it is uploaded onto our site and loaded into our swf player it has issues. You click one of the drag and drop items and it will pick it up and it won't allow you to drop it back down.
I have done a little research online about embedding swfs within swfs and the conflicts that arrise but I haven't been able to figure anything out. Any ideas?
Since you have problems with more than one file with this player, there is something about placing the file into another that changes the environment it is depending on. Just as a for instance, if you happen to use stage references in your code, that might be a source of the proiblem when you load the file into another file's since there is only one stage... the one defined by the player file
Yeah, thats what I was thinking but I'm not using a stage reference anywhere. Is there something I can use in the code to make sure when I refer to a variable or text box in my project file that it isn't trying to pull that information from the player instead of my project file?
I seemed to have figured it out. I changed the text box from TLF Text to Classic Text and selected Dynamic Text. Also changed the Actionscript up a little.
instead of just:
yourScore.text = numOfCorrect + " out of 5");
yourScore.text = String(numOfCorrect + " out of 5");
Not sure which of these things fixed the issue but it is working now. Thanks for the help though! Now I just need to figure out the issue with the drag and drop.
I'm a moron. I did have a stage reference in my other project file. That is most likely what was causing the issue. Thanks a million Ned!
1 person found this helpful
You're welcome. I have not worked with the TLFTextfields at all. I have only heard in these forums that they shouldn't be used unless there is a need for some functionality they provide that the 'classic' (aka 'more reliable') textfields don't provide.
I had no clue what the difference was, so thats good to know.