Loading external movies in specific frames
Here's what I'd like to have my project do: By clicking on a
button in frame 5 I'd like to load a movie into an empty movie clip
in frame 20. I'v ewritten the script to create the empty movie clip
and also load the movie, but the movie loads into all frames of my
project. I'd ideally like to have the movie clip waiting for my
only in frame 20. Anyone know how to make this happen?
Thanks
Eric
you could not load it into an empty movie clip located on
frame 20 from frame 5, flash wouldn't know where to load it since
the movie clip hasn't shown up... you could load it in on frame 5
and give the movie clip a _visible = false; or set it's _x and _y
properties to be off the stage, then on frame 20 set it to _visible
= true; or move its _x and _y properties to be on the
stage..
Similar Messages
-
Passing variables to loaded external movie
Ok, this problem has beaten me for the last 2 days. It seems
to be extremely simple, I am on main movie and I am using
MovieClipLoader class to load external movie callMe.swf into movie
holder called holder_MC, then from main using onLoadInit or
onLoadProgress listeners I can target dynamic text inside
callMe.swf as holder_MC.myTXT.text = "blablabla" or I can change
frames in callMe.swf by holder_MC.gotoAndStop(5). But HOW TO PASS
VARIABLE myVar to callMe.swf so it executes something there? Using
holder_MC.myVar DOESN'T WORK!!!!!!!!!!!!!!
Thanks for any help,
ZbynekUPDATE... I copied the link to another page with my variables in the image attributes as I posted above. And it works using the values that are cached for those items. Is there any way to do this on the same page as my original link without my users having to change to a different page?
-
Movie inside of a loaded external movie
Hi
how to control a mc inside a loaded external movie?
so I have a main.swf, loaded a ex.swf into it by using loadMovie, and inside ex.swf there is a mc called 'mc'
how do I control 'mc' from main.swf? I tried something like newLoader.mc._x +=1; ( newLoader is ex.swf), it doesn't work?
Thanks for reply.Hi Ned
after I read your reply, i went on make a new sample file just to try it out, and it work, then I went back to my file and found out on these code
var currentObject = new Object;
currentObject = newLoader.newLoader2.newLoader3;
var currentObjectColor = new Object;
currentObjectColor = currentObject;
and then I have
var my_color:Color = new Color(currentObjectColor.mc);
trace (allowColor);
my_color.setRGB(this.colorCC);
for some reason, after I replace currentObjectColor to just currentObject, it work just fine, I don't know if the problem is from putting one object equal another one, but as far as I need this would work for me.
thanks a lot. -
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 -
I've created (with help) a series of buttons that scroll a
movieClip's x-position according to an arrayIndex. With variables,
these buttons also cycle through their up and down state as the
user clicks from one to the next. I'd like for them to also load an
external flash movie into a "loader" movie clip. More precisely, a
different external swf for each button.
I don't know how to include the loadMovie script into the
(beyond my skills) action script that controls my x-postion
buttons. I've tried to write the bellow code for each button, but
it stops my x-position scroll.
I tried to use this code... but it stops my movieClip from
scrolling.
controller_mc.but1.onRelease = function() {
loadMovie("chapterTest.swf", "_root.loader");
Here is my complete code. I'd be happy to answer any question
and I'll also attach my file for review. Thank you.
click here for
my filesHi,
Ok, you mentioned that you had an issue when clicking on a
button to load an external movie it would stop your x-position
scroller. I downloaded your files and you have a button in the
library that's found in the timeline called btnLink_01. You have an
button event called:
//thumb links
timeline1.link01.onRelease = function() {
When I opened your file and ran the movie, I click on the
btnLink_01 at it did not load the external movie called test.swf,
which I created, and didn't seem to affect your x-scroll
functionality. I did some troubleshooting and set the color
properties from Alpha to None on movieclip "loader" movie and it
loaded the external movie just fine. Seemed like you had the alpha
set to 0, so when the movieclip was loaded, it didn't show up. Not
sure if this is the issue you had. Let me know if that helps or if
I wasn't resolving your issue correctly.
Thanks,
Jaime -
'Load external movie clip' behavior
I am currently working on a flash movie that loads with an
animation and stops to show four buttons that are then supposed to
load external .swf files when clicked (released). While the
behaviors and actions I have set all work fine when I test the
movie in Flash, when all the files are uploaded to my server, the
external movie clip does not load, and the message in the bottom
left corner of the browser hangs at waiting for
www.panoramalotforsale.com...
Anybody any idea what I'm doing wrong?When everything works fine locally, but fails to load live on
your webserver, there is of course a pathing problem.
So, in your flash, when you call loadMovie, try using a full
path to the external file your trying to load.
So for example, instead of "/movies'/myexample.swf", do "
http://www.yoursite.com/movies/myexample.swf".
Make sure you keep the
http:// though. -
How do you wait to load certain movie clips or frames?
I have seen flash sites that wait to load different parts of the flash file until you click on a link, thereby starting a loading graphic that then loads the content you're looking for. I can't find any information on how to do this, and I'm guessing I just can't find the right terminology.
Does anybody have the right verbiage for me or can anybody point me to a website that explains the process? Thanks, DanI got ya. Thanks for your help.
Any idea what size they say is "too big" a file for a flash movie on a standard website nowadays? I'm looking at being around 1MB when all is said and done (assuming I use the loader to pull some of the bigger things from external files).
Thanks, Dan -
I created a captivate movie and published it into a swf. I
need to play this in Flash. I created a MC blank placeholder and
added a behavior. However, it errors with a very long message,
stating it can't find any of the children. Helpok great - i never use behaviors, so looked this one up. but
something else is confusing here - you say '...find any of the
children' is the error you're getting - this would indicate that
your using AS3 (i thought i saw that in another of your posts as
well) and behaviors only work under AS2 - so that's a bit odd
really LOL! :) however, the behavior uses loadMovieNum and
LoadMovie methods - so it looks like it's just not 'finding' the
placeholder MC that you've constructed and targeted - check and
make sure you've given an 'instance name' to the placeholder MC -
and that you placed it on the stage. -
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. -
Loading a Movie that Loads other Movies
Hi All,
I am working on a kiosk. There are two seperate versions of
the kiosk, one in english and one in spanish. Both of these
versions are in a seperate folder. I want to create an exe that
will give the user the choice of language and then load that
version. Unfortunately, the seperate versions of the kiosks also
load external movies. So for example, when I load the english
version it is looking for the external swf in the same directory of
the movie that is loading it.
Is there any way around this? I want to basically "lock" the
loaded movie so that any calls to external swf's refer to the
directory structure of the loaded movie and not the movie that is
calling it. I can't put the external files in the same directory as
the main movie because both versions use files with the same names.
Thanks for any available help!
-=ChrisOkay, here is a simplified example of my directory structure:
|-Main.exe
|--------------- spanish folder
|---------------------------------spanish.swf
|---------------------------------Content Folder
|------------------------------------------------content1.swf
|------------------------------------------------content2.swf
|------------------------------------------------content3.swf
|--------------- english folder
|---------------------------------english.swf
|---------------------------------Content Folder
|------------------------------------------------content1.swf
|------------------------------------------------content2.swf
|------------------------------------------------content3.swf
Main.exe gives the user the choice to select English or
Spanish. If the user selects English, then english.swf is loaded
into main.exe. However, when english.swf is loaded, it no longer is
able to load content1.swf from the content folder. I understand
that I can change the path in english.swf to make it work, but
there are a great deal of paths that would need to change. Is there
any way to lock the loaded movie(english.swf) so that any calls to
external swf's(content1.swf) refer to the directory structure of
the loaded movie(english.swf) and not the movie that is calling it
(main.exe). Thanks again!
-=Chris -
Is it possible to load an external swf at a specific frame?
Hey! I've got a flash file which acts as the main menu for a
program I'm developing. Everything works fine from the main menu
however when you click to return to the main menu the whole main
menu file reloads. Is it possible to use loadMovieNum( ) to go to a
specific frame within the main swf file? If not, is there a way to
do this?
Here's the button code I'm using now:
on (release) {
unloadMovieNum(0); //unloads the current movie so we can
reload the main menu
loadMovieNum("DemoMainMenu.swf", 0); //reloads the main menu
Thank you for whatever help you can provide! :)mcommini wrote:
> Hey! I've got a flash file which acts as the main menu
for a program I'm
> developing. Everything works fine from the main menu
however when you click to
> return to the main menu the whole main menu file
reloads. Is it possible to
> use loadMovieNum( ) to go to a specific frame within the
main swf file? If
> not, is there a way to do this?
First let me clarify one thing with you. Level zero is the
main level on the flash
player. By loading things in level zero you will remove
current content and replace
it with the new one. This is not a good idea because it works
like purge, clears the
player and from there on you can't maintain any functionality
unless you reload the
whole html document over again. Also, do not unload and load
in the same time in the
same level. Flash can hold single SWF per level, once you
load content, whatever previously
loaded will be automatically replaced, so just the loadMovie
action and you all set.
Good practice is to have the main level (zero) an empty base
and than load and unload
things in above levels, 1 and so on...
> Here's the button code I'm using now:
> on (release) {
> unloadMovieNum(0); //unloads the current movie so we can
reload the main menu
> loadMovieNum("DemoMainMenu.swf", 0); //reloads the main
menu
> }
>
In regard to the load and go to. Yes it is possible but no
matter what frame you want to
go to,you need to load the whole movie first. I will come
back to that in a second.
While you execute the loadMovie action, you can set up a
variable, for example:
loadMovieNum("file.swf", 1);
Variable="mcommini_01";
Than in the loaded movie you have preloader which makes sure
that the movie is loaded before
playing and once done loading, make it jump to frame which
has IF ELSE condition in some kind
of loop, using setInterval or Enterframe. That condition
checks for the variable value and based
on it proceed to particular frame.
That's why I told you not to clear level zero, if you set
variable and load movie in that level
in the same time, all the information will be gone and you
have totally no reference point to
get the variable from.
You could as well use shared object which is native form of
Flash's cookies. Write SOL file into
user drive temp folder, than read it from the other file and
go to frame based on the given value.
Best Regards
Urami
Beauty is in the eye of the beer holder...
<urami>
If you want to mail me - DO NOT LAUGH AT MY ADDRESS
</urami> -
GotoAndPlay specific frame in external swf from main swf
I have a main swf that loads 2 external swfs.
I click on button to see content of external swf #1 and see stuff. I do something that causes external swf to show other stuff (i.e. not at beginning state)
In the main swf I click on button to see content of external swf #2. External swf #1 content is made invisible and I see content of external swf stuff.
NOW, if I click on button to take me back to see external swf #1, I see it's content in current state. I want to force it to start over again at frame #1 which will reset content.
However, no matter what I try, I can't seem to control which frame to go to in external swf using gotoAndplay.
Here is code in frame #1 of main swf to load external swfs:
//load academic movie
var swfLoader1:Loader = new Loader();
container1.addChild(swfLoader1);
var url1:URLRequest = new URLRequest("academic.swf");
swfLoader1.load(url1);
//load wisdom movie
var swfLoader3:Loader = new Loader();
container3.addChild(swfLoader3);
var url3:URLRequest = new URLRequest("wisdom.swf");
swfLoader3.load(url3);
Here is code in frame 2 of main swf that checks button to see where to go in external swf:
//academic button clicked
function academicClick(event:MouseEvent){
container3.alpha = 0;
container3.visible = false;
container1.visible = true;
container1.gotoAndPlay(1); //this is where I am trying to force it to start at frame 1
container1.alpha = 1;
I don't want to reload the external movie to force it to start over.
Any help would be much appreciated.You can easily control this by making the external swf to load with your movieclip, The below is the code snippet that clear on accessing the specific frame on external swf.
//Loading clips content
var ldr:Loader;
var mcExt:MovieClip;
//Loading
loadswf("external.swf");
function loadswf(tmp:String):void{
unloadSwf();
ldr= new Loader();
ldr.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, progressListener);
ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, swfLoaded);
ldr.load(new URLRequest(tmp));
function progressListener (e:ProgressEvent):void{
ploader.visible=true;
function swfLoaded(e:Event):void {
mcExt = e.target.content as MovieClip;
ldr.contentLoaderInfo.removeEventListener(Event.COMPLETE, swfLoaded);
mcExt.addEventListener(Event.ENTER_FRAME,onEnterfn);
ploader.visible=false;
addChild(mcExt);
//UnLoading
function unloadSwf():void{
if (ldr!=null){
ldr.unloadAndStop();
removeChild(mcExt);
mcExt=null;
//Intervals (The part you work on the specific frame within the external swf
function onEnterfn(e:Event):void{
var num:int=mcExt.currentFrame;
if (num==1) mcExt.play();
if (num==9) {
mcExt.skipmc.addEventListener(MouseEvent.CLICK,skipfn);
function skipfn(e:MouseEvent):void{
mcExt.stop();
mcExt.removeEventListener(Event.ENTER_FRAME,onEnterfn);
gotoAndStop("help");
if (num==mcExt.totalFrames){
mcExt.removeEventListener(Event.ENTER_FRAME,onEnterfn);
gotoAndStop("help");
hope it solve -
Go to specific frame of an external swf?
How can I load a specific frame/label of an external swf
file?
anyone?me,
> How can I load a specific frame/label of an external
> swf file?
First, you load the external SWF file. There are a number of
ways to do
this. I recommend either the MovieClip.loadMovie() method or
the
MovieClipLoader class. This causes the external SWF to be
loaded into a
movie clip container. Once the external SWF has fully loaded,
invoke
MovieClip.gotoAndPlay() on the container clip and specify the
desired frame.
David
stiller (at) quip (dot) net
Dev essays:
http://www.quip.net/blog/
"Luck is the residue of good design." -
Jumping to a specific frame in another movie
I'm wondering how to jump to a specific frame in an external
movie. I'm not using the loadmovie command so I don't think the
_level command will work. I just have two swf movies playing on the
same page. I need to have a button in Movie A when released will go
to a certain frame in Movie B. Thanks!well this certainly should work if the code is on the main
timeline, and there is nothing else. However when you say
'scrubber' do you mean that your 'testing' the movie by pressing
'enter' while in the IDE, so that you're actually 'seeing' the
playhead move? If this is the case, yes, no actions will execute.
To test the swf file, use Ctrl+Enter (or Command+Enter on Mac) to
run an actual 'test' -
Using Flach CS4 and action script 2.0 how do I advance to a specific frame of the main timeline when a movie clip instance come to the end of its timeline?
code on the last frame of your movieclip instance:
_root.gotoAndStop('whatever_frame'); // will work unless this swf is loaded into another swf. in that situation, you should use a relative path to the main timeline (eg, _parent or _parent._parent etc).
Maybe you are looking for
-
Hello friends, In my report I have to display the details of the selection screen. I am having some problem with the date format HOwever when the user changes the settings in the user profile the data format on the report should display as what the u
-
Stop images from losing file size when scaled down?
Ive read this tutorial; http://joedasilva.com/blog/?p=32 and ive just found out that if you scale an image smaller, the file size is permanently decreased, and enlarging the image again will make it pixalated. If im working with images and I want a l
-
I only see Times New Roman. The error message in Adobe Distiller is 'can't find Times-Roman (or Times-Italic or Times-Bold).
-
Mac Mini just boots to grey screen - help!
My trusted mac mini a1176 (intel 1.66GHz) has always worked fine but now it just has a grey screen when it starts. There is no chime, and if I leave it long enough a picture of a file with a ? in it appears. The events leading up to this could have a
-
OSB - Handling multiRef responses?
I have to connect to an Axis webservice which forces multiRef. Does anyone have suggestions for working with the response? Is there any Oracle tools which will help here so I can properly use XPath? (I've also noticed behavior difference between Serv