Actionscript 3 :: Can't Access Media Assets In An SWC
Feb 19, 2011
I'm having trouble accessing content in an SWC. The main project compiles without error, but the assets (sound, music) aren't displayed or played.
My workflow:
i. Using Flash CS5
1. Create MAsset.fla
2. Import sounds, art
3. Assign class names, check export in frame 1
4a. Write out the classes in the actions panel in frame 1
4b. OR. Add a document class and write out the classes there
5. Export SWC. Filesize is similar to what it is when I directly import assets in the main project library.
6. Create Project.fla and document class Project.as
7. Import SWC into main project through the Actionscript panel.
8. Add code, which calls the class names from the SWC (e.g. DCL_UI_MOUSE)
9. Compile.
No compiler errors, but nothing doing. And the resulting SWF filesize doesn't reflect anything more than the compiled code from the main project.
Regarding step 4, if I just write the class name in the root timeline or document class, the compiler error will go away and the asset appear to be compiled in the SWC. But I have also tried:
var asset0000:DCL_UI_MOUSE;
And:
var asset0000:DCL_UI_MOUSE = new DCL_UI_MOUSE();
Regardless the assets don't make it into the final SWF.
I've created an fla whose document class imports some static functions. The library also has some linked symbols (should they also be imported in the doc class?). I exported the fla as an swc, and tried using it in a new project. Whats the right way to reference this? And do i need to import the swc into this new fla to use them?
I want an air application to be able to update the assets it uses, but minimizing the download needed, so only downloading files added since it last updated.I'm thinking this would include a server portion which would zip the needed files based on a version number? Has anyone implemented anything similar / got any thoughts on the best approach to building this sort of system?
I'm creating library swfs in as3 this way, works like a charm (except for the slow mxmlc compiler):
package { import flash.display.Sprite; public class Library extends Sprite {[code]....
I would like to create the same kind of libary using swfmill. I've tried the following swmfill simple xml:
<movie version="10">
Examining the libraries in FlashDeveloper's explorer reveals that the as3 library exports BOTH classes and symbols, but the swfmill library exports ONLY symbols.My host application is accessing the as3 library assets this way:
private var loader:Loader = new Loader(); private function onCreationComplete():void { this.loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onComplete);[code]....
But with no exported swfmill classes, there's obviously nothing to instatiate...Is swfmill expected to export classes this way? If not,is there a way of accessing the symbols without instantiating them as classes?
As titled, what is the way to record video/audio files using Flash Meida Server through rmtp, and allow users to access the recorded files through http?What I am trying to do, is to record a user's microphone's input and save it to the server.fterwards, I would like other users to be able to access the recorded files and mainuplating the audio data, by computeSpectrum(), to do some visualization of the audio. As I know computeSpectrum() cannot work on streaming files, so I think I need to access the recorded files using http instead of rmtp. Is that true?
i'm trying to use this code but i can't to access to function nc.onFCSubscribe. how can i do it? someone know about that?¿ the original site of the code is http://www.flashcomguru.com/index.cfm/2009/8/14/flvplayback-obtain-nc- reference
// listen to player events and kill manual connection once we're streaming player.addEventListener("playing", playListener); player.addEventListener("stateChange", stateListener); player.addEventListener("ready", readyListener); /* this is the hack: check once every frame if the NC has been defined inside the FLVPlayback component */ this.onEnterFrame = function()
1.How do I connect to the Admin Console through a static ip remotely as I will not have access to the machine locally?
2.I want to stream live audio and do audio on demand, how do I do this?3.How to I embed a music player in a webpage that can stream live audio or the audio on demand?
[URL] that one day it can be played directly by html5's video tag:<video src="rtp://myserver.com/path/to/stream"> Your browser does not support the VIDEO tag and/or RTP streams.</video>Does FMS support this kind of url?
We just installed our FMIS on Amazon services (EC2) and cannot log into the admin console. The server is running fine and we can resolve the web interface. Is there any configuration of ports or additional user accounts other than the install credentials (root/XXXXXXX).?
Ive been able to setup FMS 4.5 and stream RTMP videos locally from a webcam stream but if i try to access it remotely i cant get a connection. Ive forwarded port 1935 through to my local IP from my router but still no connection, what do i need to configure on the servers end to tell it that its behind an NAT etc. Do i just add the public ip to the hostname line in the fms.ini, or is there more i need to do too? Do i log into the admin panel and change the server name from localhost to my public IP
I've shoved an array in a RSO serverside and now i need to update values in the RSO client side ...I tried the following but it doesn't work...I'm using actionscript 3.0
I have a very specific problem. I need to load certain images that my php script creates, and acts as proxy to some apis, into a Flash client (application) however I cannot use direct calls to HTTP server because I'm not allowed to use allowscriptaccess=true. So I've been using FMS for some aspects of my application such as live video and audio and SharedObjects.
I know I can write scripts to load and parse XML files on the server side so that shouldn't be a problem to get, however I'm stuck on loading in images going through FMIS.
When I test my video recording and chatting application using SharedObjects, everything works fine even if allowscriptaccess=false, but none of my images will load (naturally since the script access is limited). I know that some sites disallow scriptaccess parameter in Flash embed code so I would want everything to go through FMIS.
I have read some suggestions that I could try to load files directly from server-side on FMIS as binary and try to pass that to the client and let Flash generate the image with ByteArray but I wouldn't try to lose time if it's not possible or will stumble upon problems.
Does anyone have any ideas whether or not FMIS can serve images direclty through RTMP (which would save me some headache) beacuse I could load XML info from server-side and when I get the link to image use RTMP to load the image, but I'm unsure if this is possible at all.
I want to publish camera over FMS. But I don't want to use adobe security panel to be displayed(not even once) with setting as "access" by default.I wan't to set it allowed programatically.
I can stream files in the root of a NAS drive (/nas_dir), but not in any of the sub folders (/nas_dir/sub/). FMS has read/write permission to all the files on the NAS but all i get is "stream not found" when I access anything in the sub folders (streams play fine from the root of the NAS) FMS is running on rh5.4
My FMS client is calling a function (simplified) which gets the offset time in milliseconds of an flv file.According to the docs for creationTime, it should return a Date object containing the time the file was created.I cannot access any properties of the date object in the server script.
Client.prototype.listFiles = function( folderName ) { var testFile = new File('/streams/folder/fileName.flv'); trace("creationTime: " + testFile.creationTime);
I have vod files that need to be restricted to only the IP range of the ISP service. The live streaming can be available to all, how do I restrict vod access in the FMS Interactive Server, is it in the following?Virtual host on Interactive Sever:
[URL]
Would I edit these files for that restriction, how do I put the IP range in format wise?
is it possible to extend the access.log file? I want to pass user information via the connect method to the application and want to include this data in the access.log file.
I want to add some custom string into the FMS log file. If I am playing a video and I want to append some string every time when that video is played, which is in some way useful to me in analyzing FMS log, then is there anything provided or some function in which we can just pass the string as an input argument that appends it at appropriate place in the log file.
I have installed fms 4 in windows 7 in my computer, but i cant get it work with a flex application that i have in a server. I added the port in my router's settings
Any way to set up individual Flash Access protection settings for each of some <Location /{url-path}> tags in httpd.conf in the Apache. I have found in the documentation that EncryptionScope can be set to content or server. If I set it to server and use FlashAccessV2 as ProtectionScheme, how or where do I specify the Flash Access certifications and so on?
I have this set of codes for a simple chat program using SharedObjects. When I run the program, I type my name into the 'chatName' box and my message in the 'textInput'box. However when click on the 'Send' button or press the Enter key, I am getting the following error:
" TypeError: Error #1009: Cannot access a property or method of a null object reference. at TextChat/sendMsg() "
As mentioned in the error message I looked at the 'sendMsg()' function. I realised the problem was comming from the line :
I am wondering how 'text_so' can be a null object reference. It was already instantantiated and setup earlier in the code. I hope someone can shed light on this. The relevant lines of code are below.
i use the code below to publish my cam, and i can play it in the same application. Then i copy and renamer it videoPlayer2.as then i use displayPlaybackVideo(); method but it says "TypeError: Error #1009: Cannot access a property or method of a null object reference.". How can i get the published live video from another app.
We have an application that works no problems on our server with FMS in test mode. As soon as we enter our FMS license key we get this error: "application is not a valid signed application loading access denied".We removed the license key and it works again, but with user limits obviously, so this is not an acceptable fix.
If I set EncryptionScope to "server" in httpd.conf (<fms>/Apache2.2/conf/httpd.conf) how or where do I specify the certificates for flash access if I want to use "ProtectionScheme FlashAccessV2".
Some users are unable to access any of our video content, getting a Server Not Found error.We have our FMS configured to use ports 1935, 433, 80. Our firewall is allowing RTMP traffic to each of these ports. Is there something more I can do from my end to make sure users can access our FMS?
I've had FMS running on my local machine for a while and have had a little experience writing FMS apps, but I've just tried recording audio for the first time using the standard vod application and I keep getting a "Write access denied for stream" error. My AS3 code is copied and pasted for various examples and am confident that it works.
I'm running Windows XP service pack 3 & FMIS 3.5.
I've had a look at the vod/media directory and under windows->properties the read-only attribute is ticked. Every time I un-tick this it reverts back to being ticked. I've googled this and MS say that most programs ignore the read-only attribute and that it only really applied to files. I've also tried the MS fix for setting the read-only attribute via cmd and still no joy (doesn't fix read-only attribute or FMS recording the audio after setting via cmd).
I've also tried our dev server install of FMS (running under linux) and am getting the same results.
Here's my AS3 code...
private function initApp(event:Event):void { removeEventListener(Event.ADDED_TO_STAGE,initApp);
I must rejected all users outside Denmark from our live streaming (c-ip) and this is done in an access plug-insBut now I need to open up one of the streams, but I can't get the streaming name in the access-plug-ins only in the Auth-plug-ins.I cant use x-page-url or s-uri I need pStreamName. in access-plug-in like thissetStringField(m_pAev, IFmsAuthEvent::F_STREAM_NAME, pStreamName);but I cant get it inside the access-plug-in
I have recently installed FMIS 3.5.3. In checking the access logs I find data in both logs that display the same stream stop and stream play time .I'm not sure why the time is the same (00:19:27 example below). Videos play fine when testing from work (T3 connection). However, occasionally a very slight hesitation when playing video from home (I have cable connection). [code]...
Is there any way to access a Flash Media Server server-side script through a C++ plugin? I know you can call server-side functions, but I want to use the plugin to do image processing, so I need to get bitmap data from the client to the plugin. I've been poring over the documentation and the forums and there doesn't seem to be any way for the plugin to communcate with the server other than to read Event properties. If this is the only way for the plugin to recieve data from the server, is there any way to override an event property to send custom data?