Posted by baoputzi in SWF Studio V3 on Jan 10 2008, 04:42 am

1. I used the example code from V3 to just try to open a wmv or mpg file. Without efforts. The System is Vista business and the player is windows media player 11.
how do i succeed in opening a wmv at a given width/height and x,y- position. Or better how to embedd this sort of stuff?

thx for any help


Posted by mbd in SWF Studio V3 on Jan 10 2008, 09:39 am

Check out the examples section:
http://www.northcode.com/go?id=v3examples

Specifically this one:
http://www.northcode.com/v3/exampleitem.php?link=27

The WMVideo object is used to play video files on your application.


Posted by baoputzi in SWF Studio V3 on Jan 10 2008, 01:59 pm


QUOTE: from mbd;42543
Check out the examples section:
http://www.northcode.com/go?id=v3examples

Specifically this one:
http://www.northcode.com/v3/exampleitem.php?link=27

The WMVideo object is used to play video files on your application.


thx for your reply I already checked out the sample on the sample download page that did not work I got a blank screen thats all. Also I tried the samples for Browsers etc. I always get a blank screen and a turning wheel sign.
But I will keep on trying - so far I am a'little frustrated.


Posted by baoputzi in SWF Studio V3 on Jan 10 2008, 02:02 pm


QUOTE: from mbd;42543
Check out the examples section:
http://www.northcode.com/go?id=v3examples

Specifically this one:
http://www.northcode.com/v3/exampleitem.php?link=27

The WMVideo object is used to play video files on your application.


thx for your reply.
I already checked out most of the the samples on the sample download page. Of those sample non worked I always got a blank screen. Maybe they are just not designed for vista64.
But I will keep on trying - so far I am a little frustrated. I can open a wmv and play but positioning and window api fails.


Posted by mbd in SWF Studio V3 on Jan 10 2008, 02:33 pm

When you say none of the examples are working for you and you get a blank screen, do you mean the window comes up but there's nothing in it?

Make sure you don't enable transparency for the WMVideo, ActiveX, or Browser examples, as the controls won't be visible ( reference).


Posted by baoputzi in SWF Studio V3 on Jan 10 2008, 02:47 pm


QUOTE: from mbd;42554
When you say none of the examples are working for you and you get a blank screen, do you mean the window comes up but there's nothing in it?

Make sure you don't enable transparency for the WMVideo, ActiveX, or Browser examples, as the controls won't be visible ( reference).


thx for the fast reply
transparency is disabled. I tried out the wmv samples. The ssCore.Shell.invoke command works but opens the wmv with neroPlayer when I try to open with execute and wm-player the command fails. Also all the set w,h and x,y parameters are ignored.


Posted by AGo in SWF Studio V3 on Jan 10 2008, 02:50 pm

Also which SWF Studio Version do you use, since you mentioned testing on Vista


Posted by baoputzi in SWF Studio V3 on Jan 10 2008, 03:00 pm


QUOTE: from AGo;42558
Also which SWF Studio Version do you use, since you mentioned testing on Vista

still 3.4 which I bought yesterday. As my code is in as2 and not yet rewritten to AS3 and I need a production stable version for my customer and also for my own stuff.


Posted by northcode in SWF Studio V3 on Jan 10 2008, 07:38 pm

I know the WMVideo stuff works on Vista because a couple of pretty big outfits with lots of users beat us up to get the Vista support working (Vongo and PermissionTV). I believe we've also tested on 64-bit bit Vista but we haven't installed a 64-bit Vista on our Athlon box yet so there might be something we're missing.

When you use the examples did you set the version to 9 or just let it default to 6. If you don't set WMVideo.setVersion to "9" it won't work on newer systems (some XP and most Vista) that ship with newer versions of WMP that don't include support for the old WMP6 interfaces,


Posted by baoputzi in SWF Studio V3 on Jan 11 2008, 08:53 am


QUOTE: from northcode;42566
I know the WMVideo stuff works on Vista because a couple of pretty big outfits with lots of users beat us up to get the Vista support working (Vongo and PermissionTV). I believe we've also tested on 64-bit bit Vista but we haven't installed a 64-bit Vista on our Athlon box yet so there might be something we're missing.

When you use the examples did you set the version to 9 or just let it default to 6. If you don't set WMVideo.setVersion to "9" it won't work on newer systems (some XP and most Vista) that ship with newer versions of WMP that don't include support for the old WMP6 interfaces,


I will try that. I did set the versions to 10 and 11 as I have installed 10.

thx.


Posted by northcode in SWF Studio V3 on Jan 12 2008, 05:31 am

You can only use "6" or "9" as the version parameter to setVersion, anything else will be interpreted as an error which will default to 6. That explains why it's failing for you It's not really asking what version of WMP you want but the version of the interface. Version 6 (5.4 actually) was the last version of the old style media player interface. After that the object model was overhauled and version 9 was the next "official" version. The version 9 set of interfaces has remain mostly unchaned except for the addition of some new objects and capabilities. So... when we ask you to set the version we're really asking if you want the old style WMP functionality or the new stuff. The old stuff is mostly gone now but some applications rely on functionality that doesn't exist in the version 9 support so we've left it there.


Posted by baoputzi in SWF Studio V3 on Jan 12 2008, 07:14 am


QUOTE: from northcode;42588
You can only use "6" or "9" as the version parameter to setVersion, anything else will be interpreted as an error which will default to 6. That explains why it's failing for you It's not really asking what version of WMP you want but the version of the interface. Version 6 (5.4 actually) was the last version of the old style media player interface. After that the object model was overhauled and version 9 was the next "official" version. The version 9 set of interfaces has remain mostly unchaned except for the addition of some new objects and capabilities. So... when we ask you to set the version we're really asking if you want the old style WMP functionality or the new stuff. The old stuff is mostly gone now but some applications rely on functionality that doesn't exist in the version 9 support so we've left it there.

thank you
ok that gives me a better understanding. Nevertheless when I omit a call to a specific player and use your sample out of the V3 help the player starts correctly but does not show the film instead it shows the media library stuff. What do I do wrong ?

besides I start to love your program but would highly appreciate a better help included in the flash/ flex sdk. Although with this kind of perfect support of yours - nearly no written help is needed...

thx again


Posted by baoputzi in SWF Studio V3 on Jan 12 2008, 08:05 am


QUOTE: from baoputzi;42591
thank you
ok that gives me a better understanding. Nevertheless when I omit a call to a specific player and use your sample out of the V3 help the player starts correctly but does not show the film instead it shows the media library stuff. What do I do wrong ?

besides I start to love your program but would highly appreciate a better help included in the flash/ flex sdk. Although with this kind of perfect support of yours - nearly no written help is needed...

thx again


now it works when I force to use version 9 as in help then there open the video without player:
ssCore.WMVideo.setVersion({version:"9"});
ssCore.WMVideo.setResource({resource:filePath});
ssCore.WMVideo.setSize({width:1024, height:768});
ssCore.WMVideo.setPosition({x:appX, y:appY});
ssCore.WMVideo.play();


ho can I kill a running media player instance ?

when I use:
ssCore.Win.sendMessage({target:"Windows Media", message:'Kill'});

this kills my application too


Posted by mbd in SWF Studio V3 on Jan 12 2008, 09:23 pm

Using the caption like that can be a problem. Instead, take a look at ssCore.SysTools.killApp.

That method will let you specify the name of the application itself to kill. For example, Windows Media Player is "wmplayer.exe".


Posted by baoputzi in SWF Studio V3 on Jan 13 2008, 04:31 am


QUOTE: from mbd;42598
Using the caption like that can be a problem. Instead, take a look at ssCore.SysTools.killApp.

That method will let you specify the name of the application itself to kill. For example, Windows Media Player is "wmplayer.exe".


Yes I found that but when used it killed all my application - unforge but I will try to use wmplayer.exe I thougt that caption is the string in the Head of the app window : "Windows Media Player" but if caption is focus on the .exe Name will try again. Maybe that helps me with my browser problem too.

Thank you


Posted by northcode in SWF Studio V3 on Jan 13 2008, 04:35 am

If you're using WMVideo you don't need to kill anything, just call WMVideo.stop to close the player you created with the other WMVideo calls.


Posted by baoputzi in SWF Studio V3 on Jan 13 2008, 04:38 am


QUOTE: from northcode;42602
If you're using WMVideo you don't need to kill anything, just call WMVideo.stop to close the player you created with the other WMVideo calls.

thx
that what I did alternatively but I first wanted to have the viseo controls etc. of wmPlayer


Posted by baoputzi in SWF Studio V3 on Jan 15 2008, 01:28 pm

ssCore.WMVideo.setVersion({version:"9"});
var r = ssCore.WMVideo.setResource({resource:file});
ssDebug.trace("wmv: " + file);

ssCore.WMVideo.setSize({width:contentW, height:contentH});
ssCore.WMVideo.setPosition({x:contentX,y:contentY});
ssCore.WMVideo.play();

thats the code it works 2- 3 times and then not.

stop button = ssCore.WMVideo.stop();

file = "contentA/filmA.wmv"

"startdir://" + file does not work either. The path is correctly traced out.

thx for any help


Posted by northcode in SWF Studio V3 on Jan 15 2008, 02:51 pm

Do you know the definition of insanity?

Doing the same thing over and over and expecting different results.

YOU HAVE TO STOP USING / IN STRING LITERALS FOR FILE PATHS!

Try using "startdir://file.wmv" and put file.wmv in the same folder as your EXE file. Get that working before you try and get fancy.

Also try our wmvideo example, it works and allows you to specify the path to the video you want to play. If that fails after 2-3 times then


Posted by baoputzi in SWF Studio V3 on Jan 15 2008, 03:47 pm


QUOTE: from northcode;42661
Do you know the definition of insanity?

Doing the same thing over and over and expecting different results.

YOU HAVE TO STOP USING / IN STRING LITERALS FOR FILE PATHS!

Try using "startdir://file.wmv" and put file.wmv in the same folder as your EXE file. Get that working before you try and get fancy.

Also try our wmvideo example, it works and allows you to specify the path to the video you want to play. If that fails after 2-3 times then


sure the problem was that loading the files via xml with \\ leaded to the effect - once compiled in 3.4 - that files were sometimes found and sometimes not - thus I just wanted to be shure what the right paths are I understand that matter.


Posted by baoputzi in SWF Studio V3 on Jan 15 2008, 04:38 pm


QUOTE: from baoputzi;42664
sure the problem was that loading the files via xml with \\ leaded to the effect - once compiled in 3.4 - that files were sometimes found and sometimes not - thus I just wanted to be shure what the right paths are I understand that matter.

Also checked out the sample wmv. pressing play does nothing - pressing resume shows funny film.

this code didnt work all in same dir
ssCore.init();


ssCore.WMVideo.setVersion({version:"9"});
ssCore.WMVideo.setNotify({event:"onError"}, {callback:onError});

ssCore.WMVideo.setResource({resource:"startdir://film.wmv"});

ssCore.WMVideo.setSize({width:1024, height:768});
ssCore.WMVideo.setPosition({x:0, y:0});

ssCore.WMVideo.play();



function onError(return_obj, callback_obj, error_obj)
{
_ssDebug.trace("WM Error " + return_obj.result);
}


Posted by Dan in SWF Studio V3 on Jan 15 2008, 05:14 pm

I think there's some confusion as to where you must and must not use double backslashes.

In your code, where you have string literals (strings in quotes or double quotes), Actionscript, as do most languages, allows you to put in some special control characters, such as carriage returns, line feeds and tabs.

For example to put a carriage return in a literal, you put "\r" in the string. E.g
var myMessage = "This text is\rsplit over two lines.";For line feed and tab, you'd put \n and \t, respectively.

In the actual source code, the \ and r are two characters, but they are interpreted by the compiler as one before it actually stores the string into memory (i.e. into the variable). This means that once in memory, those two characters become one totally different character! (It has a character code of 13.)

The question then becomes, what if you want to put a backslash into your string? How do you do that if the compiler will try to "mash up" the backslash (the "escape character") with the next character in the string? Quite simply, you use a special escape sequence. Just like \r means carriage return, \\ means backslash.

Now, don't forget that the above only applies to string literals in your code. If you are reading the content of a file (e.g and XML file) at runtime, then the contents go straight into memory. So in your XML, don't put two backslashes. This is because the runtime engine isn't trying to "run" the XML -- it isn't source code for the compiler -- so there will be no such special interpretation of the content.


Posted by baoputzi in SWF Studio V3 on Jan 15 2008, 05:55 pm


QUOTE: from Dan;42668
I think there's some confusion as to where you must and must not use double backslashes.

In your code, where you have string literals (strings in quotes or double quotes), Actionscript, as do most languages, allows you to put in some special control characters, such as carriage returns, line feeds and tabs.

For example to put a carriage return in a literal, you put "\r" in the string. E.g
var myMessage = "This text is\rsplit over two lines.";For line feed and tab, you'd put \n and \t, respectively.

In the actual source code, the \ and r are two characters, but they are interpreted by the compiler as one before it actually stores the string into memory (i.e. into the variable). This means that once in memory, those two characters become one totally different character! (It has a character code of 13.)

The question then becomes, what if you want to put a backslash into your string? How do you do that if the compiler will try to "mash up" the backslash (the "escape character") with the next character in the string? Quite simply, you use a special escape sequence. Just like \r means carriage return, \\ means backslash.

Now, don't forget that the above only applies to string literals in your code. If you are reading the content of a file (e.g and XML file) at runtime, then the contents go straight into memory. So in your XML, don't put two backslashes. This is because the runtime engine isn't trying to "run" the XML -- it isn't source code for the compiler -- so there will be no such special interpretation of the content.


Thus I was right in using single slashes in the xml as I did hundred times before without using studio. Thank you for the explanation I understand the system well but was completely gone fancy because of that wmv stuff


Posted by baoputzi in SWF Studio V3 on Jan 15 2008, 06:10 pm

var r = ssCore.WMVideo.play();

if(r.success)
{
}
else
{

ssDebug.trace('wmv ERROR: '+r.Error.description);


}

since I passed a return object to WMVideo.play() wmv opend and closed and opend and closed without the return object the wmv sometimes opened sometimes not. Both in synchronus mode which ought to be sufficient for desktop.


Posted by mmx4 in SWF Studio V3 on Apr 10 2008, 03:50 am


QUOTE: from northcode;42661
Do you know the definition of insanity?

Doing the same thing over and over and expecting different results.


Nice, you explain everybody that / is not working and \ is.
Again and again. All the time. it would be way better to simply (or not so simply) add changes to SWF Studio to support / ,or not ?

I'm sorry, I really don't know how hard is to implement this functionality. But flash player itself is not limited to \ only. It can handle both / and \ so it's more or less SWF Studio issue.

Sorry again. Just cant stand it anymore. You would receive 2 times less complains/help requests if you add functionality flash player already has. Not just teach web developers about correct / and \ usage.

Thanks.


Posted by pompeyd in SWF Studio V3 on Apr 10 2008, 04:16 am

It's a Windows/Flash thing.

Flash was designed as a web based technology, and so interprets \ & / the same way due to some servers accepting both\either\or.

Windows will always interpret \\ correctly in a path, but sometimes and not always /, therefore the recommended method with Windows paths is \\ to be absolutley certain that the path will be interpreted the correct way.

SWF Studio takes Flash away from its native environment, so there has to be some accpetance of this by developers using Flash in this way.

Dan, Tim, or mbd have explained why it is not possible or desirable to have SWF Studio take this matter out of the hands of developers, there is a post on in somewhere, but can't find it right now - maybe they can explain again, but I suspect they are sick of it.

Personally, I don't think it is much to ask an employed developer to be able to understand the different requirements in paths when moving from the web to the desktop.

(I just do my own stuff and a little free lancing here and there, self taught, not employed, and find it difficult to understand how employed developers end up asking what seem to be simple questions, that someone self taught helps them out with - not having a go at you mmx4, just seems strange sometimes)

hth

Paul


Posted by mmx4 in SWF Studio V3 on Apr 10 2008, 04:32 am


QUOTE: from pompeyd;43891

Dan, Tim, or mbd have explained why it is not possible or desirable to have SWF Studio take this matter out of the hands of developers, there is a post on in somewhere, but can't find it right now - maybe they can explain again, but I suspect they are sick of it.


Well I would be glad to see post where reasonable explanation why this cannot be implemented in SWF Studio (except "windows does not support /"). Its been a while since i programmed C/C++ or whatever language SWF Studio has been written. But just, please try.

PS:Imagine you have two projects with same source for web and for desktop.
We tried using "\" in HTTP URL's because of that. That worked but sometimes fail. (Opera browser for instance). And its not just that I don't want to find other solutions. But it would be way easier for many of us, if SWF studio would support / .


Posted by pompeyd in SWF Studio V3 on Apr 10 2008, 04:47 am


QUOTE: from mmx4;43893
PS:Imagine you have two projects with same source for web and for desktop.
We tried using "\" in HTTP URL's because of that. That worked but sometimes fail. (Opera browser for instance). And its not just that I don't want to find other solutions. But it would be way easier for many of us, if SWF studio would support / .


var desktopPath:String = "\\";
var remotePath:String = "/";
var useSlash:String = new String();


Check on local/remote usage however you want:

If local:

useSlash= desktopPath;


If remote:

useSlash = remotePath;

Code in application:

file = "contentA" + useSlash + "filmA.wmv"

A little extra work but if you need one solution for two different environments, a little extra work is going to be expected????

Paul


Posted by mmx4 in SWF Studio V3 on Apr 10 2008, 05:02 am

you can't do the same for imported assets/shared libraries on the fly :)


Posted by pompeyd in SWF Studio V3 on Apr 10 2008, 05:37 am


QUOTE: from mmx4;43897
you can't do the same for imported assets/shared libraries on the fly :)

Fair enough. I guess it just means that when taking something out of its native environment to be used for multiple different environments, "one solution fits all" isn't going to work.

Maybe NC could post a blog or something that explains the reasoning as to why they can't/won't support "/" in paths that SWF Studio uses. Or maybe one page in the help files - although even if they do, I suspect there will always be complaints from users that don't :rtfm: ;)

I seem to remember reading their post and thinking that they had good reason for their stance on it, just can't remember the details.

For now, I'll agree to disagree if you agree :)

Paul


Posted by northcode in SWF Studio V3 on Apr 10 2008, 09:57 am

The core of the explanation is that \ is correct and / is not. We could make SWF Studio commands work with / and \ but we can't do the same for Flash commands and components. So we could either solve the problem in a half-assed way, or we could explain how to do it properly so our users get smarter and our software doesn't get dumber ;)


Posted by mmx4 in SWF Studio V3 on Apr 11 2008, 05:53 am


QUOTE: from northcode;43907
The core of the explanation is that \ is correct and / is not. We could make SWF Studio commands work with / and \ but we can't do the same for Flash commands and components. So we could either solve the problem in a half-assed way, or we could explain how to do it properly so our users get smarter and our software doesn't get dumber ;)

Which flash commands/components does not work with / ?
I have 2 equal samples, one is created with projector, one with SWF studio. Flash projector accepts /, while SWF Studio not.


Posted by pompeyd in SWF Studio V3 on Apr 11 2008, 06:42 am

Flash will work with /

While the correct method for Windows (hence SWF Studio since it is designed for Windows deployment) is \

People seem to be forgetting that SWF Studio is designed to help you with solutions that require Flash to interact with WINDOWS and not a web server. Ever tried to get Flash to open a directory on your hard drive while being served from a web server and embedded in a web page? You can't. You can't even do it with a Flash Projector. There are deliberate security limitations which SWF Studio allows you to get around of - thus there are 'compromises' required......................or additional learning when moving from the web to the desktop.

It is two totally different environments.

There may be other solutions than SWF Studio that provide \ & / but they are all 'half assed' and buggy. Personally I prefer to learn the correct way and use something stable as Tim mentioned before - and I hope they continue in that vein.


Posted by mmx4 in SWF Studio V3 on Apr 11 2008, 07:01 am

Sorry, I forgot to mention flash sample is created with standard flash projector for windows. So its not really Web anymore.

And I know, i know, i know. I want too much. Thanks for reminding me that flash is designed for web.


Posted by pompeyd in SWF Studio V3 on Apr 11 2008, 08:07 am


QUOTE: from mmx4;43928
Sorry, I forgot to mention flash sample is created with standard flash projector for windows. So its not really Web anymore.

No? What good is it?

I give up trying to explain, someone else can try!!

I won't mention it again - well not in this thread, and not tonight. ;)

Best regards

Paul


Posted by mbd in SWF Studio V3 on Apr 11 2008, 10:52 am

Easy, guys. No harm in asking questions and having a friendly chat.

For a specific example where it might make things difficult to convert characters, take ssCore.Shell.execute. Lets say we do a conversion for / to \ in the path parameter. Should we do that in the arguments parameter as well? You can specify paths in the arguments parameter, and we've even documented that you can specify a file moniker in the arguments parameter. But if we convert / to \ in the arguments parameter, we would probably be destroying most people's data, since the / character in a command line is typically used as a switch (since it's not valid in a Windows path). So, do we then not do conversions in the arguments parameter, but do them in the path parameter? Are there other cases where we might be doing more harm than good?

The best way to handle this is to have the user create the path. The only data this applies to in your application is where you specify paths to SWF Studio commands. That's rather specific. You don't have to change paths for Flash methods, just when dealing with SWF Studio commands. If you're loading external data and you eventually have to get that to a SWF Studio command, run it through a conversion function first.

mmx4, I would prefer someone ask the question as you've done and have a discussion than for anyone to just be confused and not understand. Hopefully this comes across with the intended message that we want to help make your applications better, not as a dismissal to your suggestions.

As an aside: even the Flash Player has issues with / and \. In Flash Player 7 standalone I can specify a relative path to load an image like so: "..\\folder\\image.jpg" or "../folder/image.jpg". However, if you try to use the first one in Flash Player 8+ standalone the image doesn't get loaded. You can only use / in that case. If the file is in a folder above it works for both cases: "folder\\image.jpg" and "folder/image.jpg".


Posted by mmx4 in SWF Studio V3 on Apr 14 2008, 07:13 am


QUOTE: from pompeyd;43929
No? What good is it?
I give up trying to explain, someone else can try!!
I won't mention it again - well not in this thread, and not tonight. ;)
Best regards
Paul


Sorry, I never intended to assault or start any flame wars.


Posted by mmx4 in SWF Studio V3 on Apr 14 2008, 07:33 am


QUOTE: from mbd;43936
Easy, guys. No harm in asking questions and having a friendly chat.

For a specific example where it might make things difficult to convert characters, take ssCore.Shell.execute. Lets say we do a conversion for / to \ in the path parameter. Should we do that in the arguments parameter as well? You can specify paths in the arguments parameter, and we've even documented that you can specify a file moniker in the arguments parameter. But if we convert / to \ in the arguments parameter, we would probably be destroying most people's data, since the / character in a command line is typically used as a switch (since it's not valid in a Windows path). So, do we then not do conversions in the arguments parameter, but do them in the path parameter? Are there other cases where we might be doing more harm than good?

The best way to handle this is to have the user create the path. The only data this applies to in your application is where you specify paths to SWF Studio commands. That's rather specific. You don't have to change paths for Flash methods, just when dealing with SWF Studio commands. If you're loading external data and you eventually have to get that to a SWF Studio command, run it through a conversion function first.

mmx4, I would prefer someone ask the question as you've done and have a discussion than for anyone to just be confused and not understand. Hopefully this comes across with the intended message that we want to help make your applications better, not as a dismissal to your suggestions.

As an aside: even the Flash Player has issues with / and \. In Flash Player 7 standalone I can specify a relative path to load an image like so: "..\\folder\\image.jpg" or "../folder/image.jpg". However, if you try to use the first one in Flash Player 8+ standalone the image doesn't get loaded. You can only use / in that case. If the file is in a folder above it works for both cases: "folder\\image.jpg" and "folder/image.jpg".


ssCore.Shell.execute is pure SWF Studio function and if its called, that means people wrote keeping SWF Studio restrictions in mind. You may add / functionality for ssCore.Shell.execute or may not. That probably will add some freedom for programmer, but that may be more bad than good.

I'm more uneasy about native flash commands where as you said yourself sometimes "/" is the only option for command. That means if you write this code for online application, it may probably fail under SWF Studio.
If project has been written for web, but it's adapted for desktop, it's important to make as less changes as possible to existing code.

Ok, it's about methods.

Whole problem for me is in technique called "runtime sharing".
AFAIK yo can set it only at compile time, using flash authoring tool. ( Or using swfmill ).
SWF Studio accepts only \ in this field. But .swf's with \ there does not work online sometimes. I can provide sample (flash 8) for this problem. Problem is that there should be one .swf for online and desktop application.


Posted by pompeyd in SWF Studio V3 on Apr 14 2008, 07:34 am


QUOTE: from mmx4;43946
Sorry, I never intended to assault or start any flame wars.
Me neither, if it came across that way - and no offence was taken. Some things written tongue-in-cheek don't always come across as intended.

I couldn't remember the exact reasoning NC had given before on the subject, so couldn't take the discussion further, Derek has explained it perfectly - as always. Maybe it could go in the next set of Help Files somewhere to prevent confusion in the future.................:)

Best regards

Paul


Posted by mbd in SWF Studio V3 on Apr 14 2008, 10:44 am


QUOTE:
I'm more uneasy about native flash commands where as you said yourself sometimes "/" is the only option for command
That was the case for the Flash standalone player, in the example I posted.

I think you might be getting confused when we talk about / and \ with regards to paths. I've never seen a case where a native Flash command won't work with the / character in SWF Studio. Paths can be an issue for some commands we don't overwrite, like loadMovieNum, but a relative path using the / character should still work fine.

Now if you try to use the / character in a full path and pass that to a Flash command, I'm not 100% sure what Flash Player will do. I would expect it to still work, but have not tried. Mixing the characters for a full path may also be problematic, although it might not be. That's a Flash Player discussion. I can tell you about what is happening with Flash commands that we've overwritten. I can tell you that the overwritten Flash commands will convert / to \ because under the covers we try to resolve relative paths to alleviate startdir vs tempdir path issues. If you provide a full or remote path, nothing will be converted or checked. If you provide a relative path we check that the file exists in the base path and if it doesn't we try to load the file from the temp folder. More info.

Note: The behaviour changed slightly in 3.4 but was not corrected in the documentation. In the second paragraph it is stated:

QUOTE:
If a matching file is located in the layout it will be loaded using the secure loader.
It should be:

QUOTE:
If a matching file is located in the layout it will be loaded from the temp folder (where files are automatically extracted). If the secure loader is enabled for the main movie, the files will be loaded using the secure loader instead.
This has been corrected internally.


Posted by mmx4 in SWF Studio V3 on Apr 18 2008, 07:57 am


QUOTE: from mbd;43950
...

Were not using secure loader. Files are stored locally on disk.
Problem occurs when loading "one.swf" file which has linked movie clip to another file two.swf file.
Linkage is defined in flash authoring environment and is relative like: "../directory/two.swf"

Loading this one.swf fails under swf studio, because of this linkage.


Posted by mmx4 in SWF Studio V3 on Apr 21 2008, 05:01 am


QUOTE: from mbd;43950
I've never seen a case where a native Flash command won't work with the / character in SWF Studio. Paths can be an issue for some commands we don't overwrite, like loadMovieNum, but a relative path using the / character should still work fine.

Linked libraries is native feature of flash.


Posted by mbd in SWF Studio V3 on Apr 21 2008, 10:55 am

True, and it isn't something that we have any control over.

I can confirm the issue you are seeing. It works fine unless you use "../". For some reason the Flash Player can't determine the correct path in that case. If the path is in the same folder, or within a subfolder, of the EXE then it works. From my tests the assets aren't imported using any method that can be overwritten, so the API can't help in this case.


Posted by mmx4 in SWF Studio V3 on Apr 22 2008, 02:53 am


QUOTE: from mbd;44016
It works fine unless you use "../".

Thanks for reply, this gave me a new idea.
I tried to add ./ before ../ so that it looks like "./../path/filename.swf" and this seems to work fine for me. I really don't believe that ;)