Flash, Javascript and States Issue

Jan 26, 2016

I'm working on a matching game that contains card objects with variable text set via Javascript.  The "flipped" state holds the text.  The blue "normal" state should not show text.

All the external scripts are part of the WebObject collection (hat tip to Steve Flowers) and the external .js files load via Steve's script to load Javascript files from a trigger.

When I upload to a web server and test with Flash enabled everything is right with the world. Text doesn't show until I've clicked the card to reveal the "flipped" state.

But when I disable Flash . . . ugh.  The text shows on my "normal" states, even though there isn't a textbox on that state. (Not all the slides have text. I decided to delete about half and haven't followed through on the decision in SL yet.)

Anyone have a clue on why this is happening?  I want to reiterate I am NOT working locally.  I've tried this in both Chrome and Firefox with identical results, and I'm pulling my hair out.

7 Replies
Steve Gannon

Off the top of my head, Sharon, I can't understand why this is occurring either; I'd have to study the .story file. But a quick fix would be to change the color of the text in the text box to the same blue used for the blue boxes. The text would still have plenty of contrast when flipped to the white box "flipped" state but wouldn't be visible in the Normal state.

Ashley Terwilliger-Pollard

Really great idea Steve - and if you're still having difficulty Sharon, you may want to share a portion of the .story file here so that the community could take a look at your Javascript. I know you mentioned testing it in Chrome (which should support the HTML5 output) but Firefox is not supported for non-Flash content.  What Chrome version were you using? I'm not familiar with any particular issues with Chrome and JS - but perhaps folks in the community will be able to weigh in. 

Steve Gannon

Hi Sharon,

I was able to replicate the problem you described (I only tested in  Chrome). I made several adjustments to try to uncover what was happening.

I wanted to first rule out a Javascript issue so I deleted all of the Execute Javascript calls and deleted the opening slide and the web object slide. Next, I set the initial value of the first six 'text' variables to a value (e.g., 'text 1,' 'text 2,' 'text 3,'...) since I no longer had the Javascript pulling in the values. I ran the published HTML5 output in Chrome and the problem still persisted, so that seems to rule out your Javascript as the culprit.

Then I tried a couple more things:

1. In the Normal state of box 2, I inserted a space (Edit text, hit the spacebar).

2. In the Flipped state of box 4, I removed the text from the box and inserted a text box on top of it (no line, no fill) and inserted the variable reference in that text box.

3. In the Flipped state of box 5, I copied the white box with the variable reference included and then moved that box out of the way. I pasted the copied box and positioned it where it belonged, then I deleted the initial box.

When I published and ran the HTML5 version in Chrome once again, the Normal state of boxes 2, 4 and 5 all appeared with out text (good!). When I clicked box 2, the Flipped state appeared but the text was top-aligned rather than in the middle (weird). Box 4 and 5 correctly displayed their Flipped state but the hand pointer didn't appear as I hovered over the blue box (weird also!).

I have attached the modified file. I recommend you open a case. When you send them your file, I recommend deleting the Execute Javascript triggers and the first slide and the web object slide so you don't hear back from Support saying "we don't support Javascript." I really don't believe Javascript is the problem here.

I know you don't want to hear this, but I bet if you rebuilt that slide with all of the boxes from scratch, I think the problem might just go away because it seems that any slight modification to the Normal or Flipped states keeps the text from appearing on the Normal state. Perhaps there was something corrupted with the first box you created, and if you copied and pasted that box over and over, the problem just got duplicated.

Sharon Huston

Wow, Steve!  Thank you!!  I was sure this was due to my less-than-expert coding skills.  It probably is a corrupt something.  In this project I also had a corrupt sound file that would halt my slides in mid-play. I'll probably try re-building the slide, it probably wouldn't take much longer than hearing back from support.

This discussion is closed. You can start a new discussion or contact Articulate Support.