Is there any way to use my xml data without using externall xml file? Normally, when I export my fla to swf I have to have xml file in the same folder. My project needs to be in one file. Can I paste xml data into some class and somehow use it?
I have a main Flash movie that preloads three external SWF's just perfectly.Everything is great...except the 1st movie is not smooth and really slow, the 2nd movie is a little better, and the third movie is the best.It's a rather simple Flash portfolio...I'm thinking it could be a stacking issue-but I've approached it from so many different ways instead of wasting my time shooting at thin air, I thought I'd give this forum a shot.How can I make these three movies play smoothly?I've attached the main movies FLA just to assist.
In one of my project, I will load a swf after a button click. I use Loader and try to access the document class by Loader.content as Movieclip. But I find if the target swf contains TLF and if you set the publish property to RSL instead of "merge into code", the content of Loader will be set to some "__Preloader__".
I am publishing and AIR 1.5 application from Flash CS4 on Mac OS X. I add a list of files to include in the Installer Settings>Included Files box. Sometimes when I publish or click "OK", the included files listing is not saved except for app swf and xml listings. This means I have to select all the files again. This does work sometimes, the files list is saved, but other times, not. It doesn't require opening and closing the Flash app, just opening and closing the dialog for it to fail to retain the list.
My priority is to have a fullscreen (standard size) 1024x768 H264 video played on an ipad app compiled with flash CS5.5 AIR for iOS using the StageWebView class. This works perfectly fine. Although with no official way to communicate with the StageWebView, I can't 'remove' the video once it's done playing. Enter StageWebViewBridge which enables AS <=> JS communication.
I'm trying to get around the overall poor performance of the Video class on the iPad (1 or 2). Playing the video inside a StageWebView loading a html5 object works amazingly great (read: GPU hardware decoded h264).I do need to shut the video off after it's done playing in the StageWebView. I am packaging a .mov file encoded in H264 that plays great in webkit browsers. If I just load a webpage in the StageWebView with a tag pointing to any video file it plays perfectly fine.
Once I introduce StageWebViewBridge it changes. They want files put in a /html folder. I'm sending paths of all kinds for the players src to play and no video ever loads. The video is named 'a.mov'. I tried player.src = 'a.mov', or player.src = 'html/a.mov', or player.src = './html/a.mov' or even using the File class to get the File.applicationDirectory and resolve the file to the .nativePath. No matter what I send from AS to the JS in the StageWebView page, I cannot get it to load the video.
how to reference embedded files? I'd like to send the file to load from AS to JS and have JS reset the .src property of a html5 element. Even the File.applicationDirectory reference I make states the file 'exists', but I can never set the .src property of the element on the page. It doesn't seem to understand.
Let's say i got Movie A, which loads Movie B at some moment. And let's say that Movie B creates a sound, lets say:
var sndMusic = new Sound(); and then attaches it... sndMusic.attachSound("music");
[Code]....
well, when i open Movie B alone, the music plays; when I watch it while being included in Movie A, it doesn't... BUT the sounds that are simply added by dragging and dropping on a keyframe DO work on both cases. I believe it's sth related to attachSound...
I understand the basics of OOP and classes, but I can't seem to find an answer to something between classes and static functions.
For instance, what if I have a Game.as class that's 1,500 lines long and I want to yank out groups of functions into external files (such as Scrolling.as or DepthManager.as)? Classes don't seem quite right, since I'm dealing mainly with the Game class variables, not separate entities. And putting one function per file would create so many dang files it's arguably worse.
So is there a way to do something like the old #include directive that will tell my Game.as class to just insert the contents of certain files into the middle of the Game.as class so I don't have to monkey with MovieClip(parents) and debugging the theoretical paths of null-object errors?
I'm guessing they took away #include for a reason, but I'm going to wear out my scroll wheel if I don't find a solution soon...
I am building an application where I want to be able to tab through some custom buttons (sprites with mouse event handlers). This is working in the main UI, but when I load an external swf with a button in it, the button does not get included in the tab loop. I can give the button focus via the arrow keys, but not with tab.
I import a class file with path: "src.Objects.Thing" . Later in the code I try to call getDefinitionByName("Thing"). Unfortunately, I get: "1065: Variable Thing is not defined".The way I fixed this was by writing: getDefinitionByName("src.Objects.Thing"). However, this seems like a cumbersome solution. I would really like to be able to exclude the path when calling getDefinitionByName.
At my job I frequently have to create Flash banners for major newspaper's websites. The specs that usually come in require a max file size of 30k or so. Usually my art department will hand me 3 or 4 screens that they want to simply move through in a loop. No biggie, until they start adding images to the files.
When I complain to them that the images are making the file sizes too big I am usually queried as to how other advertisers on these sites have full video in their ads. I understand that there are pre-loaders as well as allowed larger file sizes if you pay more for the ads.
getting image sizes down in Flash so that the images don't end up looking horrible?
I've got a problem headaching me all afternoon long: Inside an SWF I want to load an external SWF inside an empty movieclip. On that frame I've got: emptymovieclip.loadMovie("external.swf"); Inside the external SWF I've got a Preloader on the first frame consisting of a movieclip of 128frames. I'd like to appear from the first frame to the 128th related to loading percentage. When loaded it must go to fram 2 and this is the script on the movieclip:
I am using Flex Builder for an Actionscript which apparently has a dependency on IMXML object. I'd never heard of this object, and there is nothing on the project site about any dependencies. I assume it's a Flex component library, though. Which library should I include in order for this program to resolve its dependency issues?
My problem is the following:I've been working with Flash CS4, and have written a script which creates a dynamic menu based on an array variable. The array variable needs to be located in a separate .as file so that I can use a bash script to create the array on the fly, based on files found in a specific folder. It's taken me weeks of writing both the bash and actionscript to make everything work smoothly. Everything works except for one small thing: when I update the file containing the array, the menu in the .swf fails to update with it. In order to update the menu, I'm forced to re-publish from within Flash itself.
Previously I had used the "include" function to place the array within my script, but I then tried bringing it in with a package as a global variable. Neither method worked. It seems that the file is included during the publishing (that's probably common knowledge). So I'm wondering if there's a way to include the array, or build the array, in such a way that will allow the .swf to update with a simple refresh of the web page.
if i have a row of mc (8) on a line that i want this script to work for do i need to have this script written out for (8) mc's or, on the root timeline? also for more than one mc, am i just changing (this) to what ever the name of the mc is? also instead of mc's will this script also work for buttons? or do i need to just put a hidden button over the top of this mc?
To rephrase my question: if you have a class with a bunch of static methods and you use one of them in your code, does the whole class get compiled with your movie? I suspect that it would be and, if that's the case, wouldn't it be better (from a file-size perspective) to use packaged functions instead?
I am trying to center align a caption for a Photo Gallery.But by default the captions are aligning to Paragraph Left.You can view the link here:
Photo Gallery
-------------------------------------------------
Here is the text format code from the accompanying *.as file: ------------------------------------------------- var tf:TextFormat=new TextFormat(); tf.font='Verdana'; tf.color=0x3; tf.align=TextFormatAlign.CENTER; var t:TextField=new TextField(); t.embedFonts=true; t.alpha=0; t.selectable=false; t.setTextFormat(tf); addChild(t);
-----------------------------------------------
To have an idea i also included the source file *.as files.
I can't seem to figure out why, but the label on my ColumnSeries always seems to get truncated regardless of how wide the column is. I've tried setting the labelSizeLimit to an arbitrarily large number, but that doesn't seem to help
I am having trouble opening a file in the assets folder in my flex mobile application
var myFile:File = File.applicationStorageDirectory. ("@Embed('assets/file.txt')"); var myFileStream:FileStream = new FileStream(); myFileStream.addEventListener(Event.COMPLETE, glossaryFileOpened);
I purchased template and trying to edit it, there is page called portfolio i managed to make it load images from external files, but when trying to do same for text description no success. I tried different techniques i found online, but none work, only work when i place textbox on main scene but never works when i place it on Portfolio page 3 (click portfolio button then click page 3) to go there in flash find "scroll2_4" page trough library right click and chose edit. I need to load description from text for items on that page. I really desperate now after many hours of failure. url to download fla file i working with is here [URL] i edited it to delete everything thats unrelated to question. Also secondary optional question how i create more pages like page 4, 5 etc?
I have uploaded a ZIP file that includes the following files:
- main.fla
- child.fla
You can download to review my code (very small 16kb): http:[url]...........This simple example has a main SWF file that loads a child SWF using the dynamic loader method. Below is the code in the main.fla file:
Code: Select all/* MAIN SW */ import flash.net.URLRequest;[code]........
how do I get both parent and child SWFs to communicate with each other dynamically (to be able to call functions from each other, or pass variables)?
I have two remaining tasks on this file, in order to be done.
1. When I mouse over the main top nav, I need the boxes to have some easement added to them so that they don't just shooot straight up. I also need them to stay up when clicked until I select another button. They kind of do this now, but they tend to get stuck in the up position until I mouse over the other buttons again.
2. This file loads a remote, XML based, gallery that looks very much like the one offered in this sites tutorials. Since the tutorial already has the variable i, which keeps track of how many total objects are being viewed on this application, is there any way to have that also include i number of boxes between my previous and next buttons which can also act as navigation for the gallery?
Here are the swf's: Main nav with fun boxes: SWF_porfolio.fla XML Gallery Nav wanting fun boxes: SWF_identitiy.fla and for fun Identity XML file: images.xml
Does anyone know where I can find AS3 cmpatible replacements for the AS2 components that are included with Flash? I'm especially interested in replacements for Window and Accordion. Why did Adobe leave them out?
I wanted to use the included video player from Flash media server but can't find a list of variables and values to pass to the player. Is there a list and could anyone point me in the right direction? I'm specifically looking to pass a stream name for a live stream to the video player.
Created a runtime bone animation (more complicated than the one included in this example).When I loaded the swf using the Loader class in master application, the runtime animation stopped working.I included my source files for the bones, and another fla that only calls the Document class Main.as.Try running bonesRuntime.html, and the runtime bones work; call bonesSwfLoader.html and only the authortime bones work.