I need some ideas, comments .....

Posted on 2005-03-29
Medium Priority
Last Modified: 2010-04-03
I currently have an application (exe) that outputs an xml file. A restriction on that file is it can only have one name, for eg.

now, should you want to output different items, without overwriting the first, this means you need to make multiple copies of your files everywhere, so the user wants to be able to have multiple xml files only.

a compiled swf reads in the xml file and outputs accordingly. I need ideas and ways on how to parse an xml filename to that swf at runtime. for e.g if the swf is in a html/asp type page, could parse through a query string, or maybe add a frame to the player for the user to load the xml in question or something to that effect.

secondly, the application has a browse for assets button, those assets however will only work at final runntime if in the same location as the compiled swf, is there a way in which i can force a file to be created in the correct location if it doesn't already exist. For example, dreamweaver does that, if you want to insert something that's not in the site, it asks if you want to create a copy in the site. How would I go about that?

Any ideas?

thanks ppl
Question by:blue-genie
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
  • 3
  • 3

Expert Comment

ID: 13659943
I'm not getting what you are asking, for the part I understand, I can say the following:

- You can not write to a (xml) file from flash, you need php, asp or flash remoting for this.

- If the swf is in a asp page, you can have the asp write the object tag, that refers to the swf. You can add parameters in this object tag, that apear as _root.variable in the flash movie: here is some javascript that does that, the parameter is called movie

var MM_contentVersion = 6;
var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ?
navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
if ( plugin ) {
var words = navigator.plugins["Shockwave Flash"].description.split(" ");
for (var i = 0; i < words.length; ++i)
if (isNaN(parseInt(words[i])))
var MM_PluginVersion = words[i];
var MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0
&& (navigator.appVersion.indexOf("Win") != -1)) {
document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n');
document.write('on error resume next \n');
document.write('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n');
document.write('</SCR' + 'IPT\> \n');
if ( MM_FlashCanPlay ) {
document.write('<OBJECT classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"');
document.write('  codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,79,0,0" ');
document.write(' ID="SNFlash" WIDTH="163" HEIGHT="98"  ALIGN="none">');
document.write(' <PARAM NAME=movie VALUE="/Butcms/Communities/Petersime/Themes/Petersime/Images/salesmap_home.swf?linkParam=dynamiclink.aspx?sectionId=116"> <PARAM NAME=loop VALUE=false /> <PARAM NAME=menu VALUE=false /> <PARAM NAME=scale VALUE=noscale /> <PARAM NAME=wmode VALUE=transparent /> <PARAM NAME=salign VALUE=T /> <PARAM NAME=quality VALUE=AutoHigh/> <PARAM NAME="allowScriptAccess" value="SameDomain" />  ');
document.write(' </OBJECT>');
} else{

LVL 11

Expert Comment

ID: 13660255
about first question, why not to make the logic in xml itself, make additional node for each new file you wanted to create.
the second question I did understand, create files with what?
LVL 39

Author Comment

ID: 13660316
wait, maybe i didn't explain properly.

currently, the app (don't worry about outputting xml and all that- its done it all works) outputs a file called flash.xml

there's a swf called player.swf which looks for a file called flash.xml, loads it and does its thing.

I want the player.swf to be able to load any xml file, so i want to be able to change my app to output flash2.xml or flash3.xml, and i want to know different ideas on how to get player.swf to know which xml to load.

the second part, Buffon, not sure what you mean by "create files with what".

assume i have a pic called test.jpg in "My Pictures" and my app is installed in C:\APP
player.swf also resides in C:\APP, and so does flash.xml

so now, in order for player.swf to load flash.xml and all the subsequent assets like test.jpg, test.jpg needs to be in C:\APP as well. Currently, the user will use a browse button and locate the test.jpg in "My Pictures" - I want a way then to check, that pic doesn't exist in C:\APP - pop up a msg telling the user so, and ask to make a copy in C:\APP.



What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.


Expert Comment

ID: 13660357
for the first question, I think the best way, is the one I posted in my previous post, generate a parameter in the object code.

the second question, assuming you are talking about the "app", in what language did you write it?

LVL 39

Author Comment

ID: 13660404
the app is a flash swf in a C# wrapper.

Accepted Solution

wimthepimscake earned 2000 total points
ID: 13660436
check if the file exists in C#, ask the question in a msgBox, then do whatever he wants in C# again. You don't need any flash for that right?

LVL 39

Author Comment

ID: 13669491
ok, wim, the c# guy gave me a nod on that bit. ok so that bit solved.

then, the other thing.

your solution wiill require a hard coding of the query parameters yeah?
i can't expect the end user to know how to go and change that. Maybe I'm not understanding it correctly.

I'm currently working on a solution in the flash, the player swf has to be web enabled, i.e can't be an exe.


Featured Post

Independent Software Vendors: 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!

Question has a verified solution.

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

This is intended to introduce all collision detection principles in flash, their strengths, weaknesses and workarounds. The main method for Collision Detection in flash is using hitTestObject. But unless you'll be pushing rectangular shapes without …
Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
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.
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.

770 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