I'm trying to implement way so that stylesheets can be loaded on demand: Either the default stylesheet is used, which is compiled into the application file, or a remote stylesheet (.swf) is loaded if the default styles should not be used. (each stylesheet has embedded images)
So what I would like to do is: 1) Embed the stylesheet but not load it right away. Instead, store a reference to it inside a variable. (or simply a path string?) 2) Load the requested stylesheet, for example using StyleManager
My way of tackling the problem was like this: 1) Embed the default stylesheet as Code: [Embed(source="assets/themes/default.theme.swf")] _defaultThemeClass:Class; and turn it into a StyleSheet object
2) Have a separate class decide which stylesheet to use and call StyleManager.loadStyleDeclaration(myStyle), where myStyle can either be the remote or local stylesheet. As it seems, the StyleManager cannot load a local stylesheet. So I'm looking for a way to "activate" the style I have embedded.
I inherited a flash application at work that is basically a bunch of symbols with actionscript inside each of them. There is also an external actionscript file that serves as the application controller, with much of the application logic in various frames of Scene 1. Some of the symbols are supposed to play a sound file on mouse over, which they do just fine, but when I try to get the global sound volume from the controller:
E.g. ActionScript Code: var bVolume:Number = controller.getGlobalVolume();
It doesn't work because it doesn't recognize the controller object. This is strange because the controller is called all throughout the project, but it is not seen within symbols.
I have an SWF that's 30MB. Sound files (music) make up 25MB, art and other things make up the remaining 5MB.
Would it be possible for me to load the 5MB of necessary art and other things first to allow the user to operate the app, then after that's all loaded and they are operating the app, load the remaining 25MB of sound files in the background?
UPDATE: Loading SWF (or other entities) externally is not an option.
keep in mind I normally use pure as3 and FlashDevelop :)I am really new to this "working with Adobe Flash Professional" thing and I am working with an artist that basically put all the art in a .fla file.I am a veteran pure as3 programmer and I never tried to work with a Fla file(or Flash Pro). I want to work the right easy way and use my classes with the fla to load assets directly.I've tried to find a comprehensive tutorial but had no such luck.Basically I have a bunch of working pure AS3 code in FlashDevelop and a bunch of art assets saved into one .fla file. And my goal is to rasterize (turn into bitmapData) the art assets so I can blit (copyPixel) them whenever I need quickly for good gaming performance.This is a project I am doing to help a friend and I don't have much time to research this by myself so simply pointing me in the right direction to an easy to follow tutorial would be a great start.I tried to read and understand the in-house wiki for FlashDevelop and the instructions there were not clear as far as using Flash Pro 5.5 in conjunction with FlashDevelop.
I've created a few symbols (movie clips) in my library. They are basically "panels" for user input etc. I've sized them carefully and do my best to have them stay within a 320x240 size. But when I load them they come in with larger width and height dimensions...as if there are some objects/symbols/graphics that are invisible or something.
This happens with EVERY library movieclip i've created.
I have Main.fla and SkinA.fla. Both have MovieClip library item: MC_BrandLogo.I'm loading the SkinA.swf into Main.swf in the current application domain trying to replace the class inside Main.swf. If there is no library item in the Main.fla, I can instantiate MC_BrandLogo with the correct graphic. If the MC_BrandLogo already exist in the Main.fla then that graphic is used even though I loaded new one in the current application domain.Is there a way to replace existing linked movie clips with loaded dynamically?
var loader:Loader = new Loader(); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onSkinLoaded); var context:LoaderContext = new LoaderContext(false, ApplicationDomain.currentDomain);
when you have a document class for something, how do you load the symbols?lets say you have a gallery and a few buttons for it, and you will load that gallery swf into main site.is it better to leave these symbols on the stage or load them from the library or something else?
I used this tut to create a menu. [URL] And my question is; Can I make the slider to move after a movie clip symbols instead of button symbols? That way my menu would be animated.
I'm working through a book called Foundation Game Design with Flash, and I'm finding the Flash IDE confusing. I've been programming for several years, so working with AS3 directly is far easier than trying to understand symbols and nested symbols and the difference between graphics and movie clips and scoping issues and all that -- when tied into the IDE.
How many of you who are making games in AS3 also use the Flash IDE? Can anyone recommend a resource that is AS3 heavy and Flash IDE light? I don't care how much time I may or may not save by using things like the timeline, I just want to understand what I'm using.
I'm attempting to use CS4 (PC/Vista, if that matters) to create a SWF file that will basically act as a "library" of commonly used symbols. This SWF would be loaded at runtime by other SWFs, which could then use the symbols within it, including all art and code assets.
I created an AS3 preloader, and placed the code for that on frame one. I then made a symbol, and placed it in the library. It was set to NOT export on frame 1, and the fla's settings had all classes exported on frame two. There were no references to the object until frame two. Then, flash crashed whenever I compiled without the "Export in frame one" box checked. To fix this, a friend suggested I start my game logic on frame 3, so it will have properly loaded frame 2. That seemed to work fine, the class was instantiating properly. Then, it turned out that it was not loading the movieclip, only instantiating the class. Again, this could be fixed by exporting in frame 1, but I really cannot afford to do that.
The same friend suggested I place an instance of the symbol on the stage on frame 3, and perform game logic on frame 4. They said this would initialize the movieclip properly. However, this was not the case. How can I load the entire symbol, graphics and all, without exporting to frame 1? This single symbol will contain probably 10-20 MB of graphics, so it needs to be preloaded. EDIT: To make a long story short, all I need is some way to load a movieclip so it can be used and visible and everything. EDIT: Is there any way to force-load a movieclip via AS3?
I'm trying to load sound dynamically into a clip and then play it randomly. The AS I came up with works great if the sound is embedded and I use the .attachSound() method instead of loadSound(). Now, when I load it dynamically and use the code below, the sound plays very fast and at a higher pitch.
Code: var crows = new Sound(this); crows.loadSound("Raven.mp3", false); crows.setVolume(100);
I am loading small sounds dynamically with the loadSound command. These small sounds are activated with a rollover. see script below. This works ok. however. i want the first sound to keep playing while the rollovers load sound. a bit like playing the piano. This works ok when i import all the sounds into the library and place them on their very own button. however the size of the flash movie increases to 140k. whereas when i load them dynamically the size of the movie is 20k. obviously i want to load dynamically.
But with dynamic loading each sound stops when another sound is rolled over, so that there is only ever one sound playing at once. I need to load the sound into a different level or something, so that the first sound can keep going while the smaller, shorter sounds play over the top. this is my script below. The first sound loads when the movie starts. This is the one i want to keep playing. Then there are the smaller ones with rollovers. does this make any sense? there's actually 13 little sounds.
I am looking to develop a simple flash progrma that allows me to create custom slide shows on the fly. I have about 8 different countries that i have photos for and I want to have a front page that via checkboxes you can select the countries to view which will then populate a slideshow/gallery with the relevant photos.
I have a project where I load a bunch of images into a scroll pane object. There are only 4 visible at a time, and there may be hundreds. The user can change the dates of the images, delete images and the like. Each action calls web services to enact the function in the database, so reloading is required after each user action. As a result, when there are more than, say, 20 images, it is a SLOW application. What's the best way to only load a certain number of images, say 12 - until they are actually needed? So basically only load the images that would be visible in the scroll pane at any given point? So if they wanted to scroll way to the bottom and see the last 10 images, we never need to load the 200 images in the middle.
what to search for on the internet for an example. "progressive" only gives me info on jpgs...!
At the moment i am using vlc to transcode my video realtime and display the output through Flowplayer.The problem is that I am struggling to seek using flowplayer my time gets out of sync between the stream and flowplayer and there are a few other issues.Are there any streaming servers that allow for real time transcoding and allow for a flash player to seek.
i'm having problems trying to play FLV videos on demand from Flash Media Server 3.0.1.
Sometimes the video doesn't show at all, sometimes it plays the audio only, and sometimes it works perfectly...i can't figure out why.
Videos are into the applications/vod/media folder, i'm using a MediaDisplay object to load them, and i've exported the SWF as a Flash Player 7 AS2 application.
Code: Select all // m is the mediadisplay object m.setBufferTime(10); // file will be passed as parameter
[Code]....
as you see, the server is in my local network, but i've tried with a public remote server too, with the same results.
I wanna do some slide show, getting some seconds of some MPGs , is it possible to do that My ideia is, create a XML files containing the names and the paths of the MPEGs, and at each 10 seconds, change the file.
I have a basic video on demand app running on Flash Media Interactive 3.5. I've noticed that in our flowplayer page, in order to view the contents I have to set the netconnectionurl to be the address to the app, and then the file name url needs to contain the rest of the path. For Example: NetConnectionURL: rtmp://myserver.edu/appname/ Url: path/to/file/many/folders/deep/video.mp4
However - I have accessed the same file from a different server using the following: NetConnectionURL: rtmp://myserver.edu/appname/path/to/file/many/folders/deep/ Url: video.mp4 What type of VOD application or settings need to be configure to allow the later example to work?
We've purchased the FMS 4.5 and are now planning an application that lets users record a video to the server using their webcam. Straight forward, if we were to stream only to a flash video object. BUT, we would like our padders to be able to see the videos on demand too. Can't find a tutorial on this, seems like everyone's more interested in live streams.The server is able to record a stream in mp4, but when I'm testing these files in Adobe Media Player it won't play :| What codec is used, and is it possible to play this format on an iPad? If not, is there som sort of solution other than manually transcode to the right format.
I have a component and I add some content to it making it change it's size, immediately I need it's new size, but flex only updates the size in the next frame by calling updateDisplayList. how can I force it to update the size of the component right away.
Being a code purist, I always set Flash to demand that I declare all variables/functions with a type. Like this:var myVar1:int = 14; //Okvar myVar2 = 18; //Compiler ERRORMy problem is that I just reinstalled my computer (including Flash) but I've forgotten where I do this setting. Anyone here with a better memory than me?
In order to play a FMS stream (live or on demand), either an FLVPlayback component or the Video class is needed.And they require ActionScript 3 and Flash 8 or above.
As far as i know , Youtube, Dailymotion and Google Video stream their on demand videos from a FMS, and their players are compatible with Flash 7.
How can they achieve this? If Youtube, Google and Dailymotion do that, i deduce it's possible..
I tried to create a Flash 7 application that plays a video coming from FMS, using a MediaDisplay component, but it doesn't work well. Sometimes it shows the video, sometimes not.So i don't think youtube player uses MediaDisplay..
I have an mxml pie chart, which I would like to rotate slowly prior to a button click, however on click it needs to stop immediately (or at least reasonably quickly) and then the callout labels are introduced with a fade.
I have experiemented with both a timer function to achieve this:
I have a ERROR message is Code: ArgumentError: Error #2126: NetConnection object must be connected. at flash.net::NetStream/ctor() at flash.net::NetStream() at videoplayer1_fla::MainTimeline/initVideoPlayer() at videoplayer1_fla::MainTimeline/frame1()
Below code is xml playlist included. Buti want to play videos through "rtmp host". My On-demand Video Player Code ActionScript Code: // #### VARIABLES // net connection object for net stream var ncConnection:NetConnection; // net stream object var nsStream:NetStream; [Code] .....