Copy link to clipboard
Copied
Hello
So i made a flash move including embedded sounds and 3 Videos (converted to FLV and component)
all works great as .Swf
then i want to make a projector and got ZINC 4.0 (win version)
everything exports fine except the 3 videos.
i went to forums (a lot) and apparently the video paths are dropped when ZINC compiles the file
and then cant locate the source videos.
i found this possible solution (on Mdm forum)
http://www.mdmforum.com/forum/index.php?showtopic=29740&view=&hl=FLV%2 0component%20projector%20vide...
function path(aPath:String😞String{
if(mdm.Application && mdm.Application.path){
var newPath:String = "file://"+mdm.Application.path.split("\\").join("/");
newPath += aPath;
return newPath;
}
return aPath;
}
//
var soundPath:String = path("assets/sounds/mySound.mp3");
but honnestly i have no or little idea where i should put this script and what to do with the :
"file://"+mdm.Application.path.split("\\").join("/");
line
my video files are in a folder like this: source/vid1.mp4
so q's are:
1: WHERE do i put the lines of code? (at frame 1 or on the frame where the video is)
2: How do i fill in the blanks in line 3 in the example?
3: Does this script even work with F.Pro CC ?
This is such a downer, i managed to build everything and it is actually pretty nice, then i tumble at the very very last step
Please, Help
SCUMSPAWN
Copy link to clipboard
Copied
What are you using Zinc for? I'd suggest packaging for AIR instead... Not sure there's any use for those 3rd party wrappers anymore, AIR gives you everything they do.
Copy link to clipboard
Copied
I would use Air, if i could program, but i can't... havent actually used flash since AS3 was introduced.
I read up a bit on differnt ways to make standAlone projectors and everything pointed to ZINC.
That said,it is VERY dissapointing that something as simple as getting the path correct in the projector
aquirers addition code...
(remembering the happy days with Flash 4 where you could just tick "create projector" and basically
anything popped out just fine.)
Maybe i should add that the final output needs to be projectors for Win and Mac (both made on Win)
And will end up on a USB key for hand-outs
Copy link to clipboard
Copied
humm, looks like i hit a soft spot there, thought this was an easy one
Copy link to clipboard
Copied
The function is testing for the existence of mdm.Application.path and if it exists then it uses it to create a file:// path for you. Otherwise it returns what you sent (a relative path, which usually does not work with Zinc, and I have no idea why they decided that was a good idea).
The converted system path (e.g. C:\some\path\to\file) looks like file://c:/some/path/to/file when converted.
You'd use it like so:
// their path function
function path ......
// then use it
var myFile:String = path('source/vid1.mp4');
// load it
myNetStream.play(myFile);
I don't know what you're sending the .mp4 video to, assuming a NetStream object, season to taste.
Others:
AIR doesn't do everything Zinc does.
Copy link to clipboard
Copied
Hi, thanks for your reply, it is over my head i am afraid.
will look for some paid help tomorrow since i already exceded my deadline 😕
The mp3 is for the FLV component, it is the only way i can import the video into flash (vids are 5-7 min)
...so the "standalone" is not really so "standalone", Humpf!
worst 300$ i have ever spent (on ZINC) i am afraid.
And no AIR is not an option, i cant expect the users to download a player they most likely do not have
(target group = 50+ yr with interest in high-end and un-traditionalclassical music from the east. -
pretty sure this group is 99% PC with XP sp2 or worse ),
Was supposed to be a easy user experience, put in USB / 2xclick the: PC_version.exe / enjoy.
all worked fine right up to the Projector compiler.
Copy link to clipboard
Copied
As for AIR, you can export what is called "captive runtime" where it exports an executable and includes the AIR runtime, so the user does not need to already have AIR. It even makes an installer if you wish, automatically.
That aside, if you're willing to convert your media to FLV or use MP3s and you're not too keen on coding then you can always embed your videos directly in the project. When you import (file->import) your video files you are asked how you want to handle the media. One option is to embed it directly in the Flash file itself. You can choose that and then easily place the video directly on a timeline in a MovieClip. It doesn't get much easier.
Just be sure when you import your media that you do NOT to use the 'external' option which converts the media to external files and then uses FLVPlayback to load them. Use the embed option.
The only reason I'm even suggesting that is because clearly you're supplying this on a CD or USB so people won't need to worry about downloading a large file, or preloading.
Copy link to clipboard
Copied
Ok, i guess AIR is an option, i have never used it so i asume it will mean a few days reading technotes and asking noobish questions
before something usefull would come outa it for me..
The timeline Embed is ok for small/short files, mine are 5-13 mins in 744x418px HD, and they lose Sync
after around 1-2 min. that way (which is not cool since they are vids from concerts/people playing classical instruments)
size is not an issue, it is 800mb already
Copy link to clipboard
Copied
Ouch. You can take AIR for a test drive. It doesn't produce a clean single executable like a projector or Zinc however, it has a folder structure and an executable in there. Just be aware of that if you do any autorun.inf work.
I highly doubt the difference between AIR and Zinc are going to matter to you. I like having built in Windows registry editors and Zinc 3's Win32 COM support, which AIR definitely doesn't do, but I don't think you need anything advanced. At most you might have wanted to use the OS video player (media player instance) for .wmv videos, but you might as well bite the bullet and go MP4 / AIR.
Feel free to post any questions. Note that unlike Zinc, AIR is fine with relative paths, but also has its own filesystem class that's a little odd at first. To get a handle on the full path to your videos it would be something like this in AIR:
import flash.filesystem.File;
var vid:File = File.applicationDirectory.resolve('source/vid1.mp4');
trace('Path to file: ' + vid.nativePath);
// play with FLVPlayback
flvPB.play(vid.nativePath);
The File class has some helpers that can locate OS paths for you agnostic of the actual OS itself. File.applicationDirectory is the path your executable is running from, same as mdm.Application.path. There are other useful paths, like the users Desktop (File.desktopDirectory), Documents (File.documentsDirectory), a special application storage folder (File.applicationStorageDirectory), etc. Check the class out here:
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/filesystem/File.html
You use the resolve() method of File to generate the actual physical path on that OS to the file. As you'll see if you run that trace it will say something like (Windows): c:\Users\yourusername\Desktop\yourappfolder\sources\vid1.mp4
All you have to do to use AIR is switch Flash's target from Flash Player to AIR for Desktop. You may want to use the application signing certificate (it will prompt you for it and give you a ways to basically 1-button push generate one). As long as you use the "Captive Runtime" export, your users will not need AIR installed. It comes with it.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now