Skip navigation
GD_Daniel_LSsystems
Currently Being Moderated

Swf within a Swf scoring issue

Apr 12, 2012 1:57 PM

I've created a flash file (my project) that is loaded into another swf (our player) file on our site. When I test the project file on my computer the scoring displays correct at the end of the lab. When it is loaded into our  swf player on the site the score doesn't display. I'm at a lose for why this is happening. If someone could provide me with some direction I would be very thankful.

 

 

// Declare variable

var numOfCorrect:int = 0;

 

// Every time someone click the correct selection it adds one to the score

function correct(e:MouseEvent):void{

     numOfCorrect++;

}

 

 

//I have a text box with the name yourScore

 

yourScore.text = numOfCorrect + " out of 5";

 

 

 

It is very basic code so I have no idea what is isn't working. My only guess is there is some kind of conflict once it is loaded into an external swf. What would I do in this case? Thanks.

 
Replies
  • Currently Being Moderated
    Apr 12, 2012 2:49 PM   in reply to GD_Daniel_LSsystems

    Are you sure the player swf is loading?  Where is the code you show located?

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 13, 2012 6:34 AM   in reply to GD_Daniel_LSsystems

    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 

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 13, 2012 10:12 AM   in reply to GD_Daniel_LSsystems

    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.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points