Solved

Pathing Issue to Files

Posted on 2013-07-01
10
307 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:Starr Duskk
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 2

Author Comment

by:Starr Duskk
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 2

Author Comment

by:Starr Duskk
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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 2

Author Comment

by:Starr Duskk
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
 
LVL 2

Author Comment

by:Starr Duskk
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 2

Author Comment

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

Author Comment

by:Starr Duskk
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 2

Author Comment

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

thanks!
0

Featured Post

The Ultimate Checklist to Optimize Your Website

Websites are getting bigger and complicated by the day. Video, images, custom fonts are all great for showcasing your product/service. But the price to pay in terms of reduced page load times and ultimately, decreased sales, can lead to some difficult decisions about what to cut.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In Part 1 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7849-Hex-Maze.html) we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.

705 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