Movie Loader - Unload loader
I’m new to flash, but program in many other languages.
My movies are getting real large, so I needed to make a loader
program, that tells the user that the big movie is loading.
One thing that I have noticed, is that the loader loads the
movie and the movie plays, but the loader is still running in the
background. I can see the loader there if the movie does not have a
background to cover the loader.
Do I need to unload the loader, or is this just normal?
Plus, sometimes the loader loads the movie, but the movie is
already in play for about 5 seconds on slow downloads.
Below is my code. Any help or knowledge would be much
appreciated.
Well, some of these are so old I don't think tween extensions were really a thing yet. - Like Flash 6/7 content. Also, even some animations in Flash 8 etc. were very potpourri. I have no idea what I did on what occasion as I don't have the FLAs for a number of these portfolio examples.
I typically use TweenLite/TweenMax though. Before that I did use the flash.mx tween coding. I don't know when I made the transition. Late '07 I think.
I've found that all I can use in my current site is old school timeline-based frame animations because the player doesn't cash out info or something. Anything built in movieclips at all instead of on the main timeline gets ignored the second time around and doesn't play.
I'm lucky I have a at least a few that I did that or my entire portfolio site would be crapped. And I rebuilt this thing because AS2 didn't have frameRate controls. Meanwhile, a year and a half later, now this.
I can't do rich media examples, only standard banners, but it's at least something until I get more in my portfolio. I tried doing video grabs using Screenflow but cropping things perfectly was agonizing. So this is pretty much where it stands unless there's some kind of refresh command to communicate with the player above the DisplayContainer.
I haven' the foggiest what that might be.
Similar Messages
-
How to use Load XML Data (Home Utilities Data Load/Unload Load)
How is Load XML Data (Home>Utilities>Data Load/Unload>Load) supposed to work? Where is this documented?
What table type/structure is required?
How does this related to XDB functionality?It's not really documented that well in the XE redux documents (or even the base Apex Documents)- see http://download-west.oracle.com/docs/cd/B25329_01/doc/appdev.102/b25309/sql_utl.htm#sthref2530
However, it's reasonably easy to use - you can export a table to XML format, and then reload the table with the data by importing the XML document. It has nothing to do with XDB, it's just a different flat file representation for unloaded data than CSV -
Hi Guys:
Have 2 unable solve issues, would be much appreciated if anyone could help.
// ISSUE 1 //
I am experiencing an issue with Load & Unload Movie. What happen is that I am trying to load an external SWF into a movie clip call movieContainer in my main website. This external SWF file has timeline that perform a animation when it's loaded into the movieContainer.
I can load and unload the movie with no problem...the issue is that after I unload the SWF and then at any point of the movie on the main website I click to load the SWF back to the stage.....the timeframe of the SWF file stay at where it get left off(when it's unloaded). I am trying to make it play start all over again.
I try the movieContainer.content.gotoAndPlay(1); but it doesn't do anything. Any idea how I could make this work?
Here is my code:
var content:Loader = new Loader();
content.load(new URLRequest("externalSwf/content.swf"));
loadMovieButton.addEventListener(MouseEvent.CLICK, loadMovieButtonClicked);
function loadMovieButtonClicked(e:MouseEvent):void{
movieContainer.addChild(content);
// ISSUE 2 //
In my external SWF file, I have create a loading loader at the 1st frame. But it doesn't play all the time when I testing on the server. It works just fine when I test locally with TEST MOVIE. Not only it doesn't play all the time.....it suppose to play from 2nd frame of the movie after the loading is finished (I have a short animation play between frame 2 - frame 20) Instead of playing from frame 2 to frame 20, the animation just jump straight to frame 20...which mean the user won't see the animation between frame 2 - frame 20.
import flash.events.ProgressEvent;
function update(e:ProgressEvent):void
var percent:Number = Math.floor( (e.bytesLoaded*100)/e.bytesTotal );
if(preloaderMC is MovieClip){
preloaderMC.gotoAndStop(percent);
//preload_txt.text = String(percent);
if(percent == 100){
gotoAndPlay(2);
loaderInfo.addEventListener(ProgressEvent.PROGRESS, update);
// Extra test for IE
var percent:Number = Math.floor( (this.loaderInfo.bytesLoaded*100)/this.loaderInfo.bytesTotal );
if(percent == 100){
nextFrame();
stop();
Many Thanks!Thanks for the reply, the code I use to load the external SWF is:
The button is within a movieClip: commercialScrollBar_mc
The button instance name is: stackPancakeBar
The external SWF get to load into a movieClip container call: projectDetailsContainer_mc
var ldr:Loader = new Loader();
ldr.load(new URLRequest("projectsCommercial/stackPancakeBar.swf"));
commercialScrollBar_mc.stackPancakeBar.addEventListener(MouseEvent.CLICK, stackPancakeBarClicked);
function stackPancakeBarClicked(e:MouseEvent):void{
MovieClip(ldr.content).gotoAndPlay(1);
projectDetailsContainer_mc.addChild(ldr);
I was thinking does it has anything to do with the UNLOAD script I have on the external SWF file? Below are the code for removing the child.
back_btn.addEventListener(MouseEvent.CLICK, removeProjectDetails);
function removeProjectDetails(e:MouseEvent):void{
this.parent.parent.removeChild(this.parent);
Thanks Heaps, by the way, do you have any idea why the loading sequence doesn't get to play every time? Or perhape the file size is too small? -
I have a Flash movie that automatically opens another Flash movie inside it. The main swf has a "Start" button at the bottom. When I click the Start button I want to unload the swf that loaded automatically (as a placeholder) and load a new Flash video swf. I'm doing this to create a placeholder for the video. I don't know what code I need to use on the button to unload the automatic swf and load the new swf video.
if you don't need to stop any loaded streams (like sound/video), you can just reuse the same loader to load the next swf. otherwise, apply unloadAndStop() to your loader before loading the next swf.
-
SWF LOAD UNLOADING SWFLOADER ISSUES
Hello Everyone,
I wonder if anyone ran into this issue. I have a view stack
with 3 visual screens. One of the screen has SWFLoader placed in
with "id = contentLoader";
I have two buttons on this screen on the top: "LOAD MOVIE 1"
and "LOAD MOVIE 2".
So pretty much, user can load the movie into the SWF LOADER
via this two button navigation. Well, I am able to load the first
movie with "AUTOLOAD". But when I click for the "LOAD MOVIE 2", the
second movie does load in but then the application crashes and
closes itself.
My Questions:
How can I unload the currently loaded SWF Movie before
Loading the next one. I have searched for days for this on google
and nothing has come through.
ContentLoader.unloadandStop() doesn't work and application
still crashes.
ContentLoader.source = ""; doesn't work, app still crashes
ContentLoader.source = null; doesn't work, app still crashes
Any help would highly be appreciated on this, please.Hello Everyone,
I wonder if anyone ran into this issue. I have a view stack
with 3 visual screens. One of the screen has SWFLoader placed in
with "id = contentLoader";
I have two buttons on this screen on the top: "LOAD MOVIE 1"
and "LOAD MOVIE 2".
So pretty much, user can load the movie into the SWF LOADER
via this two button navigation. Well, I am able to load the first
movie with "AUTOLOAD". But when I click for the "LOAD MOVIE 2", the
second movie does load in but then the application crashes and
closes itself.
My Questions:
How can I unload the currently loaded SWF Movie before
Loading the next one. I have searched for days for this on google
and nothing has come through.
ContentLoader.unloadandStop() doesn't work and application
still crashes.
ContentLoader.source = ""; doesn't work, app still crashes
ContentLoader.source = null; doesn't work, app still crashes
Any help would highly be appreciated on this, please. -
Controlling parent movie from a loaded movie
> This message is in MIME format. Since your mail reader
does not understand
this format, some or all of this message may not be legible.
--B_3264494197_595630
Content-type: text/plain;
charset="US-ASCII"
Content-transfer-encoding: 7bit
Hi!
I have a swf file which I call "Stage" and it contains 3
scenes.
In scene 1 of Stage, I have another swf- "Info1." loaded on
level 10. I know
how to get Info1 to unload and load Info2 but what I am
trying to accomplish
is when I click on Info1, it loads Info2 and it also go to
Scene 2 of Stage.
Is there anyway I can do this?
I appreciate any input.
Thank you.
K.
--B_3264494197_595630
Content-type: text/html;
charset="US-ASCII"
Content-transfer-encoding: quoted-printable
<HTML>
<HEAD>
<TITLE>Controlling parent movie from a loaded
movie</TITLE>
</HEAD>
<BODY>
<FONT FACE=3D"Arial"><SPAN
STYLE=3D'font-size:12.0px'>Hi!<BR>
<BR>
I have a swf file which I call "Stage" and
it contains 3 scenes. =
<BR>
<BR>
In scene 1 of Stage, I have another swf-
"Info1." loaded on level=
10. I know how to get Info1 to unload and load Info2 but
what I am trying t=
o accomplish is when I click on Info1, it loads Info2 and it
also go to Scen=
e 2 of Stage. Is there anyway I can do this? <BR>
<BR>
I appreciate any input. <BR>
<BR>
Thank you.<BR>
<BR>
K. </SPAN></FONT>
</BODY>
</HTML>
--B_3264494197_595630--Never mind - I was doing something very stupid and wasn't
calling the function as a method of a movie clip. I was simply
calling checkTarget(event) rather than
event.currentTarget.checkTarget(event); which seems to work. -
using Apple TV for first time - to rent a movie. Logged in successfully - billing info updated. Keep getting message to log into Itunes on PC - movie won't load on TV -
any advice?3GB for a movie? That's almost equivalent to an original DVD.
Have you checked in the Recently Added playlist?
I think this is possibly linear. Select 'normal' in HB, iTunes accepts it; select 'high quality' in HB iTunes doesn't. I can't say why; I don't have any video that anywhere approaches 3GB in size. If that's how iTunes behaves I don't see you have too many options. You either select normal and it works, or you select HQ and live with playing the movie outside of iTunes.
I won't ask what movie because any help with illegally ripped copy protected DVDs is strictly prohibited by the Terms of Use so I'm assuming this is a 6 hour video of your puppy playing on the floor. -
Captivate 5 Movie won't load in any browser
Suddenly my Captivate version 5 movies will not load in any Browser.
I have 4 files
the html file, the swf file, the swf skin file, and file called standard
The .swf file will open in Flash but when I open the html file it will not open the movie. I don't know what has happened but it used to work.
Any help would be appreciated.
LeonaI found the answer to why my movie wouldn't play after publising.
Some smart user named nsukumar stated that if you used text animations it causes problems.
Sure enough, when I removed the text animation the finished results worked perfectly!
Thank you nsukumar where ever you are! -
How to get a movie to be loading in background?
Hi, I posted this in the General forum, but it wasn't getting
much interest. I'm hoping someone here can help.
We're designing a portfolio site. It will have a fairly large
amount of large bitmap images that need to look really good.
I'll make another post to make sure I have the very best
optimization techniques down. But to keep quality up, some movies
may just end up being fairly large (though I'm not sure how 'large'
is defined these days with broadband).
- But I'm wondering if/how to have a movie(s) 'preload' in
the background so that when it is called up, it is all or mostly
loaded in the browser cache?
Basically, we've divided each of the sections of the
portfolio up into separate movies, with a various number of large
images each. These are called up when you click their text link in
the landing page area. I was hoping that as people hit the landing
area and are reading the text or looking over the links, a couple
of our larger-sized movies could be loading in the background so
they don't have to wait as long if/when they click the link to that
movie.
Thanks. This is a bit new to me, so I want to make sure it's
done as well and efficiently as possible. It needs to function and
look very professional.Thanks for the reply.
Just a couple questions for clarification.
- Is loading these movies with an _alpha zero in our initial
'landing page' movie (which does not have a preloader) going to
cause this initial movie to have problems (with
slowdowns/chunkiness)?
- Are you saying to assign _alpha to the target within the
initial 'landing page' movie or to the movie you are loading?
- Any opinions on the efficiency differences between doing
this with the _alpha or the _level commands?
- Any other methods?
Thanks again for the help! -
It took 2 hours to download my rental, then when i go to play the movie it flashes loading and then authorizing. It stays stuck on authorizing. Anyone experience this?
Welcome to the Apple Community.
The first thing to check would be your internet download speed, you can do this at www.speedtest.net.
1080p HD movies require a recommended speed of 8 Mbps, 720p HD movies require a recommended speed of 6 Mbps, while SD movies require a recommended speed of 2.5 Mbps. -
Load / unload numerous images in air application (memory leak?)
Hi,
after struggling for a few days with this, I realized I need help!
I am trying to make an application load and display A LOT (hundreds) of images thumbnails at various position in a big area. The problem is that when I try to unload and reload images, I end up with an increasing memory, that does not get collected by the garbage collector.
My first challenge was to load images from anywhere in the computer (I am quite new to flex), which I solved by using a File reference and a Loader using the url extracted from the file:
private function createImage():void {
var img_:String = "1905_a_mondrian.jpg";
var imageFile:File = new File();
imageFile.nativePath = imagesPath + "/" + img_;
var imageLoader:Loader = new Loader();
// useWeakReference permits the GC to collect the memory when the eventListener is dropped
imageLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, loaded, false, 0, true);
imageLoader.load(new URLRequest(imageFile.url));
imageFile = null;
I make sure I remove the eventListener in the loaded method:
e.target.content.removeEventListener(Event.COMPLETE, loaded);
And then Populate an external component:
<?xml version="1.0" encoding="utf-8"?>
<s:Group xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/halo"
x="-100" y="-100" width="200" height="200" >
<!-- The trick is right above this line: offset the anchor point to center the component around -->
<fx:Script>
<![CDATA[
import mx.controls.Image;
[Bindable]
public var image:Image;
]]>
</fx:Script>
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<mx:Image id="img_" source="{image}" horizontalCenter="0" verticalCenter="0" autoLoad="true" />
<!-- impair width and height results in problems for centering the ellipse (e.g. for rotation) -->
<s:Ellipse height="4" width="4" horizontalCenter="0" verticalCenter="0" >
<s:fill>
<s:SolidColor color="0x00FF00"/>
</s:fill>
</s:Ellipse>
</s:Group>
I populate a Dictionary to keep a track of all the component created. Finally I nullify all that I can to hint the garbage collector.
Now I have a function to empty the Dictionary (componentBag below) when we want to unload the images:
protected function button1_clickHandler(event:MouseEvent):void
for each ( var g : Group in componentBag )
((ImgPanel)(g.getChildAt(0))).img_.unloadAndStop(false);
((ImgPanel)(g.getChildAt(0))).image = null;
delete componentBag[g.uid];
g.removeElementAt(0);
this.removeElement(g);
g = null;
triggerGC();
PROBLEM: using profiler, the loading/unloading works once or twice and after the memory keeps increasing... And if I launch the application, wait for a while and do a load/unload, the garbage collection only recovers a few megabytes, far from what was allocated for displaying the images.
What am I missing? Is there a problem with loading a lot of images? Has anyone done this?
In attachment is the full test code, the ImgPanel goes inside a 'views' packageThanks to Anton_AL, I finally solved this problem by using an URLLoader AND a plain Loader:
var loader: URLLoader = new URLLoader( );
loader.dataFormat = URLLoaderDataFormat.BINARY;
loader.addEventListener(Event.COMPLETE, onLoadingComplete );
loader.load( new URLRequest(file.url) );
private function onLoadingComplete( e: Event ):void
var loader: Loader = new Loader( );
loader.contentLoaderInfo.addEventListener( Event.COMPLETE, onParsingComplete );
loader.loadBytes( e.target.data );
private function onParsingComplete( e: Event ):void
var img: BitmapImage = new BitmapImage( );
img.source = (e.target.content as Bitmap).bitmapData;
_images.push( img );
private function onImageLoaded( e:Event ):void
var img: Image = e.target as Image;
img.removeEventListener( Event.COMPLETE, onImageLoaded );
_images.push( img );
See Anton's thread here: http://forums.adobe.com/message/2358653#2358653 -
New HDD Load / Unload Cycle Count increasing extremely fast !
Hi all
I just upgrade my Pavilion dv5 HDD. The new model is Hitachi Travelstar 7K500 (HTS725050A9A364). However, I found my new HDD's Load / Unload Cycle Count increasing extremely fast!
Until now the number of Load / Unload Cycle is 12,127. However, the new HDD only power on 137hours. (About 1 week of my use.) The data below is my new HDD's SMART data (by EVEREST 5.50):
ID
01 Raw Read Error Rate 62 100 100 0
02 Throughput Performance 40 100 100 0
03 Spinup Time 33 159 159 2
04 Start/Stop Count 0 100 100 14
05 Reallocated Sector Count 5 100 100 0
07 Seek Error Rate 67 100 100 0
08 Seek Time Performance 40 100 100 0
09 Power-On Time Count 0 100 100 137
0A Spinup Retry Count 60 100 100 0
0C Power Cycle Count 0 100 100 14
BF Mechanical Shock 0 100 100 0
C0 Power-Off Retract Count 0 100 100 1
C1 Load/Unload Cycle Count 0 99 99 12127
C2 Temperature 0 152 152 19, 36
C4 Reallocation Event Count 0 100 100 0
C5 Current Pending Sector Count 0 100 100 0
C6 Offline Uncorrectable Sector Count 0 100 100 0
C7 Ultra ATA CRC Error Rate 0 200 200 0
DF Load/Unload Retry Count 0 100 100 0
I'm pretty sure that the data is correct, because I can hear the HDD's Load / Unload sound very frequently. The C1 row increase about 2,000 per day. However my previous Hitachi 5K320 has no problem. The running operating system are both Windows 7.
I'm so worry about this. As you know, laptop HDD's L / UL Cycle is designed at 600,000. If my HDD continue increasing like this, it will reach this number in a very short time. Any one can help me?It's a feature of modern 2.5" harddisks , the disk parks the head when its been inactive for a while, to avoid damage , uses less power , and reduces the heat etc gives the harddisk a better looking spec sheet , its meant to park its head after being inactive for a long time around an hour with proper management from the bios/os of the head parking feature, because there is nothing to manage this feature in hp's bios or os the disk parks the head about every minute for no reason then after 1 second the head goes back on the disk thats 1 load/unload cycle , it also effects performance as the head has to find its place back on the disk , load times will decrease by alot , videos will stutter the first few secs, i have the same problem but not as bad after 130 hours i had a count of around 1,250 load/unloads , different brands of disk have different idle timers plus i use utorrent which stops the harddisk from idling so much, there are a couple of solutions, you can find a tool to update/mod the harddisk firmware to increase the idle timer ( i decided against this as you can permently brake the harddrive and void the warrenty) , contact hp and request a bios update with proper management or the harddisk head parking feature i.e tell the harddisk it is idle after an hour, the temperary solutions are download hd tune and run it all the time this stops the harddisk from parking its head as it doesn't let it go idle , or the solution i am using at the moment download a programme called HDD scan , everytime you turn on/off you have to run the prog go to tasks/features/ide features set the advance power management from its default value to 254 then press set, no more unnessary load/unloads, downside is the disk runs a couple of 0c hotter mine still never goes above 40c even under full load thanks to a active cooling pad, also its less well protected against shock.
-
ITUNES MOVIE DOES NOT LOAD ALL THE WAY
"Skyfall" the movie will not load all the way through
Close your iTunes,
Go to command Prompt -
(Win 7/Vista) - START/ALL PROGRAMS/ACCESSORIES, right mouse click "Command Prompt", choose "Run as Administrator".
(Win XP SP2 & above) - START/ALL PROGRAMS/ACCESSORIES/Command Prompt
In the "Command Prompt" screen, type in
netsh winsock reset
Hit "ENTER" key
Restart your computer.
Now launch your iTunes and see if it is working now. -
Hey all
I was just simply trying to load one swf into another. in my document class I have the following line of code in my constructor.
var loadBoard:LoadBoard = new LoadBoard("Directory.swf");
in my LoadBoard class:
package com.myproject
import flash.display.Loader;
import flash.display.MovieClip;
import flash.net.URLRequest;
public class LoadBoard extends MovieClip
public function LoadBoard(nameOfBoard:String)
var boardLoader:Loader = new Loader();
addChild(boardLoader);
boardLoader.load(new URLRequest(nameOfBoard));
trace("swf should be loaded");
In my console I get the following when I debug"
[SWF] U:\fullPath\Directory.swf - 69,058 bytes after decompression
[SWF] U:\fullPath\Directory.swf - 2,067 bytes after decompression
[SWF] U:\fullPath\Directory.swf - 322,606 bytes after decompression
[SWF] U:\fullPath\Directory.swf - 112,558 bytes after decompression
[Unload SWF] U:\fullPath\Directory.swf
Warning: Ignoring 'secure' attribute in policy file from http://fpdownload.adobe.com/pub/swz/crossdomain.xml. The 'secure' attribute is only permitted in HTTPS and socket policy files. See http://www.adobe.com/go/strict_policy_files for details.
Not sure why I am getting this warning, when I googled it, the erro has to do with trying to load a file from another domain. My Directory.swf file is in the same location as my main swf, the bin-debug folder. Also the Directory.swf does not seem to load into my main swf as I don't see it show up in the flash player when i run my app. I am also a little confused on the [Unload SWF], I am not doing anything to tell it to Unload my swf.
I am using FB to do all my coding and debugging if that matters.
Does anyone have any ideas.
thanks,Apparently I was, so I changed it to classic text in my Directory.fla and that seemed to remove the weird error. However it seem that my swf is still not loading. any Ideas why that might be?
[EDIT] Ok, my Directory swf is defenatly loading. but not showing up in the display list. I updated my LoadBoard to the following.
package com.aces
import flash.display.Loader;
import flash.display.MovieClip;
import flash.events.Event;
import flash.net.URLRequest;
public class LoadBoard extends MovieClip
public function LoadBoard(nameOfBoard:String)
var boardLoader:Loader = new Loader();
boardLoader.load(new URLRequest(nameOfBoard));
boardLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, finishLoading);
public function finishLoading(loadEvent:Event):void
addChild(loadEvent.currentTarget.content);
trace("swf should be loaded");
any Ideas?
Thanks, -
Load/Unload Component from Main Application
I want to load in my main application 2 components. At this moment I load them with this:
<components:loadProject id="loadPrj" visible="false" click="loadPrj_clickHandler(event)" verticalCenter="7" horizontalCenter="0"/>
and I only set visible to true. Inside this component there is a canvas.
But, is there any other way to do this using an AS class file? I would like to load/unload it on click, not only set true/false to visible.For dynamic creation and destruction of objects, you want to use ActionScript.
So in your main app file, you might have a button that triggers a click handler that does this:
private function myClickHandler()void {
var b1:CustomComponent = new CustomComponent();
var b2:CustomComponent = new CustomComponent();
/// Be sure to add them to the display list if they are visual components
myPanel.addElement(b1);
myPanel.addElement(b1);
Maybe you are looking for
-
Trying to save as PDF/A-1a: "Structure tree root entry missing" and "MarkInfo missing"
I would like to convert born-digital documents originally created in Word 2007 to the PDF/A-1a standard. From Word, I am only able to Print to PDF/A-1b. I did that, opened the resulting PDF in Adobe Acrobat 9.3 Professional, and tried running the Pre
-
Hi, pension contribution deduction that is backdated into a previous year should write to wage type /ZP0, our pension scheme is not doing this.. can some one point me in right direction thanks
-
I inadvertently have two Apple Podcast ID's on ONE feed URL
Hi, My first post here... I assume Apple support reads this... I updated our old Podcast on the Book of Acts with a new one on the Book of John, but I used the same feed URL namely, http://www.raystedman.org/messages.rss . The new podcast is working
-
Lost all my application in my iPhone
After installing Ios5, I lost all application on my iPhone ans on iTunes on my computer. What can I do to recuperate them ? Thanks
-
I am going to Thailand, Malaysia and Singapore. I went into an Apple store and inquired about a travel adapter. I was told that the Apple World Travel Adapter Kit would not be suitable for my destinations. Is this correct? What product should I b