Load & Unload Movie Issue
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?
Similar Messages
-
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. -
Loading/unloading movie/image in actionscript
Hi I'm trying to load an image on the fly in flash which is
no problem, but then when i need it to unload it doesn't and i get
an
*** Security Sandbox Violation ***
Connection to
file:///C|/Documents%20and%20Settings/Administrator/Desktop/Latest%20Versions/High%20res% 20newsreader/
halted - not permitted from
http://MYSERVER/test/tfl.gif
-- Remote SWFs may not access local files.
Why does this happen? why would it load but not unload?
The load code is
_root.createEmptyMovieClip("box", 1);
_root.box.createEmptyMovieClip("pic_mc", 2);
_root.box.pic_mc._x = -40;
_root.box.pic_mc._y = 0;
_root.box.pic_mc.loadMovie( "
http://MYSERVER/test/tfl.gif"
and unload is
_root.box.pic_mc.unloadMovie();it has to do with settings in the player. For security
reasons, you can only load data from within your domain. Local
domain is always 127.0.0.1 or localhost. don't use
http:// inside your call to loadMovie. Always
use the local method (relative path from the current flash file
i.e. /test/tfl.gif) and make sure that the images are local. By
using that
http://MYSERVER, flash thinks that the
domain for the current running movie is MYSERVER and not localhost
therefore, it will restrict all access to local files. Now, if you
put the flash file up on MYSERVER, chances are like wwscoper just
pointed out, it will work perfectly because localhost and MYSERVER
refer to the same masked IP. -
Still having issues loading AS2 movies
I'm loading AS2 movies in a AS3 environment. The AS2 movies
use Tweener (any other tweening engine gives the same results btw).
If I load a AS2 movie the first time, a tween that uses a time and
easing property runs fine. When I load the AS2 movie the second
time... no go (the AS2 movie is removed... loader.unload, and the
loader is nullified, no listeners...). If I remove the time and
easing property on the tween, the 'tween' (it's now simply a new
value for x or y...) runs fine every time.
Is this some sort of cache issue? Broken GC kglad? Anyone
experienced this too or does anyone can shed some light on this?
Ideas maybe what I can try to solve this?Have you removed the page as i get redirected to http://steamcurriculum.blogspot.in/p/home.html/whatsmissing/index.html
I do not see any edge realted content even in the source of this page -
Issues Loading 'Rented Movies' on to iPhone 3G
When trying to load 2 recently downloaded movies, getting error message that basically says it is 'INVALID' (and that's it). I have been able to load 'rented' movies before with no issues.
Any help that can provided will be greatly appreciated. Thanks.PS - the specific error message is:
Some of the videos in our iTunes library, including the video "Movie Name", were not copied to the iPhone "My iPhone's Name" because they cannot be played on this iPhone. -
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. -
Loading external movies differently
I am making a web site with several pages that the content
will load as an external movie. Right now I have all loading with
the nav buttons "on release". The first page loads through one
blank clip and the rest in another. What I would like to do is have
the first external page/clip content load with the main page and
also reload with the nav button if someone wishes to return and
leave the other buttons to remain loading each pages external
content like they are now. So is there a way to get the first pages
content to load both ways? This is what the code for the first
button looks like now :
on (release) {
//load Movie Behavior
if(this.aboutext == Number(this.aboutext)){
loadMovieNum("aboutus.swf",this.aboutext);
} else {
this.aboutext.loadMovie("aboutus.swf");
//End Behavior
//unload Movie Behavior
if(this.blk == Number(this.blk)){
unloadMovieNum(this.blk);
} else {
this.blk.unloadMovie();
//End Behavior
Right now everything works I just don't have any content
until a button is clicked.Hi,
Take a look at this simple tutorial and you will find what
you are looking for.
Here
Hope this helps
Cheers
Alan -
Disabled combo boxes don't display properly after loading a movie.
Hi,
I have a main movie that contains some combo boxes. Some of them may be disabled.
By pressing a button I load another movie using loadMovie. The loaded movie also contains combo boxes.
When the button is pressed, the clip that shows the combo boxes is removed from the stage and the loaded movie is displayed. By pressing another button, the loaded movie is unloaded and the clip with the combo boxes is displayed again.
Well, once the other movie has been loaded, when I go back to the clip with combo boxes, the disabled combo boxes have a small gray button covering the black down arrow.
I have determined that so long as the loaded movie contains combo box in the library, the problem occurrs, even if there is no actual instance of it.
The combo boxes that are not disabled are not affected. The combo boxes are disabled by setting "cb_name.enabled=false".
If the combo box is enabled, it displays correctly, but if disabled again, it goes wrong again.
My project is targeting Flash 8, so it uses AS2.
I'm using Flash CS4.
This is a very simple example I did to make sure I wasn't doing anything funny:
Initially:
After pressing the button:
After pressing the other button:
The behaviour in a web browser is the same...
I hope someone can help me with this. Thanks in advance!Thanks for the response.
The "Load the movie" button:
on(click)
_parent.gotoAndStop(2);
The 2nd frame:
loadMovie("Test another child.swf",Container);
stop();
The "Unload and go back" button:
on(click)
unloadMovie(_parent.Container);
_parent.gotoAndStop(1);
Container is a movieClip with a dark gray square shape the size of the movie clip that is loaded. It doesn't exist on frame 1, only on frame 2.
The combo boxes are inside a movie clip, and this is only on the stage on frame 1.
This and the captures belong to a very simple test I did. If there is a way of posting files, I can post a zip file with the two .fla and the two .swf. -
I have a huge movie clip to be imported, its pretty huge so I
divided them to smaller pieces and tried to import, everything my
PC gets hung and does not respond after import. What is the best
method to import a single huge movie clip? Your help is
appreciated.Problem Solved.
To everyone that has experienced some version of this issue,
whether it be in previewing a load progress bar, or having
animation freeze on you while loading external movie files...
In test mode in flash, whether you are doing a simple test
movie or debugging, loading progress appears to not be threaded and
will freeze you movie until the load is complete. if you preview
this movie clip in a browser after publishing it, everything should
look ok.
I've read a lot of posts about this same topic. Macromedia
(or shall i say Adobe), fix this issue in your next release. what a
pain...seriously. debugging is useless if the movie doesn't even
run the same.
very much relieved,
Al. -
Problem going to fullscreen after loading AS2 movie into AS3
I've got a loader movie that is written in AS3, and
fullscreen is enabled. I have a context-menu fullscreen trigger and
a keypress fullscreen trigger built into the loader movie. When I
load an AS3 movie or an AS1 movie through the loader movie, I can
go to fullscreen without problems. When I load the AS2 movie, I
cannot.
Does anyone have an idea why this might be? I'm struggling.
Thanks in advance.Thanks for your help, but as said ("But also using a
separated second loader to load the second file is not working.")
even when using a second loader (with a different name) the second
file loaded will not work.
I'm removing any EventListener from the first loader,
unloading and then nulling it.
But to me it seems, that the first content is not garbage
collected and because of that, even when loaded with an other
loader the first loaded swf-file interferes with the second.
I came to this conclusion, because the first loaded swf-file
is still working after trying to load the second file. And just
more weird: the first loaded file is in the same state and also
after closing the Flash-Player.
You can see it for yourself: download the testcase. Start the
testcase.swf. Load a contentfile. Skip a few pages. Quit the Flash
Player. Start the testcase.swf again and load the same contentfile.
You will see it's at the same position like before quiting the
Player.
And I can't help, but that seems like a bug to me... -
I rented a movie in the iTunes Store but now when I want to watch it it says; 'cannot load the movie' while it says the download has been completed.. What now? I already payed for it.
Did you rent the movie on your iPad? Are you trying to watch it on your iPad?
Do you have WiFi connectivity when trying to start viewing the movie?
You should have answered "yes" to all the above. If not, that is probably the source of your issue. -
I made a flash file called "sss_menu.swf" which has 5 tabs (home, story, profile, gallery, and about me) that uses the loadmovie function to load their own .swf files, and nothing else. It's a base. So the menu, when clicked, home loads the movie "sss_home.swf", story loads "sss_story.swf" etc.
But I'm combining this menu to a group main menu called "menu.swf" that will load multiple individual menus. So the "menu.swf" after clicking a certain button will load "sss_menu.swf", and for example other individual menus such as "aaa_menu.swf" and "bbb_menu.swf".
If I want to move from the "sss_story.swf" to the "aaa_menu.swf" for example, my story.swf file doesn't unload. What should I do to unload it?apply unloadMovie() to its load-target movieclip
-
Hi,
I have 2 loader components - one named myPicLoader which
loads photos and another named myLoader which loads external swf's.
I want button 1 to load myPicLoader and button 2 to load
myLoader.
The unload movie command I think removes the loader from the
stage.
What code do I need to use so that on button 1, myPicLoader
loads, and button 2, myLoader loads?
Here is the code for my buttons. Thanks.If you use the same depth to attach or load another Movie I
believe it will kill what is at that depth.
However you can explore
removeMovieClip. -
RSRV Load/Unload of indexes
Not important topic, but may be someone from SAP will be interested with this observation.
Loading and unloading (i.e. deleting) from memory of the huuuge single BIA index with RSRV I noticed incremental increase of memory consumption on the blade where this index is assigned. After couple of repetitive loads/unloads I incresed memory consumption from 6GB to 13GB. (Then I decided to stop, otherwise I would might crash my 16GB blade).
Regards,
-VitaliyHi Satyam,
It was an issue with memory leak in that Revision of BWA. Current revisions (like 50+) are much-much better with that.
Regards,
-Vitaliy -
Very high HDD load/unload cycles and hardware ECC (SMART)
Hello,
I just took a look at my Seagate HDDs SMART values and found 2 very high numbers:
Load/Unload Cycle Count: 29.422, and increasing +1 like every 15 seconds, together with a clunking noise.
Hardware ECC Recovered: 320.239.221, and increasing +10 or more like every second.
The Load/Unload stuff seems to be aggressive power management of either the drive itself or the OS, I have no clue how to stop this. I tried keeping the drive busy with declunk, but it still parks the heads every few seconds.
But what is Hardware ECC ? And can anyone give me an advice on how to stop my drive moving the heads to the parking position every 15 seconds ? When I used Tiger, opening Photo Booth did the trick, doesn't work on Leopard tho. The HDD is less than 1 month old...I too was getting so annoyed by the clunking sounds. The APM settings for the HDD are obviously out of whack completely. Tried Declunk which has been mentioned in other threads in the forums. It basically runs as a daemon making a small file and then deleting it every 5 seconds. I got it to work, but I had to introduce an additional parameter string to force it to create the file every 4 seconds. Visit http://kiza.kcore.de/software/declunk/ for more information on this issue.
Overall, I was still unhappy with the solution. Creating a file ever few seconds isn't optimal.
Having tested disabling the APM settings with hdparm for WinXP (Via Bootcamp) and found that it fixed the clunking sound, I knew that APM was definitely causing the sound. Of course, hdparm did not update the firmware of the hdd, so every time I powered down my MBP, the hdd would go back to APM being on "FULL" bringing
back the "clunk" sound.
The ideal solution was to obtain some kind of APM management software for OSX. Unfortunately, the historical application known as APM Tuner X was no longer being developed by the author and does not run in Leopard.
Thats when I found HDAPM!!!
http://mckinlay.net.nz/hdapm/
How did you determine the load/unload cycles for your HDD? In the end I located a copy of smartmon for Windows and booted into WinXp (via Bootcamp). I think my cycles are up to over 100,000... Not sure how to easily tell?!
Anyway, I hope that this solves your issue. Apple's Energy Saving system preference pane SHOULD disable putting the hard disk to sleep if left unchecked, but I also believe this is an issue with many HDD's. Seagate are shocking when it comes to releasing firmware upgrades too by the looks of things.
Maybe you are looking for
-
Dual External Monitor configuration
I want to connect two large external monitors to my MacBook Pro. I already own the monitors. One monitor has a dvi connector, the other has a vga connector (they both used to be connected to my "Dull" laptop computer). One configuration that I have c
-
Unable to Print lines around a box in subsequent pages
Hi I am unable to print with lines around the box in subsequent pages. With Best Regards Mamatha.B
-
For the picture quality which one i should choose, canon 700d or 60d??
Hey guys, im planning to buy a camera... because i'm not have so much money so i'm interested at 2 models.... EOS 60D and EOS 700D 60D are old one than 700D... If i want a better picture which camera I should choose?? I usually shooting at JPEG mode.
-
Creating Index on a XML generated from Dataset
HI mark, I have an XMLTYPE table that contains data of the following format <ROWSET> <ROW> <column1>1</column1> <column2>2</column2> </ROW> <ROW> <column1>1</column1> <column2>2</column2> </ROW> <ROW> <column1>1</column1> <column2>2</column2> </ROW>
-
I GET AN ERROR WHEN CHECKING FOR USER INPUT VALIDATION
if (choiceBrand.length()==0) System.out.println("No selection was made, " ); System.out.println("We will price the Frigidaire."); I GET THIS ERROR Green_1.java:55: char cannot be dereferenced if (choiceBrand.length()==0)