ActionScript 3.0 :: Loading A Swf Partially?
Sep 21, 2010Just wondering is there any way to stop the Flash Player loading at specific points within the swf file?
View 1 RepliesJust wondering is there any way to stop the Flash Player loading at specific points within the swf file?
View 1 RepliesI have a large ON2 VP6 encoded FLV video (334 MB, 75 minutes) hosted on the web and being played back using a basic Flash movie player:
[URL]
Many people are having problems getting the entire video to load. The loading progress bar will increase quite quickly at first, but then it will either slow down to a crawl or will stop completely. If the progress bar stops increasing before the video has fully loaded, it will not continue no matter how long you wait. Reloading the page does help.
Is this likely to be a problem with the FLV file, the Flash player or is it more likely to be a problem with our web host?
On the interactive section of my page here: [URL]. I have a bunch of externally loaded swf files that are supposed to load into the black square in the middle. As you can see, some of the swfs partially load, just the text for most, and then some don't. If you click another section then click back, it loads fine and you can see what it's supposed to look like. This doesn't make much sense to me, considering the swf files are done on a single frame, with the text just a layer below the image. So why does a portion of the swf load but the other doesn't and why do some and not others? I have the swfs loading using loadMovie. (Example below):
Code:
container.loadMovie("movieclipname.swf");
container2.loadMovie("movieclipname2.swf");
container3.loadMovie("movieclipname3.swf");
container4.loadMovie("movieclipname4.swf");
This works perfectly with every other site I've done, and I've used that same setup many times on this site. Yet for whatever reason. It doesn't work regularly.
How do I manage that, while the movie starts, some parts of the Display List are "hold in the backhand" and get loaded when I decide that they should.Can I only do that via external SWF-Files? Further question: Is it possible to stream the files, by calculating the download speed and starting the movie when I want it to do, or is Flash doing that automatically
View 4 RepliesI have a multi SWF movie that uses AS2 and is behaving differently in different browsers.The basic scenario is this . There is a root movie that acts as a control panel for user input. 1. It loads then parses some xml to determine how the interface should look (what images, radio buttons, etc. to display) 2. Then it loads and positions items on the stage ( rbs, thumbnails) 3. It loads child swfs
When the issue occurs step 2 is only partially completed and step 3 doesn't occur. No message about script error appears.
[Code]...
Is there any way to play my partially loaded flash movie while loading is still in progress ?like progressive video download.My app is not video based.I have only animations and interactive coding.
View 1 RepliesI have an application swf that loads a big external swf with all GUI components/assets (skin) in it.I want to display a progress bar during loading of the external asset swf file but the images for the progress bar are also included in the external swf file.Is it possible to load only a portion of the external swf before loading the rest. The idea is to load the progress bar images from the external swf, then construct the progress bar and than load the rest of the swf. I was thinking to put it on different frames. Frame 1 containing the progress bar graphics and frame 2 the rest of the assets.
View 3 RepliesI'm having trouble with my site [URL] As you may see, the animation is often all mixed up: the buttons do not take the user to the proper frame, the frames and buttons do not display or just partially... Sometimes everything goes back to normal when I empty the cache and/or refresh the page and click repeatedly on random buttons, but not always, and not for long. I don't know, it just happens somehow randomly, especially when I upload the swf file again to update the site. I understand it has something to do with the flash file itself and having to insert some code somewhere,
View 4 RepliesIf I changed used in one of my project sdk to current sdk4 beta, set breakpoint and stop on them every occurrences of mx.* packages are labeled "[no source]". Is known any trick to fix this issue?
View 1 RepliesMy sIFR 3 font replacement is working great in FF and IE except when I use it on a 'services' page that has an unrelated Flash object feature at the bottom. Only the first sIFR3'ed element shows up in IE on this page. I am also using jQuery 1.2.6 on this page to bring up random content. It is a windows xp pc.
In IE, the html on the 'services'page sIFR'ed elements has become garbled in the browser as I see when I view the source. Things like this: nodeIndex='1' and jQuery1307565945701='4' are added to the ul and li elements and should not be. The class 'sIFR-replaced' is not being added from sIFR like it is supposed to be.
The jQuery does not interfere with sIFR3 font replacement on my other pages because they don't have the extra Flash file on the bottom. The Flash file is a shockwave cab file, version 9,0,0,0 (that I did not add).I see this error in the console ' 'match(...).1' is null or not an object' but I got this same error elsewhere and it wasn't affecting anything.
I am implementing a charting tool for my project, which is very similar to Google's finance chart but much more tailored-made to meet different requirements. The charting interface is made up of the following core components:
Time selection panel: to change the time span of the chartMeasurement points panel: to select different points of measurementChart area: to display the measurement data of the selected measurement points over the selected time span
For example, the Apartment's power administrator can view the total power consumption in Unit 101 of Building A, in the Pacific Apartment's complex (a made-up name). Similarly, the administrator can also "stack" up charts of multiple measurement points, having an all-in-one view like below:
Only the chart is implemented in Flash/AS3, the other panels are JSP, JavaScript and Dojo. When an user clicks on a measurement point to add a chart to the chart area, the following things happen in order (briefly):
User clicks on a link (say, Total Amps)Dojo event listener attached to the link picks up the mouse click eventThe Dojo event listener calls an AS3 method (addChart) through the External Interface to add a chart to the Flash chart:The Flash chart picks up the method call, adds a chart to the stage and reposition all charts on the stage. Since the stage height is fixed at 600 pixels, each chart added will be fitted into the 600 pixels. Eg, 1 chart on the stage = 600 px/chart, 2 charts = 300 px/chart, 3 charts = 200 px/chart...etc.This is what the Flash chart looks like, when 3 charts have been added, before display the chart on the actually page (see below) Once a chart has been successfully added to the stage, Dojo will stretch the <div> tag that the chart resides so that each chart still "looks" like 400 pixels tall. For example, 3 charts on the stage means each chart is 200 pixels tall, but Dojo will stretch the entire <div> to 1200 pixels, making each chart look like 400 pixelsThe above step is the same concept as resizing the stage When an user adds more than 7 charts, the 8th chart will start have Flash contents disappeared. To be exact, I used firebug to increment the <div> height, and found that when height exceed 2924 (a magic number) pixels, Flash contents start to disappear. See below (the red-boxes indicate the missing contents)The situation gets worse when continue to add charts, eventually half of the bottom chart will disappear.
Some pre-work I have done:I have unit tested this component in standalone Flash movie, with 3 LCD monitors totalling 4000 pixels in height. I produced 10 charts in a single flash movie, and then resized the window from 600px to 4000px, no charts disappear. This happens in all of IE7, IE8, FF3+, and Chrome. Although slightly different manifestation, but they all have contents mysteriously disappeared. This also happens to GOOGLE's finance chart, when you enlarge the chart's <div> to over 10000 pxs (yet another magic number) The funny thing is, however, when a graph has been cut in half, the visible half is still operatable. For example, if the zoom window as been cut in half, I can still move it, zoom in and zoom out.
[code]...
when the program is run, the commands for up, down, and left, but right is completely ignored.
I have a movieclip that I'm using as a button- the rollover state is on frame two, the up state is on frame one and I used actionscript to apply the different actions. All of the actions work fine normally, but about 25% of the time only part of the button is active. The mouse doesn't change to the hand symbol and the rollover/release effects don't work on most of the button, just on a small band around the perimeter of the button. Its not like it happens every time and there doesn't seem to be any consistency in what causes it.
View 1 RepliesI have a couple of movies, one of them hiding partially the other one. I would like to detect when someone clicks on a movie. I know that this can be done easily by using the hitTestPoint function. The problem is when the user clicks on the intersections of these movies. In that case the hitTestPoint function says that the user is clicking both movies. But actually the user is clicking only one movie, because the other movie is partially hidden. How can I program this behavior in a natural way?
View 3 RepliesI have built a small program using AS 2.0 where you scroll through a list of products and click a button and it leads to a product video. EVERYTHING seems to be working except for the scrolling. I have a mask around the area of the categories and when you scroll down they dont scroll all the way. The categories scroll farther down then they do up and you cant click on the rest of the buttons. I feel like Im either missing something in my code or maybe made a mistake somewhere. (I'd like to post a sample but I can't seem to. It scrolls like an ipad screen.)
ActionScript Code:
stop();
container.setMask(mask_mc);
[code].....
I want to display a partially loaded image (as it loads), similarly to how images load on HTML pages.
View 1 RepliesI have a flash site (portfolio), and it uses buttons to load/remove different .swf file (it is an XML gallery that I did not write.) It works perfectly - the FIRST time I load/unload a .swf . . . however, every .swf file loaded after the first one comes in partially transparent (it normally fades in), but otherwise the .swf is fully functional. Each .swf has it's own unique name/images, but is otherwise identical to the original gallery. It doesn't matter which one I open first - the first one is always correct, the rest, not. Also, the degree of transparency varies randomly, but generally seems to hover somewhere around 1/2 way.
[code]...
I know that something in the XML gallery is causing this (switch to a completely different .swf and the transparency issues go away), but I also think that I am likely not unloading the .swf correctly and that some part of it is remaining in the memory and creating issues when it is used more than once.
I'm facing difficulties trying to drag and drop dynamic MC when their registration point go out of the stage.I'm using Tweener easing, and when this happens I get errors coming from Tweener and also from the stage.listeners..
View 2 RepliesI am drawing a rectangle at 0,0 with a line-style-thickness of 4px. It has height 100% and width 50%. The right-hand edge has a border 4px wide, but all 3 other sides are only 2px, suggesting the mid-point of the edge is classed as the border. Why isn't the edge drawn 'inside' the rectangle?
View 1 RepliesI have a flash file which loads data from JSON and parses it. It works fine expect on one machine (specs below). On that machine it loads an image URL specified in the JSON, but nothing else. I've tested with a other machines (Dell E6400, Apple MacBook Pro) and it works just fine in all browsers. I compared Windows Updates between the Dell E6400 and the Dell Optiplex 745 and they only differ by one update (KB2525694) which isn't applicable for my Dell E6400.
Machine Specs:
Dell Optiplex 745
Windows 7 SP1 64-Bit
IE9, Chrome, Firefox 4 & Safari
Flash 10.2.159.1 & 10.3.183.10
[code]....
On my stage I have a mc (videoLoader) with the mc (loadBar) inside it. When I preview the movie it shrinks loadBar to where it should, but it doesn't expand as the video loads.
ActionScript Code:
this.addEventListener(Event.ENTER_FRAME, loading);
function loading(e:Event):void[code].........
I click on the booking link and everyhing loads just fine, however, if I click on it again it only loads partially. Can anyone tell me why this is and how to resolve?
[Url]...
[Code]...
One of the swf files in my project is acting strangely.The file compiles perfectly, and is functional when running stand-alone.If I try to load it into the main swf in my project, the code stops executing just prior to the first for..
loop.To find out where the code was stopping, I placed a textfield on the stage named "stageText", and assigned different strings to it at various points in the flow of actionscript.It stops executing immediately after stageText.text = "init2";, and just before the first for..loop. (see comments in code)Why is the code stopping at the for loop?Why does it only happen when the file is loaded into another swf?
Code:
import gs.*;
import gs.easing.*;
var locationsXML:XML;
[code]....
Is there a way to hide partially shown text lines on a dynamic textfield that has more text than its size can hold? I want to avoid the situation found on the picture below by simply not showing the areas in red (the text comes from lots of sources, so I don't have control over it).
View 2 Repliesi have 2 sprites on stage. bottomSprite is added to the display list first, followed by topSprite. topSprite partially covers bottomSprite.i've added an event listener to bottomSprite for MouseEvent.MOUSE_MOVED notifications to simply trace the mouseX and mouseY coordinates. however, the notification doesn't work for the parts of bottomSprite that are covered by topSprite.
var bottomSprite:Sprite = new Sprite();
bottomSprite.graphics.beginFill(0x666666, 0.5);
bottomSprite.graphics.drawRect(150,150, 150, 150);
bottomSprite.graphics.endFill();
[code]....
I have typical situation where big loop is loading lots of images and its done asynchronous which make browser to frees during loading and I want to make it synchronous but having big trouble doing it. I found this class synchronous loader and it work great but you cant add mouse event listener to loader. Here is sample code:
[Code]...
I have a game built and I would like to reduce the loading time to the minimum possible.One of my ideas is to load the essential assets and some lower quality images the first time, leaving the higher quality images and some of the functionality out at first (for instance things like buttons that change the background color), and once the player enters the game, the rest of the functionality and its assets (images and sounds) will be loading in the background using the Loader class.So once the non-essential assets and the high quality images have loaded they will fade in and substitue the lower quality assets in the most subtle way possible.
Also... Would it be better to have various instances of a "Loader" class and try to load everything at once, or load stuff in order with a single instance of the "loader" class listening to the Event.COMPLETE event ?
I have a movieclip clip that plays when the movie starts, the movieclip is a visual assets that show's that the application is loading some information but it's not showing any loading progress, just playing while the assets are loaded.I created a for loop that will load the assets using a simple loader, and then when the object is loaded the application push the object to an array.Problem is that when the loading starts all the animation that i have on screen stops until the loading is finished.The whole point is that the animation will play while it's loading.
View 10 RepliesI want to have an AS3 app load images from url supplied by the user. But I don't want a malicious user to be able to load an SWF file in place of the image, such as with an altered extension "maliciousSwf.png". Well, not sure how big a security threat that is above and beyond the ability of the hacker to decompile swf, but I think that ideally such behavior should not be allowed.
So, is there any way to prevent this? When people allow users to load images in their Flash apps, do they somehow guard against loading of SWF? Or is this really absolutely no big deal?
How would you defer loading of other graphics on the page until after the images in a Flash gallery's images.xml file are finished loading?Is there any way to detect for this, or would I only be able to check if the flash swf object is finished loading? I'm pretty sure the swf object would be loaded/ready as with document.getElementById('flashobject').onload = function(){}; before the corresponding images have loaded though, instead of after.
View 1 Replies