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
Solved

Pathing Issue to Files

Posted on 2013-07-01
10
305 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
  • 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
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.

839 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