Solved

Pathing Issue to Files

Posted on 2013-07-01
10
301 Views
Last Modified: 2016-08-29
I have a project where the player.html file that calls the .js files, etc. is in the directory with all the other files. I want to move the player to a different directory and still point to the child files and have it work. But it doesn't when I move the parent player.html file and change the paths.

I will attach a zip file at EEStuff for you to look at. The player.html file in the root directory is the one that I want to work, but doesn't. There is one in the child directory that does work if you want to see how it's supposed to work.

Here is the link to the zip file:
https://filedb.experts-exchange.com/incoming/ee-stuff/8312-PathIssue.zip

thanks!
0
Comment
Question by:BobCSD
  • 7
  • 3
10 Comments
 
LVL 18

Accepted Solution

by:
nap0leon earned 500 total points
ID: 39290577
Without access to the SWF file's source code, I can only speculate what is happening.

When I launch the route path's player.html which loads /scrom/player/playershell.swf there is an error loading slidegroup.swf.

When I launch /scorm/player.html, it works fine.  It even loads /scorm/player/slidegroup.swf

This tells me that the pathing reference for the files that are being loaded by the SWF are not fully qualified.  that is, they are relative paths, like "player/slidegroup.swf" instead of "/scorm/player/slidegroup.swf".

Without updating the paths to the files and recompiling them, your options are limited.

The short term solution is to use an iframe that loads the player at /scorm/player.html where ever you want to place your SWF.
0
 
LVL 1

Author Comment

by:BobCSD
ID: 39290620
Since the player is outside of the directory, are the inside paths no longer correct? Are they not relative to the directory they are in at that point?

For instance, in the scorm/player/flashcommand.js file there is a path:

var DATA_PATH = "data/swf/";

Open in new window


Is that no longer relative to that directory? Does that need scorm/data/swf/?

I did change it to that and it still doesn't work. But if it does require the change, then there are other locations that require a change as well. But I thought it was relative to the directory it was in, so that would still be okay.

thanks.
0
 
LVL 1

Author Comment

by:BobCSD
ID: 39290677
BTW, I cannot use an iframe. I need to communicate with the results after the player is done. I can't do that by loading the page in an iframe.
0
 
LVL 18

Assisted Solution

by:nap0leon
nap0leon earned 500 total points
ID: 39290699
The (first) issue is that it fails to load slidegroup.swf in the html page's /player directory.

I do not see the word "slidegroup" in any of the files, so that leads me to believe that the reference to that file is inside the compiled swf.  To update this value, you would need to edit the source of the SWF and recompile it.
0
 
LVL 1

Author Comment

by:BobCSD
ID: 39291009
why would the compiled swf not work when called by a file outside the directory vs. inside the directory? Isn't it relative to the swf file location? No?
0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
LVL 1

Author Comment

by:BobCSD
ID: 39291019
The imsmanigest.xml file has the file slidegroup and its path. I can try updating those paths in the manifest, but again, I keep asking, isn't it relative to the directory it's already in?

Once I'm in that directory, I shouldn't have to go back out to the /scorm/ directory again, should I?
0
 
LVL 1

Author Comment

by:BobCSD
ID: 39291050
Changing the path in the imsmanifest.xml file didn't help -- unless I didn't do it right.
0
 
LVL 1

Author Comment

by:BobCSD
ID: 39293112
I will find out more in regard to if the paths are in the SWF file.
0
 
LVL 18

Expert Comment

by:nap0leon
ID: 39293347
I presume you are using http://scormsoft.com ?

If so... the manifest.xml file is a reference of files that are included in the project.  Updating the XML file outside of their software does not create any real-time changes... think of this as "reference material" for the project.

Since this is software that creates the swf file for you, I expect you will need to contact them directly for better guidance.  I do not see anything in their User Guide documentation that suggests one way or the other whether you can relocate the "player.html" file to a directory outside of the package's directory.
0
 
LVL 1

Author Comment

by:BobCSD
ID: 39294714
Sorry, no. I'm actually trying to load a file that was generated by Articulate.

thanks!
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Article by: DanRollins
This article describes a JavaScript program that creates a maze made of hexagonal cells.  In Part 2 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7850-Hex-Maze-Part-2.html), we'll extend the program by adding a depth-…
The last time I worked with Flash and Socket connections was in AS1. A recent project required flash connecting to a Socket, and sending receiving information - we figured it would be easy enough - we all know about the socket policy documents and c…
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now