Using MovieClipLoader to load paused movieclip
I am using MovieClipLoader to load an external swf file into
a movieclip container. I would like it to be paused on load so that
I can use a play button to play it. I can't seem to get it to load
in a paused state. My code follows:
stop();
var clipPos:String = "First";
var clipNum:Number = 1;
_root.skipBackButton._visible = false;
_root.skipForwardButton._visible = true;
playBtn._visible = false;
arcLoaderAnim._visible = false;
counter._visible = false;
my_mc = new MovieClipLoader();
preload = new Object();
my_mc.addListener(preload);
my_mc.getProgress(
preload.onLoadStart = function(targetMC) {
trace("started loading "+targetMC);
clipContainer._visible = false;
still._visible = true;
arcLoaderAnim._visible = true;
counter._visible = true;
preload.onLoadProgress = function(targetMC, lBytes, tBytes) {
counter = "% "+Math.round((lBytes/tBytes)*100);
preload.onLoadComplete = function(targetMC) {
still._visible = false;
clipContainer._visible = true;
arcLoaderAnim._visible = false;
playBtn._visible = true;
counter._visible = false;
trace(targetMC+" finished");
my_mc.loadClip("summerOfLove.swf", "clipContainer");
Any help would be greatly appreciated. Thanks.
Jim
Thank you. Of course that worked. I thought I had done that,
but I hadn't. It's late and time for bed. Good night.
Jim
Similar Messages
-
Problem Loading Gif's using MovieClipLoader
Hi forum,
I am using the MovieClipLoader to load images into a web
site. some are jpg's some are gif's. Now the problem is that jpg's
load properly and appear on the stage but gif's don't load...(well
at least they don't appear on the stage)
I know MovieClipLoader doesn't load animated gif's (as
mensioned in the help file) but I have created those gifs in flash
and non are animated, they are all just one frame image.
So can anyone tell me what am I doing wrong.
Here is the code:
P.S. I'm exporting for player 7 and I need to keep it that
way.
if I decomment the last line of code the jpg image loads and
appears on the stage.
Many thanks in advance.has981,
> I know MovieClipLoader doesn't load animated gif's (as
> mensioned in the help file) but I have created those
gifs in
> flash and non are animated, they are all just one frame
image.
Actually, MovieClipLoader does load animated GIFs -- they
just don't
animate once loaded.
> if I decomment the last line of code the jpg image loads
> and appears on the stage.
> Many thanks in advance.
You code looks absolutely fine to me. I tested it right here
with a GIF
and a JPG. You're doing this in Flash 8, right? Prior to 8,
Flash only
loaded non-progressive JPGs and SWFs (and earlier, only
SWFs).
David
stiller (at) quip (dot) net
Dev essays:
http://www.quip.net/blog/
"Luck is the residue of good design." -
Using loadMovie to load SWF linked to FLV
I am having problems getting a movie (SWF) with an linked FLV
file to play when I use loadMovie to load it in.
I have an .FLV file named vid_9.flv. I have embedded it into
a Flash movie named vid_9.swf using Flash 8 Professional. I am
using "Progressive Download from a Web Server" and no controls.
When I play the SWF on the stand-alone player (the FLV is in the
same folder) it works great. Now when I call that SWF into another
movie using
swfHolder.loadMovie("SWFs/vid_9.swf");
it shows it being completely loaded, but then never plays,
all I get is a white screen. This is my second project in a row
where this did not work. Any ideas as to why? Thanks for any
help.onLoadComplete executes before the loaded swf's assets are initialized: use onLoadInit.
those function definitions in your loaded swf should NOT be in an onLoad method. if they are defined on the main timeline of the loaded swf, use:
var url:String = "scene05.swf";
var movieClip:MovieClip = createEmptyMovieClip("movieClip", 0);
var listenerObj:Object = new Object();
listenerObj.onLoadInit = function (target_mc:MovieClip):Void {
//It should execute these functions that are located in the onLoad event in the loaded swf.
target_mc.initBackground();
target_mc.initBackgroundWeg();
target_mc.initVehicles();
target_mc.initForeground();
target_mc.initKnoppen();
var movieClipLoader:MovieClipLoader = new MovieClipLoader();
movieClipLoader.addListener(listenerObj);
movieClipLoader.loadClip(url, movieClip); -
How to load a movieclip from libary with a button?
Hi!
I am kinda new to Flash and i have a queston.I made a
movieclip that i keep in the libary. I have a button that i want to
load the movieclip on the screen while pressing it. Queston is: how
or what kind of code do i put for the button to load the movieclip
wich is in my libary? As i see there is no simple soulution for
this with the script assistent? I got the option load movie but it
only loads external files or i get error messages when trying to
load my movie.
Please help me with this.
/Tobiasthere are a few things you'll need to do in order to achieve
this, but it's not to complicated. First right-click the MC in the
Library and select 'properties', then in the 'Linkage' section
select the check box 'Export for ActionScript' and the type a name
in the 'Identifier' field, hit OK. now you can access the MC by the
linkage ID.
the next thing you will need to know is 'where' you want to
place the MC, figure out the x,y position. then on the main
timeline, handle the 'button' code and we'll use 'attachMovie' to
bring the MC to the Stage. within the attachMovie method we'll also
pass the position you've decided upon. so it would look something
like this: -
I am a designer working on a flash project that is used to navigate to html pages. The project is a map - when you roll over different states there is an animation making that state pop out and show the state name. When you click each state (Button), it should open an html webpage. Right now the project works great, but I have the url's coded in flash actionscript using "onpress" and "load url." I would like to set it up so the flash file calls the URL for each button from an xml file, so it can be easily edited. The only thing it needs to call is the URL for each button. Can anyone give me simple instructions on how to make that happen?
you'll need to change all the code attached to those buttons so each button has an instance name and you use that name to code for your mouse handler.
and, if you're going to make those changes, you may as well use movieclip buttons and set this up so the next step is easier to accomplish. -
Acessing loaded swf movieclip sctructure on as3
Hi, I'm using external swf files to add skins to an
application. Currenlty,I'm loading isolated elements successfully
by the use of the Loader class. However, now I want to load a more
complex skin structure that will have some movieclips already
placed on the loaded swf stage. The question is: when I load an swf
that athe edit time, I placed some elements on stage and gave them
instance names, how can I access this external swf movieclip
structure? It's something like this:
1. First, I create the external file by placing some elements
on its stage, naming these elements instances, like "console_bar"
and "console_button".
2. Then, I load this swf using the Loader class (into a
loader called "playerConsole", for example) and, whe it finishes
loading I try to access the elements placed on stage:
this.addChild(playerConsole);
playerConsole.console_bar.x = 0; // won't work - how can I
access this instance?This code generates an error when I try to compile:
1119: Access of possibly undefined property console_bar
through a reference with static type
flash.display:DisplayObject. -
Dynamically loading a movieclip...
Hi All..
I know this sounds pretty pathetic.. but I can't get to load a movieClip dynamically...
I have this code:
import flash.display.MovieClip
var myButton:MovieClip = new MovieClip;
myButton.x = 30;
myButton.y = 30;
addChild(myButton);
Also, I exported the movieClip to ActionScript with the name of myButton..
When I test the movie- there're no errors, but there's nothing on the stage..
Please help...if you have a movieclip in the library with class name myButton, use:
var mybutton:myButton=new myButton();
addChild(mybutton); -
Loading a movieClip from a class
Hello all,
I'm attempting to write an AS 2.0 class using Flash through
which I can load and control multiple movie clips in the library
and from external files. I've attempted multiple different ways,
don't quite seem to be able to get the images to show up on the
screen. After some time searching, I've been unable to find a good
example online. Please excuse my inexperience with AS classes.
I'd like to write a class that extends MovieClip and is used
to control multiple 'sub' movieClips, all from methods inside the
instantiated class.
From .fla file, I call instantiate my class as follows:
var theScene:sphere3D = new sphere3D();
In the constructor of my class file, I'm attempting to attach
or load a movie. I simply want to get it to show up on the screen,
when I test the .fla movie. I've tried using attachMovie and
loadMovie with not luck.
dynamic class sphere3D extends MovieClip {
function sphere3D() {
this.attachMovie("shadow","shadow",1); // shadow being a
movie clip in the .fla library with linkage
shadow._x = 100;
shadow._y = 100;
this.createEmptyMovieClip ("shadow2", 100);
shadow2._x = 100;
shadow2._y = 100;
shadow2.loadMovie("images/cube.png");
What am I doing wrong? Suggestions for stuff to test would be
welcome.
Thank you,
dana.Ah, thank you, that make sense now. The solution you
suggested worked great.
I did also find two other solutions, for anyone else who
might read this. One is to essentially create an empty movieclip on
your timeline. From the linkage window for the empty movieclip, I
made sure I set the Class field to the name of the class I'd
written, something I didn't do previously. This attaches all the
class actionscript to the empty movieclip, and even automatically
runs the constructor when the empty movieclip is placed on the
timeline. It also automatically provides a 'reference' to the main
timeline when I refer to this.attachMovie() from inside the class.
So it worked, but isn't as elegant as doing everything from the
actionscript (unless you are building a component).
The last reference I came across is the
Object.registerClass() method used to attach as class to an object,
similar to using the Linkage method above. But I haven't
successfully tried it yet.
Thanks again for the help kglad,
dana.
Dana Sheikholeslami
Art Institute of California -
Hi,
I'm in Nova Scotia, Canada and when I try to use Siri it loads and loads and then says, "I'm really sorry about this, but I can't take any requests right now. Please try again in a little while."
I rebooted and it didn't fix the problem. I just got my iPhone 4s (unlocked right from Apple) several weeks ago.Siri has been a bit more erratic than usual in the last week or so. Apple has announced a major announcement for 9/12. Conclusions are left to the reader.
Best of luck.
(Occasionally from Lower Economy, Colchester County). -
How to use the property-loader?
Hello,
i´m using TS 3.5 and LV 8.0. Now i also want to use the built-in property-loader from Teststand.
Is there somewhere a documentation for "beginners" how to use this property-loader? At the end i want to read parameters from an ascii-file which updates my input-parameters of the steps in the current-sequence.
I know how to read and change parameters from teststand in labview via active-x, but i have no idea how to use this propertyloader-thing.
Is there an easy help file somewhere in the net ( I havent found one yet)?
Thanks for your help.Meanwhile i can use the propertyloader for Limits and Variables which are in a container of the teststep. What not worked was:
1.) setting the properties of a "Messagebox". For example the property "Button1Label". Why is this not working?
2.) The second thing what is not clear: Do i need for each sequence an own property-loader? I tested it with a sequence with one subsequence. Does the subsequence needs its own property-loader?
Currently the import-csv-file looks like this:
Start Marker,,,
<Step Name>,Limits.Low,Limits.High,Cont.Voltage
TestStep_1,1,2,4
TestStep_2,8,16,32
End Marker,,,
When Teststep_1 and Teststep_2 are both in mainsequence then it works. When i copy Teststep_2 in a subsequence then i get an error (-18).
Any ideas about my two questions?
Thanks -
How can I make server use single class loader for several applications
I have several web/ejb applications. These applications use some common libraries and should share instances of classes from those libraries.
But applications are being deployed independently thus packaging all them to EAR is not acceptable.
I suppose the problem is that each application uses separate class loader.
How can I make AS use single class loader for a set of applications?
Different applications depend on different libraries so I need a way that will not share library for all applications on the domain but only for some exact applications.
When I placed common jar to *%domain%/lib* - all works. But that jar is shared between all applications on the domain.
When I tried to place common jar to *%domain%/lib/applibs* and specified --libraries* attribute on deploying I got exception
java.lang.ClassCastException: a.FirstDao cannot be cast to a.FirstDaoHere http://download.oracle.com/docs/cd/E19879-01/820-4336/6nfqd2b1t/index.html I read:
If multiple applications or modules refer to the same libraries, classes in those libraries are automatically shared.
This can reduce the memory footprint and allow sharing of static information.Does it mean that classes should be able to be casted ?You didn't specify which version of the application server you are using, but the config is similar as long as you know what to look for. Basically, you need to change the classloader delegation. Here's how it is done in 8.2
http://download.oracle.com/docs/cd/E19830-01/819-4721/beagb/index.html -
iCal reports that it can't find server, and lots of data from several years ago is trying to get attention. Cannot bring up calendar in any view to use. also keeps loading unused calendar websites from long ago. I can' remove them. what to do?
UPDATE: I had 36 Safari windows open and minimized on the dock from my last session; 20 of those windows failed to open b/c Safari "couldn't find the server"; I just went to the URL bar of all 20 pages and clicked return, and all 20 pages loaded perfectly, without dropping any images or losing formatting. This is a puzzle!!!
-
Loading the data from a packed decimal format file using a sql*loader.
Hi ,
In one of the project i'm working here i have to load the data into oracle table from a file using a Sql*loader but the problem is the data file is in the packed decimal format so please let me know if there is any way to do this....I search a lot regarding this ..If anybody faced such type of problem ,then let me the steps to solve this.
Thanks in advance ,
Narasingarao.declare
f utl_file.file_type;
s1 varchar2(200);
s2 varchar2(200);
s3 varchar2(200);
c number := 0;
begin
f := utl_file.fopen('TRY','sample1.txt','R');
utl_file.get_line(f,s1);
utl_file.get_line(f,s2);
utl_file.get_line(f,s3);
insert into sampletable (a,b,c) values (s1,s2,s3);
c := c + 1;
utl_file.fclose(f);
exception
when NO_DATA_FOUND then
if utl_file.is_open(f) then utl_file.fclose(f); ens if;
dbms_output.put_line('No. of rows inserted : ' || c);
end;SY. -
Hey guys i was wondering if i could downgrade my iphone 5 from ios 7.1.1 to 7.0.6 or .0.4 i have 7.0.6 and .0.4 shsh blobs but when i try to build a custom ipsw using ifaith it loads and never stop loading is there any way to downgrade to older ios 7 ?
No, you cannot downgrade your iOS device. That's not supported by Apple.
-
Business partner migration using lsmw direct load .
Hi,
We need to do business partner migration using the direct load method.
We are thinking of using direct input method of lsmw for the data transfer.
Could someone suggest a proper object/ subobject for the same.
Alternatively has anyone done the same using LSMWbapi or LSMWidocs.
Inputs will be highly appreciated <<text removed>>
Dirk.
Edited by: Matt on Dec 19, 2008 1:33 PM - Do not offer rewards. Please read the rules of engagement.Hi ,
Does this solution give any way to update the customer fields too ?
We have few customer fields added to BUT tables ... How can we update these fields using LSMW and IDOC ?
Could you please give your opinion on thesame.
Maybe you are looking for
-
New BT Vision Box to receive Freview HD?
I had been a BT Vision customer for around three years. I then moved to Sky for two years, but am now thinking of coming back to BT Vision, especially with the prospect of BT Infinity. I've looked around the forums and website to see what's changed/i
-
Switching from Old Appraisal System to Management By Objective (MBO)
Dear fellow practitioners, I have a requirement to switch or migrate from the OLD appraisal system to the NEW appraisal system (MBO). Does anyone have any information of the implications of switching the value of REPLA in T77SO from blank to 'A' or '
-
Problem with Date difference in OBIEE
Hi, OBIEe- 10.1.3.4 My exp: Beginner in OBIEE I have a requirement to calculate a policy age with the date columns from a policy table these are. The columns involved are as below: 1. policy_effective_date alias EFD 2.policy_start_date alias STD 3.po
-
Panoramas in Photo Library?
Hi, Does anyone knows what size I should be preparing my panoramas in order to view them in the Photo Library? I create panoramas with my digital camera (not the iTouch). The iTouch 4G has a screen resolution of 960x640. The panoramas are of course m
-
Smart Object Scaling Produces Artifacts
Please look at this picture: When I scale down an icon using a smart object (original size is 1024x1024, the scaled down object shown here is 48x48 px), the borders of the vector shapes are added a weird sharpening effect that is not desired. When I