JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsWeb DesignJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old March 21st, 2013, 10:45 AM
afb afb is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2013
Posts: 3 afb User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 45 m 36 sec
Reputation Power: 0
Javascript to read and interpret text displayed by Flash

Hi all, I am new to the forums so be gentle =)

A little background, I am by no means very fluent in flash or javascript, but do understand enough where a meaningful solution will get me where I need to be.

Here is what I am trying to do:
I want to embed a .swf file on a page. The .swf file is a quiz that the user will take and at the end of the quiz there is logic in the .swf file that will tell the user whether they passed or failed. I want to add a numeric code (much like a bar-code) to that pop-up that my page can read that it can then tell ther server whether the user passed or failed.

The need for this is for a few reasons. First, the user signs into the site with credentials so by being able to have the page read the .swf text code it can then assign the pass/fail to an actual user. If I were to try to have the flash assign the pass/fail it has no logical way to attach that to the currently signed in user.

Second, even if I knew how to get the .swf file to talk to my servers and attach a user (possibly through cookies) to the pass/fail I make these .swf quizzes with a 3rd party software and thus have no means to actually access and change anything in the .swf because I have no means to access the source code, everything is packaged by the 3rd party program. I do however have enough latitude to have the program display whatever text I want given a pass/fail by the user. So for instance the program can say "Please wait while we submit your grade: 1110110000111101000111" where the numeral string can be read by script and converted into a pass or fail event.

I would be happy to give more information if needed, I really appreciate all the help guys! You're the best

Reply With Quote
  #2  
Old March 21st, 2013, 10:14 PM
web_loone08's Avatar
web_loone08 web_loone08 is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Aug 2008
Posts: 599 web_loone08 User rank is Second Lieutenant (5000 - 10000 Reputation Level)web_loone08 User rank is Second Lieutenant (5000 - 10000 Reputation Level)web_loone08 User rank is Second Lieutenant (5000 - 10000 Reputation Level)web_loone08 User rank is Second Lieutenant (5000 - 10000 Reputation Level)web_loone08 User rank is Second Lieutenant (5000 - 10000 Reputation Level)web_loone08 User rank is Second Lieutenant (5000 - 10000 Reputation Level)web_loone08 User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Week 1 Day 12 h 40 m
Reputation Power: 69
This seems more like something you would set-up a ActionScript or FS Command for; to send data to a Server Side page (like: PHP, ASP, JSP, Perl, Ruby, Python, etc.) and maybe even include a database of some kind; for cross referencing end user info with pass/fail stats. I cannot see doing this with justl JavaScript; unless you are specifically embedding the JavaScript, in the flash movie, itself. ActionScripts.org also might have some details, about something similar to what your wanting to do. It might be a good place to do a little search engine trench work.

Reply With Quote
  #3  
Old March 22nd, 2013, 08:29 AM
afb afb is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2013
Posts: 3 afb User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 45 m 36 sec
Reputation Power: 0
Thanks for the suggestion. To clarify, I can not access the flash code, I am not sure if that affects your suggestion. Basically the .swf is what I have to work with as it is pre-packaged by the third party test-creation software. The only latitude I have is what the software allows which is the flexibility in the pass/fail text.

To give some more information, I had the testing system I am currently trying to plug these .swf files built for me many many years ago. It is a pure multiple choice system with radio buttons. When the user logs in and logs into a test and starts clicking answers and progressing through the quiz the page sends the users answers to our servers filed in a table with the user id and testID so that the server knows what test and who the answers are for.

So my idea was to play these .swf files instead of displaying the question text IE replace "2+2?" with the simplemath.swf file. In that file there is amazing graphical answering techniques including drag and drop fill in the blank etc that the file has logic to deal with that my webpage built for radio button MC could never even approach.

What I want at the end is when the the user passes the quiz instead of saying, "you passed" to say "submitting answers: 1u472k" where the string will be read by SOMETHING (not sure the technical side of things, Javascript, or html code, or FS like you said, or actionscript) and sent back to my current code on the page that is already written to handle sending answers to the server.

Sorry for the lengthy explanation, but given that, does that help point me further in the right direction.

I am going to extensively google FS commands and action scripts now, and see if that is something that could aid me.

Reply With Quote
  #4  
Old March 24th, 2013, 06:26 PM
web_loone08's Avatar
web_loone08 web_loone08 is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Aug 2008
Posts: 599 web_loone08 User rank is Second Lieutenant (5000 - 10000 Reputation Level)web_loone08 User rank is Second Lieutenant (5000 - 10000 Reputation Level)web_loone08 User rank is Second Lieutenant (5000 - 10000 Reputation Level)web_loone08 User rank is Second Lieutenant (5000 - 10000 Reputation Level)web_loone08 User rank is Second Lieutenant (5000 - 10000 Reputation Level)web_loone08 User rank is Second Lieutenant (5000 - 10000 Reputation Level)web_loone08 User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Week 1 Day 12 h 40 m
Reputation Power: 69
The only way I can think of, off hand; is... if the message (in your flash movie) is displayed in a flash text box element and that text box is set-up to trace; then you might be able to use some server side validation (based on your database results) and pass it into the flashvars parameter with AJAX and JavaScript. Although, it seems like what your wanting to do; is quit limited by your inability to communicate with the flash movie, because you are unable to edit this flash file.

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignJavaScript Development > Javascript to read and interpret text in .swf file

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap