Calling Swf Files Into Empty Movie Clips
I have a major problem. My freelance site is the main swf file, then the portfolio pieces are a separate swf file. In the portfolio section, scene7, of my main file (flashsite.swf), the background images are all in frame1 over several layers. In the top layer of that scene, I have an empty movie clip, portfoliomovieclip.swf. The actionscript associated with that keyframe is the following:
loadMovieNum("portfoliomovie.swf", _root.portfoliomovieclip);
Portfoliomovie.swf is the actual swf file with my portfolio pieces; portfoliomovieclip.swf is the empty movie clip in scene7 of my main movie, flashsite.swf. What I'm trying to do is call my separate swf file(portfoliomovie.swf) from the server so my portfolio pieces don't increase the file size of my main movie/site(flashsite.swf). Here's my problem. When I preview my main movie or view it on the internet, the swf file that is supposed to be called into the empty clip(portfoliomovie.swf) is all that shows up and nothing else; the rest of my site doesn't show at all. And, on top of that, the separate swf file that's called from the server doesn't work properly. I need help because I can't figure this one out! Thanks!
FlashKit > Flash Help > Flash MX
Posted on: 09-17-2003, 09:27 AM
View Complete Forum Thread with Replies
Sponsored Links:
Empty Movie Clip Calling Images From XML
Hi everyone
I have a main file which calls the external SWF file on mouse over actions.
Within those External SWFs the images are coming through the XML file one by one. Each time the movie clip which was empty initially, loads the image from the local folder according to the path coming from the XML, but how can i show the loading bar before each image loads so in this way even if some one is using low bandwidth internet speed he can see atleast some loading bar instead of blank area.
I have attached the files in a zip folder so that any one can understand the whole thing. Any help would be really appreciated.
Thanks
F.
View Replies !
View Related
Empty Movie Clips And Duplicating Clips
I've been trying to reproduce an animation effect I've seen on the Armani website, but I'm stuck trying to duplicate an empty movie clip with image loaded into it. The duplicates exist and I can move them, but they are invisible. Since the duplicates reside on depths above the intitial clip I'm confused about why they are invisible. The duplicates are scripted to follow behind the initial clip - each offset by 30 pixels (though I don't have that working perfectly).
I'm attaching a simplified version of my file to isolate just the duplication troubles. Thanks for the help!
View Replies !
View Related
Masking Empty Movie Clips
I am having a litte difficulty doing a set mask to a empty movie clip. here is my code from a button, the mask's instance name is "mask" and the position is set on the stage where the pic is placed. Any help would be greatly appreciated.
on(release){
createEmptyMovieClip("pic" , "");
_root.pic.loadMovie("test.jpg","");
_root.pic._x = 15;
_root.pic._y = 15;
_root.pic.setMask(_root.mask);
}
www.laker.net
View Replies !
View Related
Pre-Loaders And Empty Movie Clips
hello,
I am trying to design my first sight by loading .swf's into empty movie clip, but I am having difficulty with the progress bar pre-loader. I am not sure how to access the proper level to for the progress bar to reference.
here is a sample of some of the script:
loadpercent = "0%";
loadBytes = "0%" + Math.round(("_root.play.getBytesTotal()" /1024) * 1000) /1000 + "Kb";
the empty movie clip is named "play". There is an. fla attached.
I hope this is enough information!!!!
thanks
View Replies !
View Related
Buttons And Empty Movie Clips
ok...heres what i have
my main movie has a menu, and two empty movie clips named
SMALLSTAGE & BIGSTAGE.
in the menu i have a button named
"photographs"
when clicked it loads "pics.swf" into my "SMALLSTAGE" movieclip
"pics.swf" has 3 buttons in it.
i want those buttons to load their corresponding "*.swf" files into
the "BIGSTAGE" movieclip.
i'm sure this is easy..but i keep trying differnt things and i just
can't seem to make it work.
PLEASE HELP....OH GOD PLEASE HELP!?!?!?
wanna look at the clip?
http://www.knuckle.ca/new/newpage.html
View Replies !
View Related
Creating 75 Empty Movie Clips?
hey... i have an action that i want to carry out 75 times with a different pic each time...
and i know i could just paste this code 75 times then go back in and change the numbers beside each varrible
but i would think there is an easer way...
heres my action
Code:
_root.createEmptyMovieClip(("pic1"),1000);
_root.pic1.loadMovie("http://www.the-quota.com/cabo/"+_root.picture);
_root.pic1._xscale = 20
_root.pic1._yscale = 20
does anybody know what i could do?
View Replies !
View Related
Empty Movie Clips Vs LocalConnection
I was trying to use LocalConnection to create this site, but it was being too difficult to find the right code to do it since i could only find tutorials and examples using .text but anyways, I achieved the same result by just using an empty movie clip to run my movie, now... my question is this... can i run the whole site with empty movie clips, or would i enconter any anomalies while having many files/pages/documents?...
View Replies !
View Related
Arrays And Empty Movie Clips
I am trying to figure this out but I am beating my brain about it and I need some fellow Flash geek help.
I am creating an interface where a child can choose the number of games they want to play. When they click ENTER, they are taken to another screen where they choose the games they want to play. When they choose a game it adds the name of the game in the array. Once the number of games they wanted are chosen, they are taken to the "Game Play" screen. Here is where I have hit the snag...
Each game has an icon that represents that game. What I am trying to do is only have the icons of the games they chose on the screen and not the icons of ALL the games. I have 12 empty movie clips on the screen (one for each icon). I tried to use attachMovie and attach the movie clip to the empty movie clip using the names in the array but it doesn't work. I used this basic code:
tasksArray = new Array;
tasksArray[0] = "task01_mc";
tasksArray[1] = "tasks02_mc";
for(x=0; x < tasksArray.length; x++){
var num:Number = x + 1;
empty0[num]_mc.attachMovie(tasksArray[x], "empty0[num]_mc",1);
}
Unfortunately I get a syntax error with this code because of the _mc after [num].
I have traced out the array to see if everything is in there and it is correct.
Help! Something like this is usually no problem for me and I can think it through but I need some help on this one. I am probably just overthinking.
If anyone can help I would really appreciate knowing what I am doing wrong OR if someone has a better way of doing this.
View Replies !
View Related
Unloading Empty Movie Clips?
Basically,
on my flash site i've been loading external .swf files by
using the createEmptyMoiiveClip method. . . like so :
PHP Code:
on (release) {
createEmptyMovieClip("imageholder22", 111);
imageHolder22._x = 210;
imageHolder22._y = 0;
loadMovie("X_Main_NewNews.swf", "imageholder22");
}
Only problem is, is that i need to unload them
when i load a second external movie clip in the same location
i've tried using the unloadmovie + removemovieclip method
but it doesnt work
i dont want to load a movie over the inital movie as i need
to load the inital movie once the second movie is unloaded!
u get me?
help!!!!!!!!!!!!!!!!!!!!!!
View Replies !
View Related
Creating Empty Movie Clips
I'll be brief, I know I can do this:
var mc:MovieClip = new MovieClip();
But how do I do the following (written in older code of course)?:
for (var i:Number=1; i<numPics; ++i) {
this.createEmptyMovieClip("picHolder"+i, i)
}
I'm still learning, so be gentle with me. Any input appreciated greatly,
Dan P.
View Replies !
View Related
Choosing Where You Want Your Empty Movie Clips
hello,
I want to create a full flash site. I have my main back ground and I have an area where I want to create an Empty Movie Clip so that I can load other swf files to act as link in website. What tool do I use (or code to write) to select a rectangular area where I want an Empty Movie clip to show other Movies Clips and content I have for my page. If this is confusing I'll try it again.
Thanks
View Replies !
View Related
Pre-Loaders And Empty Movie Clips
I am trying to load contact.swf into an empty movie clip found within a file called main.swf . The instance name of the empty movie clip is"play".
At the start of my .swf that I am attempting to have a progress bar that indicates the percentage loaded. I've inserted five frames at the beginning of the contact.swf and the following details the scripting found on each frame:
1)
2)loadpercent = "0%";
loadBytes = "0%" + Math.round((_root.play.getBytesTotal() /1024) * 1000) /1000 + "Kb";
3)if (_root.play.getBytesLoaded() == _root.play.getBytesTotal()) {
loadPercent = "100%";
loadBytes = (Math.round((_root.play.getBytesLoaded() / 1024) * 1000) /1000 + "Kb of" + Math.round((_root.play.getBytesTotal() / 1024) * 1000) /1000 + "Kb total Loaded.");
gotoAndPlay("start");
}
4)gotoAndPlay (2);
5)stop ();
Then there is a movie clip within contact.swf named
mc-LoadBarFill which contains a grey bar located to the right of the centre point. Here is the scripting found in the frames:
1) this._xscale = ((_root.play.getBytesLoaded() / _root.play.getBytesTotal()) * 100);
2) gotoAndPlay (1);
When I load the main.swf and click on the link to contact.swf, the pre-loader doesn't work. Is there something wrong with my scripting?
thanks..
View Replies !
View Related
If/else And Data In Empty Movie Clips.
Hi everyone, long time no post. Just wondering if its possible to get AS to find out whether a swf has been loaded into a emptymovieclip? E.g. A if else statement to have AS do this or that depending on whether there is a movieclip in the empty movieclip. Anyhelp is as always much appreciated.
thanks in advance legion.
View Replies !
View Related
Scrolling Empty Movie Clips
I did a search for this through the forum, but didn't come up with anything conclusive. I have created an empty movie clip, and attached it to load an external swf file. Everything works well, except that the contents of the external swf file spill over the parameters of the empty movie clip when it's loaded, and onto the rest of the layout. What I would like to know how to set it so that the contents of the swf file stay within the box that is the empty movie clip, and have the empty movie clip scroll the loaded content, which is composed of some pictures and text. Thank you in advance for you help.
View Replies !
View Related
AS 2 Empty Movie Clips Not Loading
I am trying to make a video player that after it is done playing it will pop up 3 choices for the user to choose from and play the next video. It all works when i test it on my machine, but when i put it up on a test site nothing loads into the empty movie clips that i have in the player. Any help would be great... i have tried everything i can think of and i am going crazy...
View Replies !
View Related
Choosing Where You Want Your Empty Movie Clips
hello,
I want to create a full flash site. I have my main back ground and I have an area where I want to create an Empty Movie Clip so that I can load other swf files to act as link in website. What tool do I use (or code to write) to select a rectangular area where I want an Empty Movie clip to show other Movies Clips and content I have for my page. If this is confusing I'll try it again.
Thanks
View Replies !
View Related
[as2] Creating Empty Movie Clips
I have a problem:
Code:
onClipEvent(load){
_alpha=0;vis=100;
_parent.createEmptyMovieClip('imga',-10);
_parent.createEmptyMovieClip('imgb',-10);
_parent.createEmptyMovieClip('imgc',-10);
_parent.imga.loadMovie('img/ident/img/img1.jpg');
_parent.imgb.loadMovie('img/ident/img/img2.jpg');
_parent.imgc.loadMovie('img/ident/img/img3.jpg');
}
onClipEvent(enterFrame){
_parent.imga._x=0;
_parent.imgb._x=267;
_parent.imgc._x=513;
_alpha+=(vis-_alpha)*.4;
if((_parent.imga.getBytesLoaded()==_parent.imga.getBytesTotal())and(_parent.imgb.getBytesLoaded()==_parent.imgb.getBytesTotal())and(_parent.imgc.getBytesLoaded()==_parent.imgc.getBytesTotal())){
vis=0;
}
}
I need to create 3 new Movie Clips and load jpgs using these new clips. This code I posted is from an mc controller. Testing the movie, I note that only the last one mc was created and worked loading the jpg.
Anyone know why this is happening? Why can't I create 3 mcs in just one time?
View Replies !
View Related
Using Empty Movie Clips To Store Variables
I'm trying to find a way to store my data (i.e., variables) as I load .swfs on several levels. I've heard that a good way to do this is to send it to an empty movie clip which each of the .swfs access. Has anyone done this? Can you give me an example, including paths?
Much Thanks,
Rick
View Replies !
View Related
Loading Images Into Empty Movie Clips
Can anyone tell me how to load an image called "frame.png" into an empty movie clip on the stage called "frame"?
I tried doing this on the first frame of the main timeline (there is only one frame in the movie so far)
loadMovie("images/frame.png", "frame");
This doesn't work. What am I doing wrong?
Thanks
View Replies !
View Related
Generate Empty Movie Clips W/ Scrollbar
Hi,
I'm looking to create an app where I can dynamically load images into it, and control them with a scrollbar. Take a look at this image if you don't understand what I mean:
http://www.ianarmstrong.com/1.jpg
What I'm looking for is some tutorials to give me ideas on how best to go about this. I'm getting the dynamic info from XML. I need to know how to generate the empty movie clips for all the images, then load the images and have the whole thing controlled with a scrollbar.
View Replies !
View Related
Create Multiple Empty Movie Clips
Ok so basically I have a button that will create a empty movie clip and attach some things into that clip When the button is first clicked. My problem is that when the button is clicked a second time. The clip will reload itself and I need it to duplicate. So if I hit the button 5 times, there would be 5 items on the stage.
Here is what I'm doing.
Code:
hold1.onPress = function(){
trace("your hit me");
_root.createEmptyMovieClip("conHolder",1);
//conHolder.hitArea = conHolder.content;
//_root.attachMovie(conButs,conBut,3)
_root.conHolder.attachMovie("conButs", "conButs", _root.getNextHighestDepth()+1);
_root.conHolder._x = 100;
_root.conHolder._y = 100;
_root.conHolder.startDrag();
//_root.conHolder._x += (_root._xmouse-10-this._x);
//_root.conHolder._y += (_root._ymouse-10-this._y);
_root.conHolder.conButs.hold.loadMovie("icons/couch2Seat.swf",1);
}
Thanks for all and any help.
View Replies !
View Related
Duplicating Empty Movie Clips With Contents
Ive got a problem i hope some of you actionscript heroes can help me with.
Ive made a emptymovieclip (with createEmptyMovieClip) containing lineTo contents and managed to duplicate that clip. So that works.
BUT....
When i do the same, but with more several empty movieclips inside the original empty movieclip with lineTo contents, the copies from duplicate are empty :P
so this works:
(emptyclip1) with drawing ->
duplicated creates ->
(emptyclip copy) with drawing
but not:
(emptyclip1) with (many emptyclips) with a drawing in each ->
duplicated creates ->
(emptyclip copy) with nada :P
What im hoping for is this:
(emptyclip1) with (many emptyclips) with a drawing in each ->
duplicated creates ->
(emptyclip copy) with with (many emptyclips) with a drawing in each
so.. anyone else had this problem and solved it?
View Replies !
View Related
Creating Empty Movie Clips And Loading Swf
K guys i have another dilemma. Can you believe it? heh. I have text on my main page and buttons that load text into my main text. I have another page that creates and empty movie clip and loads a swf file in it. It has thumbnail buttons on it that are going to launch pictures. K heres my question.
How do i get rid of the text once i create my movie clip and load my swf file? Is there script i can use to clear out the text? Basically the text is still visible below my movie clip. Also when i click on my text button i want it to come back and the movie clip to dissapear. I have no idea if this is possible. I tried going to another frame but the buttons go berserk when i do this. My buttons dont work anymore.
Thanks
Stan
View Replies !
View Related
Empty Movie Clips - Navigation Issue
I'm pretty new to site building so bare with me.
I'm building a site with empty movie clips on each page to provide navigation to other pages. I'm testing linkage between two pages, (home page and news page) When I load the home page, everything works fine, I click the link to my news page, and it loads in fine, BUT when I click back to home from the news page, the home page starts playing nested movie clips that should NOT be auto-playing.
So basically, I have nested movie clips that decide to play when I click to my home page from another page. If I load the home page by itself however, it functions properly. Why are these nested clips playing?
Here is the action script for the nested movie clips as an example:
_root.rightChair.onEnterFrame = function() {
if (mouse_over_rightChair) {
_root.rightChair.nextFrame();
} else {
_root.rightChair.prevFrame();
}
};
Basically they should not be playing unless a mouse rolls over them.
Thoughts anyone?
-Stephen
View Replies !
View Related
Creating Dynamic Empty Movie Clips?
Hi,
I'm looking to create an app where I can dynamically load images into it, and control them with a scrollbar. Take a look at this image if you don't understand what I mean:
http://www.ianarmstrong.com/1.jpg
What I'm looking for is some tutorials to give me ideas on how best to go about this. I'm getting the dynamic info from XML. I need to know how to generate the empty movie clips for all the images, then load the images and have the whole thing controlled with a scrollbar.
View Replies !
View Related
Loading Videos As Empty Movie Clips?
Hi,
I have a encountered a problem. Is it possible to load a swf file as an empty movie clip to show a video in that certain area u want it to load in when you press the link for it? Now I've coded everything right to my knowledge, but the clip won't load properly and I don't even know why. Can someone, anyone possibly help me with my issue please? Thanks in advance.
http://www.razme.com/media.swf
http://www.razme.com/razbeatz.swf
View Replies !
View Related
Creating Empty Movie Clips In A Class
I have a project in which I am using classes...
I want to use a class in where from a xml object I create an array of movie clips using createEmptyMovieClip ..but I can't figure out how...
here is a my code
class classes.Patratel extends MovieClip
{
var mcPatratel:MovieClip;
function Patratel(_parinte:MovieClip)
{
this.mcPatratel =_parinte;
createMc();
}
function creazaMc()
{
var mcTemp:MovieClip=new MovieClip();
this.mcPatratel.createEmptyMovieClip("mcTemp",this .mcPatratel.getNextHighestDepth());
mcTemp.beginFill(0x009000,100);
mcTemp.lineTo(100,0);
mcTemp.lineTo(100,100);
mcTemp.lineTo(0,100);
mcTemp.lineTo(0,0);
mcTemp.endFill();
}
}
View Replies !
View Related
Empty Movie Clips From Multidimensional Array
Does anyone know why I keep getting "undefined" with this code? I'm trying to create some empty clips - each using the name of the "holder" element in the array below:
ActionScript Code:
var DIR:String = "";var groupinfo:Array = [{mc:overview, display:"overview", toload:DIR+"overview.jpg", holder:image1_holder}, {mc:capabilities, display:"capabilities", toload:DIR+"capabilities.jpg", holder:image2_holder}, {mc:case_studies, display:"case studies", toload:DIR+"case_studies.jpg", holder:image3_holder}, {mc:clients, display:"clients", toload:DIR+"clients.jpg", holder:image4_holder}, {mc:news, display:"news", toload:DIR+"news.jpg", holder:image5_holder}, {mc:recognition, display:"recognition", toload:DIR+"recognition.jpg", holder:image6_holder}, {mc:contacts, display:"contacts", toload:DIR+"contacts.jpg", holder:image7_holder}];for (var j:Number = 0; j < groupinfo.length; j++) { var holderName:String = groupinfo[j][4]; _root.createEmptyMovieClip(holderName, j+900, {_x:93, _y:84}); trace(holderName);}
View Replies !
View Related
Create Multiple Empty Movie Clips
Ok so basically I have a button that will create a empty movie clip and attach some things into that clip When the button is first clicked. My problem is that when the button is clicked a second time. The clip will reload itself and I need it to duplicate. So if I hit the button 5 times, there would be 5 items on the stage.
Here is what I'm doing.
Code:
hold1.onPress = function(){
trace("your hit me");
_root.createEmptyMovieClip("conHolder",1);
//conHolder.hitArea = conHolder.content;
//_root.attachMovie(conButs,conBut,3)
_root.conHolder.attachMovie("conButs", "conButs", _root.getNextHighestDepth()+1);
//_root.conHolder._x = 100;
//_root.conHolder._y = 100;
_root.conHolder.startDrag();
_root.conHolder._x += (_root._xmouse-10-this._x);
_root.conHolder._y += (_root._ymouse-10-this._y);
_root.conHolder.conButs.hold.loadMovie("icons/couch2Seat.swf",1);
}
Thanks for any help.
View Replies !
View Related
Creating Empty Movie Clips In A Class
Hy all...
Here is my problem
I have a fla that has only this code
var x:Myclass = new MyClass("myxml.xml");
and it should take the information from xml and convert it into movie clips using classes
to do that I use this class
class classes.Patratel extends MovieClip
{
var mcPatratel:MovieClip;
function Patratel(_parinte:MovieClip)
{
this.mcPatratel =_parinte;
}
function createMc()
{
var mcTemp:MovieClip=new MovieClip();
this.mcPatratel.createEmptyMovieClip("mcTemp",this.mcPatratel.getNextHighestDepth());
mcTemp.beginFill(0x009000,100);
mcTemp.lineTo(100,0);
mcTemp.lineTo(100,100);
mcTemp.lineTo(0,100);
mcTemp.lineTo(0,0);
mcTemp.endFill();
var my_color:Color = new Color(mcTemp);
if (this.fundal=="negru") my_color.setRGB(0x009900);
if (this.fundal=="albastru") my_color.setRGB(0x0099FF);
}
}
And in MyClass I call something like this
var dDefefinitie =new Definitie(parent)
where parent was this and _root
and when i debug it it look like this
this.parent.parent.parent./.......and it never end
Please give me a link to something ..how I create movieclips inside classes....
View Replies !
View Related
Creating Empty Movie Clips, Moving Them, And Masking
I read a few of the tutorials on the site to get to where I am now. However, I've tried multiple variations of this code and I can't seem to get it to do what I want.
This is what I'm trying to do:
All of this will be on a button Rollover event.
There will be a picture (the pic will change based on which button is rolled over).
On rollover, there will be a series of 15x15 black(or any color) boxes created that are masks and will slide from left to right on the screen stopping 1 or 2 pixels apart and creating a grid through which you can see the photo underneath. The area this grid will cover will be 15 boxes wide and 10 high (also, don't forget to account for the 1 or 2 pixel border in between each box).
The code I've created is attempting to start these boxes at a y value that increases by 16 (or 17 depending on border width) EVERY time until it's done 10 boxes and then the y value resets to the original value to start the next column. It also uses "mc_tween2.as"... the include statement is in the first frame of my movie. So, I'm also attempting to xSlide the movie clips to a certain ending x value which will change after 10 movie clips.
I'm trying to get it to do all of this within 3 seconds. That means creating 150 (50 per second) movie clips and having them all slide in to expose the underlying picture.
It's not working. It freezes and then a few seconds later says "flash is running slow...blahblah... would you like to abort the script". Any suggestions you guys could make would be incredible. I'm also open to doing this a different way. I've thought about cutting the picture into 150 different small movie clips and sliding them in, but I haven't the foggiest idea how to even START that procedure.
Here's the code:
Code:
x = -350;
y = 58;
_root.wait = 1;
ercogHit_btn.onRollOver = function() {
ercog_mc.scaleTo(300, 1.5, "easeOutElastic"); //movie clip that scales when button is rolled over using "mc_tween2.as"
for (i=1; i<=151; i++) {
for (delayTime=0; delayTime<=1; ) {
if (Math.floor(getTimer()/20) == _root.lastTime+_root.wait) {
_root.lastTime = Math.floor(getTimer()/20);
createEmptyMovieClip("clip"+i, i);
y += 17;
if (y == 245) {
y = 75;
}
with (clip+i) {
moveTo(x, y);
beginFill(0x000000);
lineTo(x+15, y);
lineTo(x+15, y+15);
lineTo(x, y+15);
endFill();
slidingMovie(i);
}
}
delayTime = ((Math.floor(getTimer()/20)-_root.lastTime));
}
i++;
}
};
function slidingMovie(i) {
xFactor = i;
if (((xFactor/10)-previousFactor)>1) {
endingPosition = 151;
this.xSlideTo(endingPosition-(previousFactor*17), .1, "linear");
previousFactor++;
}
}
View Replies !
View Related
Loading 4 Different SWFs With Sound Into 4 Different Empty Movie Clips?
Okay I posted this into the ActionScript 2.0 Forum, but I'm not sure that's the exact category so here it goes again, just in case...
I'll try to make a long story short: I have 4 diffferent SWF files containing music loops activatd via ActionScript inside them. Well, I am doing a music player that:
1) Loads randomly one of those 4 SWFs.
2) After it has been loaded, it makes the music start playing, displays the usual STOP and PLAY buttons, and then starts loading the 3 remaining SWFs.
3) After these 3 remaining music SWFs have loaded, it displays the Previous Track / Next Track buttons.
I've been trying this with two different techniques:
1) Loading the SWF files with loadMovieNum.
Assuming the random number is 3, I would use
loadMovieNum("arriba3.swf",23);
... so these 4 files are loaded into levels 21 to 24.
2) Loading the SWF files into an empty movie clip.
I used a technique explained in http://www.flashguru.co.uk/000044.php
So I create a new empty movie clip; its instance name is holder1 to holder4, and its depth is 1 to 4, both depending on the random number.
These two methods are okay, but when I start loading the other 3 music SWFs, the music that is playing suddenly stops. It happens Whether I use the 1st or 2nd approach, but let's have a look at the second use, which seems more comfortable to use...
... It seems like the empty movie clip that I create is being "overwritten" by the new ones. Here's the code I use to load the first movie randomly:
Code:
// Generate a random number between 1 and 4
pelicula = Math.round(Math.random()*3) + 1;
trace(pelicula);
this.createEmptyMovieClip("holder"+pelicula,1);
contenedor = eval("holder" + pelicula);
contenedor.loadMovie("arriba"+pelicula+".swf");
//check the download status of the external movie once every frame
this.onEnterFrame=function(){
//trace the percentage of the movie that has loaded
percent=(this.contenedor.getBytesLoaded()/this.contenedor.getBytesTotal())*100;
if(!isNan(percent)){
trace(percent+"% loaded");
}else{
trace("0% loaded");
}
if(percent == 100){
delete this.onEnterFrame;
gotoAndPlay(3); // here I make the music start playing
}
}
And here's the moment when I load the other 3 SWFs, and when the music stops playing:
Code:
switch (pelicula) {
case 1:
this.createEmptyMovieClip("holder2",2);
holder2.loadMovie("arriba2.swf");
this.createEmptyMovieClip("holder3",3);
holder3.loadMovie("arriba3.swf");
this.createEmptyMovieClip("holder4",4);
holder4.loadMovie("arriba4.swf");
case 2:
this.createEmptyMovieClip("holder1",1);
holder1.loadMovie("arriba1.swf");
this.createEmptyMovieClip("holder3",3);
holder3.loadMovie("arriba3.swf");
this.createEmptyMovieClip("holder4",4);
holder4.loadMovie("arriba4.swf");
case 3:
this.createEmptyMovieClip("holder1",1);
holder1.loadMovie("arriba1.swf");
this.createEmptyMovieClip("holder2",2);
holder2.loadMovie("arriba2.swf");
this.createEmptyMovieClip("holder4",4);
holder4.loadMovie("arriba4.swf");
case 4:
this.createEmptyMovieClip("holder1",1);
holder1.loadMovie("arriba1.swf");
this.createEmptyMovieClip("holder2",2);
holder2.loadMovie("arriba2.swf");
this.createEmptyMovieClip("holder3",3);
holder3.loadMovie("arriba3.swf");
}
this.onEnterFrame=function(){
//trace the percentage of the movie that has loaded
switch (pelicula) {
case 1:
percenta=(this.holder2.getBytesLoaded()/this.holder2.getBytesTotal())*100;
percentb=(this.holder3.getBytesLoaded()/this.holder3.getBytesTotal())*100;
percentc=(this.holder4.getBytesLoaded()/this.holder4.getBytesTotal())*100;
case 2:
percenta=(this.holder2.getBytesLoaded()/this.holder2.getBytesTotal())*100;
percentb=(this.holder3.getBytesLoaded()/this.holder3.getBytesTotal())*100;
percentc=(this.holder4.getBytesLoaded()/this.holder4.getBytesTotal())*100;
case 3:
percentb=(this.holder1.getBytesLoaded()/this.holder1.getBytesTotal())*100;
percenta=(this.holder2.getBytesLoaded()/this.holder2.getBytesTotal())*100;
percentc=(this.holder4.getBytesLoaded()/this.holder4.getBytesTotal())*100;
case 4:
percentc=(this.holder1.getBytesLoaded()/this.holder1.getBytesTotal())*100;
percenta=(this.holder2.getBytesLoaded()/this.holder2.getBytesTotal())*100;
percentb=(this.holder3.getBytesLoaded()/this.holder3.getBytesTotal())*100;
}
if(!isNan(percenta)){
//trace(percenta+"% loaded, " + percentb+"% loaded, " + percentc+"% loaded, " + );
}else{
trace("0% loaded");
}
if((percenta == 100) && (percentb == 100) && (percentc == 100)){
delete this.onEnterFrame;
gotoAndPlay(11);
}
}
Is that the reason for the music to stop? The first movie being overwritten by the new ones, I mean...
Thanks a lot in advance,
Angel.
View Replies !
View Related
How Do I Load Two External Swf's In Empty Movie Clips At The Same Time? Help...
Sorry if the title is a bit confusing.
OK, I have a swf of a menu that I need to load when a link is selected. All external pages I have at the moment load into one empty movie clip in a file called index.swf. However, I need my menu to load in another (side nav) movie clip as specfic links are selected from another navigation area. Right now, I have a news scroller, which is part of my index.swf page so it currently does not change as the external swf's load. But, I'd like that to change once links from another bottom navigation menu in the index.swf are clicked instead of just loading the external files in one place, I'd like the menu to load into its own side movie clip accordingly.
Does this make sense? When a button from the already existing nav on index.swf is selected, I need 2 external swf's (the new side menu to replace the news as well as the existing main movie clip) to load instead of just one.
The solution would seem to be a simple, but I'm a novice (steadily learning), so I'm having trouble figuring it out.
Also, existing movie clip that loads the swf's into index.swf covers the height and width of index.swf like Kirupa's full site tutorial (as my site is a full site as well).
To relate my problem to that tutorial, which I followed feverishly, I have two nav area's instead of one, one exists (is constant) on index.swf, the other will load into a new movie clip as a side nav menu.
I'm using MX (not 2004) by the way.
Any help is much appreciated.
Thanks
View Replies !
View Related
How Do I Load Two External Swf's In Empty Movie Clips At The Same Time? Help...
Sorry if the title is a bit confusing.
OK, I have a swf of a menu that I need to load when a link is selected. All external pages I have at the moment load into one empty movie clip in a file called index.swf. However, I need my menu to load in another (side nav) movie clip as specfic links are selected from another navigation area. Right now, I have a news scroller, which is part of my index.swf page so it currently does not change as the external swf's load. But, I'd like that to change once links from another bottom navigation menu in the index.swf are clicked instead of just loading the external files in one place, I'd like the menu to load into its own side movie clip accordingly.
Does this make sense? When a button from the already existing nav on index.swf is selected, I need 2 external swf's (the new side menu to replace the news as well as the existing main movie clip) to load instead of just one.
The solution would seem to be a simple, but I'm a novice (steadily learning), so I'm having trouble figuring it out.
Also, existing movie clip that loads the swf's into index.swf covers the height and width of index.swf like Kirupa's full site tutorial (as my site is a full site as well).
To relate my problem to that tutorial, which I followed feverishly, I have two nav area's instead of one, one exists (is constant) on index.swf, the other will load into a new movie clip as a side nav menu.
I'm using MX (not 2004) by the way.
Any help is much appreciated.
Thanks
View Replies !
View Related
Aligning Dynamically Loaded Images Within Empty Movie Clips
Hey Guys,
this might be a stupid question, but if I create an empty movie clip and dynamically load a jpg into it, is there a way to align it to the right? At the moment the image's top left corner will be put at the top left corner of the emptymovieclip. I want to put the top right corner of the jpg and align it right inside the movie clip. Is that possible?
Matt
View Replies !
View Related
AttachMovie - Looping Thru An Array To Attach 6 Movie Clips Into An Empty Clip
Heres my issue...
Im loading in 6 different external icon button images using an XML file into an movieclip. well now i dont want external images to load from an xml file, i want the images to be inside flash in the library. I gave them a linkage name and made an array of them called menuIcons.
how do i get my icon images to load into flash without loading external images from an xml file...
heres my code..
var xml:XML = new XML();
xml.ignoreWhite = true;
xml.onLoad = function()
{
var nodes = this.firstChild.childNodes;
numOfItem = nodes.length;
for (var i=0; i<numOfItem; i++)
{
menuIcons = ["healthySkin", "environMoist", "lowerSkin", "drySkin", "waterInfusion", "healthyCellular"];
var t = home.attachMovie("item", "item" + i, i + 1);
t.angle = i * ((Math.PI * 2)/numOfItem);t.onEnterFrame = mover;
t.nameClip = (nodes[i].attributes.nameClip);
t.content = (nodes[i].attributes.content);
t.icon.inner.loadMovie(nodes[i].attributes.image);t.icon.onRollOver = over;
t.icon.onRollOut = out;
t.icon.onRelease = released;
}
}
thanks
slalonde44
View Replies !
View Related
Calling Movie Clips?
its been a long while since i've used flash, in fact its my first tiem with MX, before i was working with Flash5.
I'm looking to call an instance of a MC when clicking a button, to give a rollover effect for the button, then after rolling out it plays the 2nd animation of the effect disappearing, kinda like Button #1 here:
http://www.jpsnetwork.com/hosted/jas...ton_tests.html
however, i want to do it so that when i rollover, its not in the same MC, i want to call an instance of those lines,
if i remember correctly, in flash5 it would be:
_root.lines.gotoAndPlay(2);
but this is not working in MX, can anybody help me?
thanks
View Replies !
View Related
Calling/loading Movie Clips...
Hi flashers, got a little problem...
Can I call/load a movie clip that is in the library (not an instance) from the scene (using a button) and without changing of keyframe?.
I'm in the scene, with an only keyframe and i want to press a button that loads/calls a movie clip, is that possible?
Thanx lads.
View Replies !
View Related
Calling Vars From Within Movie Clips?
If I set a var on the main stage (i.e. _level0), how can I access it and read its data from within a movie clip? I've tried calling it from within a tell_target ("_level0") command but it still can't find the var, only on the main stage.
By the way this is Flash 4. Have MX but this needs to be done in v. 4.
Help anxiously required and appreciated, and thanks to all who helped before.
View Replies !
View Related
Calling Vars From Within Movie Clips?
Apologies for posting this on two forums, wasn't sure where it would be better suited:
If I set a var on the main stage (i.e. _level0), how can I access it and read its data from within a movie clip? I've tried calling it from within a tell_target ("_level0") command but it still can't find the var, only on the main stage.
By the way this is Flash 4. Have MX but this needs to be done in v. 4.
Help anxiously required and appreciated, and thanks to all who helped before.
Kind regards.
View Replies !
View Related
Calling Out Movie Clips-won't Reappear
Flash MX:
sorry for cross-posting need...help...bad.
i need a MC to appear when i click on a button and to disappear when i click on the CLOSE button within the MC.
On first click the MC appeared, fine. Problem is, after i've clicked on the CLOSE button to close the MC, the MC refuse to reopen when i try to click on it.
i use this code on the button to call out the MC:
on (release) {
aboutus._visible = true;
gotoAndPlay("aboutus");
}
And this one on the CLOSE button to close the MC:
on(release) {
this.gotoAndplay("fade");
}
the button that calls out the MC just would not work after the first click. whar went wrong?
h-e-l-p...
View Replies !
View Related
Calling Movie Clips In Other Movies?
I have a movie clip in my parent movie, with the instance name of 'am'
I have a button on a child movie, what i am trying to do is when you press a button in that child movie, it calls a frame lable in that movie clip thats on the parent movie.
is this possible?
View Replies !
View Related
Calling RemoveEventListener On Dynamic Movie Clips
I'm writing a class that will create an XML-powered slideshow. During the image transition I want to remove the Mouse Click listener on all image thumbnail movie clips so the user cannot interrupt the current transition. I tried calling event.target.removeEventListener but that doesn't seem to do anything. I also realize I need to create a for loop and call removeEventListener on all thumb mc's but am not sure how since all mc's are created dynamically. Any help would be great. Here is my code:
Code:
package com.creativemess.multimedia
{
import flash.display.*;
import flash.events.*;
import fl.transitions.Tween;
import fl.transitions.easing.*;
import gs.TweenFilterLite;
import gs.easing.*;
import flash.net.*;
public class SlideShow extends MovieClip
{
var dataSource:XML;
var dataList:XMLList;
var dataLoader:URLLoader = new URLLoader();
var imagePath:String;
var imageSmall:String;
var imageLarge:String;
var imageLoaderSmall:Loader;
var imageLoaderLargeOut:Loader = new Loader();
var imageLoaderLargeIn:Loader = new Loader();
var imageDisplaySmall:MovieClip = new MovieClip();
var imageDisplayLarge:MovieClip = new MovieClip();
public function SlideShow (path:String, small:String, large:String)
{
imagePath = path;
imageSmall = small;
imageLarge = large;
dataLoader.load(new URLRequest(imagePath));
dataLoader.addEventListener(Event.COMPLETE, loadImages);
}
private function loadImages (event:Event):void
{
dataSource = XML(event.target.data);
dataList = dataSource.children();
for (var i:int = 0; i < dataList.length(); i++)
{
imageLoaderSmall = new Loader();
imageLoaderSmall.name = dataList[i].attribute(imageLarge);
imageLoaderSmall.load(new URLRequest(dataList[i].attribute(imageSmall)));
imageDisplaySmall = new MovieClip();
imageDisplaySmall.buttonMode = true;
imageDisplaySmall.x = i * 150;
imageDisplaySmall.y = 350;
imageDisplaySmall.addEventListener(MouseEvent.CLICK, tweenLargeImageOut);
addChild(imageDisplaySmall);
imageDisplaySmall.addChild(imageLoaderSmall);
}
imageDisplayLarge.x = 0;
imageDisplayLarge.y = 0;
imageLoaderLargeOut.load(new URLRequest(dataList[0].attribute(imageLarge)));
addChild(imageDisplayLarge);
imageDisplayLarge.addChild(imageLoaderLargeOut);
imageDisplayLarge.addChild(imageLoaderLargeIn);
}
private function tweenLargeImageOut (event:MouseEvent):void
{
event.target.removeEventListener(MouseEvent.CLICK, tweenLargeImageOut);
imageLoaderLargeIn.unload();
TweenFilterLite.to(imageDisplayLarge, .5, {blurFilter:{blurX:30, blurY:30, quality:3}, onComplete:tweenLargeImageIn, onCompleteParams:[event]});
}
private function tweenLargeImageIn (event:MouseEvent):void
{
TweenFilterLite.to(imageDisplayLarge, 1, {blurFilter:{blurX:0, blurY:0, quality:3}, onComplete:displayLargeImage, onCompleteParams:[event]});
imageLoaderLargeIn.load(new URLRequest(event.target.name));
}
private function displayLargeImage (event:MouseEvent):void
{
event.target.addEventListener(MouseEvent.CLICK, tweenLargeImageOut);
imageLoaderLargeOut.unload();
imageLoaderLargeOut.load(new URLRequest(event.target.name));
}
}
}
View Replies !
View Related
Calling RemoveEventListener On Dynamic Movie Clips
I'm writing a class that will create an XML-powered slideshow. During the image transition I want to remove the Mouse Click listener on all image thumbnail movie clips so the user cannot interrupt the current transition. I tried calling event.target.removeEventListener but that doesn't seem to do anything. I also realize I need to create a for loop and call removeEventListener on all thumb mc's but am not sure how since all mc's are created dynamically. Any help would be great. Here is my code:
Code:
package com.creativemess.multimedia
{
import flash.display.*;
import flash.events.*;
import fl.transitions.Tween;
import fl.transitions.easing.*;
import gs.TweenFilterLite;
import gs.easing.*;
import flash.net.*;
public class SlideShow extends MovieClip
{
var dataSource:XML;
var dataList:XMLList;
var dataLoader:URLLoader = new URLLoader();
var imagePath:String;
var imageSmall:String;
var imageLarge:String;
var imageLoaderSmall:Loader;
var imageLoaderLargeOut:Loader = new Loader();
var imageLoaderLargeIn:Loader = new Loader();
var imageDisplaySmall:MovieClip = new MovieClip();
var imageDisplayLarge:MovieClip = new MovieClip();
public function SlideShow (path:String, small:String, large:String)
{
imagePath = path;
imageSmall = small;
imageLarge = large;
dataLoader.load(new URLRequest(imagePath));
dataLoader.addEventListener(Event.COMPLETE, loadImages);
}
private function loadImages (event:Event):void
{
dataSource = XML(event.target.data);
dataList = dataSource.children();
for (var i:int = 0; i < dataList.length(); i++)
{
imageLoaderSmall = new Loader();
imageLoaderSmall.name = dataList[i].attribute(imageLarge);
imageLoaderSmall.load(new URLRequest(dataList[i].attribute(imageSmall)));
imageDisplaySmall = new MovieClip();
imageDisplaySmall.buttonMode = true;
imageDisplaySmall.x = i * 150;
imageDisplaySmall.y = 350;
imageDisplaySmall.addEventListener(MouseEvent.CLICK, tweenLargeImageOut);
addChild(imageDisplaySmall);
imageDisplaySmall.addChild(imageLoaderSmall);
}
imageDisplayLarge.x = 0;
imageDisplayLarge.y = 0;
imageLoaderLargeOut.load(new URLRequest(dataList[0].attribute(imageLarge)));
addChild(imageDisplayLarge);
imageDisplayLarge.addChild(imageLoaderLargeOut);
imageDisplayLarge.addChild(imageLoaderLargeIn);
}
private function tweenLargeImageOut (event:MouseEvent):void
{
event.target.removeEventListener(MouseEvent.CLICK, tweenLargeImageOut);
imageLoaderLargeIn.unload();
TweenFilterLite.to(imageDisplayLarge, .5, {blurFilter:{blurX:30, blurY:30, quality:3}, onComplete:tweenLargeImageIn, onCompleteParams:[event]});
}
private function tweenLargeImageIn (event:MouseEvent):void
{
TweenFilterLite.to(imageDisplayLarge, 1, {blurFilter:{blurX:0, blurY:0, quality:3}, onComplete:displayLargeImage, onCompleteParams:[event]});
imageLoaderLargeIn.load(new URLRequest(event.target.name));
}
private function displayLargeImage (event:MouseEvent):void
{
event.target.addEventListener(MouseEvent.CLICK, tweenLargeImageOut);
imageLoaderLargeOut.unload();
imageLoaderLargeOut.load(new URLRequest(event.target.name));
}
}
}
View Replies !
View Related
|