Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




[F8] 2.0: OOP Movie Design, BG Tile Troubles.



i understand OOP very well, but some of the basics of flashs take on it are confusing me at this early stage.

For example, in my fla, i have the following code (i am attempting to make a 100% OOP AS Site)

Code:
stop();
import AS.UI.Index;
var objIndex = new Index(this);
Now its all going well as i am testing this stuff, but i am running into problems with trying to get some events for loading a basic tile image, then tiling it.
eg:

Code:
this.initLoadingListener = new Object();
this.bitTile.createEmptyMovieClip("bitTile", this.mc.getNextHighestDepth());
var mcLoader:MovieClipLoader = new MovieClipLoader();
mcLoader.addListener(initLoadingListener);
mcLoader.loadClip("bitTile.jpg", this.bitTile);
this.initLoadingListener.onLoadComplete = this.loadingListComplete;

}
private function loadingListComplete(movc:MovieClip) {
trace("loaded?");
}
Now there are a few things right away i am not sure i am doing right. First off, i have an object i created before the constructor called "bgTile", that will hold the image of the background tile. Seeing as MovieClip objects cannot be initialized via a constructor, i am not sure if this is how i create the initialize the movieclip, or is this just creating this.bgTile.bgTile?

2nd off, the listener and event for the movieclip loader. In an OOP Enviorment, how are these defined? Because i can't seem to get that event triggered.


I guess that is it for the moment. Once i figure out a few of these oddities i'll be in good shape.

Thanks a ton!



FlashKit > Flash Help > Flash ActionScript
Posted on: 07-29-2006, 06:53 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Tile Movie
my tile backgroun is not working
'cuse tha main movie desapeers and only appears the backgroun tile
tha acction I use is this



Stage.align = "LT";
bkd.onEnterFrame = function(){
if (this._width != Stage.width) {
this._width = Stage.width;
}
if (this._height != Stage.height) {
this._height = Stage.height;
}
}

depth = 0;
tile_mc._visible = false;
tile_mc.onEnterFrame = function(){
var h = Math.floor(Stage.width / this._width);
var v = Math.floor(Stage.height / this._height);
for(var i = 0; i <= h; ++i){
for(var j = 0; j <= v; ++j){
dupClip = tile_mc.duplicateMovieClip("tile" + depth, depth);
dupClip._x = i * this._width;
dupClip._y = j * this._height;
dupClip
++depth;
}
}
}

Tile Game - Tile Selection
Hey guys, I am making a simple tile puzzle

I have 9 tiles all in an array tile0 ,tile1, tile2 etc ...

1 is always empty .. while 4 are WHITE and 4 are BLACK
The whites can only go right onto an empty adjacent space or jump over black
The black can only go left onto and empty adjacent space or jump over white

I've done the script ... but I have a problem with the selection
When I click on a tile I want --> selected = i;

I need it to be deselected as soon as you click anywhere else on the screen.

I've managed to do this but now I can't jump over tiles.

eg. when I have a white tile selected and the adjacent tile is black --> if you click on an empty space there should be a jump.

Here is my main game fuction.

Sorry if this is confusing and thanks ahead for any help.

PHP Code:



function game() {
   mx = _root._xmouse;
   my = _root._ymouse;
   
   for(i=0;i<tiles.length;i++) {
      if (tiles[i].hittest(mx,my) and (tiles[i]._currentframe <> 3)) {
         selected = i;
         tiles[i]._alpha = 30; 
      } else {
         tiles[i]._alpha = 100;
      }

      if ((tiles[selected]._currentframe == 1) and (tiles[selected + 1].hittest(mx,my) and (tiles[selected + 1]._currentframe == 3))) {
         tiles[selected].gotoAndStop(3);
         tiles[selected + 1].gotoAndStop(1);
      } else if ((tiles[selected]._currentframe == 2) and (tiles[selected - 1].hittest(mx,my) and (tiles[selected - 1]._currentframe == 3))) {
         tiles[selected].gotoAndStop(3);
         tiles[selected - 1].gotoAndStop(2);
      } else if ((tiles[selected]._currentframe == 1) and (tiles[selected + 1]._currentframe == 2) and (tiles[selected + 2]._currentframe == 3) and (tiles[selected + 2].hittest(mx,my))) {
         tiles[selected].gotoAndStop(3);
         tiles[selected + 2].gotoAndStop(1);
      } else if ((tiles[selected]._currentframe == 2) and (tiles[selected - 1]._currentframe == 1) and (tiles[selected - 2]._currentframe == 3) and (tiles[selected - 2].hittest(mx,my))) {
         tiles[selected].gotoAndStop(3);
         tiles[selected - 2].gotoAndStop(2);
      } 
   }


Trying To Tile A Movie Clip Using BitmapFill
All I want to do is tile an image for a background, but I absolutely cannot have the image inside the swf as a symbol because there are thousands to be chosen from and that would make the swf file unreasonably large.

It was suggested that I do the following:
1. Load your external JPEG into an empty movieclip.
2. Wait for this to load (use an onLoad or onComplete event listener), of the Loader component.
3. Using the Drawing API, draw a new movieclip (or use 'this' to draw on the stage, to the size you want (i.e the size of the stage).
4. Use BeginBitmapFill on this movieclip.
5. The image in the BitmapData object will automatically tile to fill the drawn object.

Here is my attempt so far, inside frame 1 of the main timeline:
Code:
bgr_url = "URL...jpg";

this.createEmptyMovieClip("image_mc", this.getNextHighestDepth());
var mclListener:Object = new Object();
mclListener.onLoadComplete = function(target_mc:MovieClip) {
import flash.display.BitmapData;
import flash.geom.Matrix;

var w = Stage.width;
var h = Stage.height;

this.beginBitmapFill(target_mc);
this.lineStyle(4, 0x000000);
this.moveTo(0, 0);
this.lineTo(w, 0);
this.lineTo(w, h);
this.lineTo(0, h);
this.lineTo(0, 0);
this.endFill();
};
var image_mcl:MovieClipLoader = new MovieClipLoader();
image_mcl.addListener(mclListener);
image_mcl.loadClip(bgr_url, image_mc);
Rather than tiling the image, all this does is display the image once at the top left of the stage. I would love to see a good solution to this.

I genuinely appreciate any help.

David

Tile Like Movie Clip (loops And Scrolls)
ok. I've found some tuturials on how to make tile based games, however, they seem way too complex for what i am wanting to do, which is basically just this:

i will have N number of images, all layed out in a horizontal row. The user can only see one image at a time (and perhaps the far left and far right ends of the two images to each side of it). The user can then scroll left or right. And I want it to loop. Ie, when they scroll to the right and reach the end the first image will automatically be next in line. seemless.

I'm thinking i should do this like so:

have a movie clip. and inside that mc, would be each image (each their own mc). and if the user hits the right arrow key, scroll the main mc to the right.

this much i can easily do. it's the looping part that i am not sure of the best way to go about.

perhaps always make sure there is one image on each side of the main image. and while it is scrolling i'll grab the upper left coord's of the main image, and if it goes out of the main viewing area, move the image at the opposite side over to the side that the user is scrolling to?

anyone have any advice or tutorials they can point me to on this?

thanks a lot in advance!
tyler

HelpHow To Make A Design Page For T-shirt Design Website
Hello..I would like to make a design page that user can design his Tshirt online. It should have the functions like, adding pictures and text on the Tshirt, and the user can modify the font of the text and the position of the picture. After design, the whole information should be sent to the database for producer usage. Therefore, could any one have some good suggestion or source code for these purpose or any good links.

There is a similar function link. http://www.99dogs.com/custom2.html It is the whole process of the design and contains flash. So could any expert help me to achieve these functions in my design page. It is urgent and very important for me. Many thanks in advance!

Movie Troubles
Hello all,

i am rather new at scripting in flash, I have a small project I have been working on. to see please visit www.planetreggaeton.com. It's not done I still haven't installed a preloader, but any way what I wish to accomplish is:

a. the area that says "videos coming soon" I would like to place a video clip with a play and stop button.

b. and when the video play button is pressed or released (it doesn't matter which)I would like the background music to stop.

i have tried all kinds of methods but my newbie abilities are lacking in order to get the job done.

When I have tried this i can't get the background music to so when the video is played the background music is palting at the same time, very messy stuff. Please can anyone offer their advice.

thanks in advance...

Movie Troubles
I have imported and SWF file into my library for use in my main scene. I have given it an instance name but I can not get it to play???

Movie Troubles
http://www.rbell.net/intranet_prob/intra_3go.html

if you look at this you'll see my flash movie at the top is actually the same as Kirupa uses for this main site section. problem I'm having though is if you roll over the menu and then the drop downs the movie seems to stop/start kind of thing giving it a stutter effect.....(more noticeable on the snow effect)

can anyone else see it?

Also if you have IE can you tell me if you're getting a problem with the rollovers, thanks.

Still Having Troubles With Loading Movie
Ok

I still have the same problem. I have a main movie with 5 heading in it - News, services, portfolio, contact and integration. I am trying to have 6 movies in the whole web site.

The first movie is the introduction, where the site builds itself, and just says hello with links to the five headings, which are all separate movies. The first(main movie) loads fine, but when i load subsequent movies(the other headings), they do load, but when they do load, it is as if the first frame in each of the five movies are blank, and the backgraound (main movie) flashes for one frame and then loads.

What is the dealio!!!

PLEASE HELP!

Load Movie Troubles
2 relatively simple questions for the senior members here...

1) How can I define the exact x,y location where a second movie on top of the stage will pop up using the Load Movie action? Right now, Flash is (by default?) setting it up on the top left side of the stage.

2) How can I make that second movie's background transparent so I could see the stage's background?

Thanks for any help everyone, it'll be appreciated!

Movie Delay Troubles
I'm placed an empty clip on the stage and attached the following code to cause a delay in a movie clip

--------------
onClipEvent (load) {
t0 = getTimer();
_root.artisdrop.stop();
}
onClipEvent (enterFrame) {
t1 = getTimer();
if (t1>t0+15000) {
_root.artisdrop.play();
}
}
----------------------
The delay won't work. The playhead just goes to the end.

This movie clip is being called by tellTarget from a mouseover event.
------
on (rollOver) {
tellTarget ("artisDrop") {
gotoAndPlay("move");
}
}
----------------

Can anyone help with this?

Movie Clip Troubles
Here is my setup: play til frame 10(stop) it lands on a movie clip that plays for 5 frames(stop + tell target /one to play). ONE is on the main stage, and now plays..on frame 10 of the main stage since I cant figure out how to load it otherwise...it plays until frame 5 of the movie clip it is and lands on a button. I want this button to restart the whole movie, but when I try, it just restarts the movie clip. How do I set a movie clip end to start the whole movie over?

Also, if I have a movie clip on frame 2...and frame 5 of inside of that movie clip loads back out to an instance, does that instance too have to be on frame 2 of the main clip in order to load? If i put it out on 3, it doesnt even show up anywhere.

Note: I use flash 4 and 5. Not MX.

Movie Clip Troubles
how do i make a movie clip, i have 3 images each one is a different stage of a person walking, how would i take all 3 of those and turn it into a movie clip of the man walking, looping please help

Movie Clip Troubles...
Hello again...I'm having some trouble with this script I wrote. For some reason...(and it's probably pretty obvious to someone else) my movie clips named "square" and "square2" won't work...unless their layer is closer to the bottom of the timeline...and vice versa with the "circle" movie clips. All of the squares are on one layer, and all of the circles are on one...should I place them all on a layer together? Why are is only one at a time displaying...?

Code:
loadMovie("stillshots/image4.jpg", "_root.circle");
loadMovie("stillshots/image2.jpg", "_root.circle2");
loadMovie("stillshots/image3.jpg", "_root.circle3");
loadMovie("stillshots/image4.jpg", "_root.circle4");
loadMovie("stillshots/image5.jpg", "_root.circle5");
pic = 1;
pic2 = 1;
max_pic = 10;
//number of pics//
jump = 10;
//jumping of alpha//
i = 0;
i2 = 0;
num = 200;
num2 = 500;
//fade in variable//
z = num;
z2 = num2;
//fade out variable//also speed of changing pics//the smaller the faster//
_root.square._alpha = 0;
_root.square2._alpha = 0;
loadMovie("images/image"+pic+".jpg", "_root.square");
loadMovie("images2/image"+pic+".jpg", "_root.square2");
_root.onEnterFrame = function() {
//fade in//
if (i<num) {
i += jump;
_root.square._alpha = i;
} else {
//fade out redirect//
if (pic == max_pic) {
pic = 0;
}
pic++;
//next pic//
if (z>0) {
//fade out//
z -= jump;
_root.square._alpha = z;
} else if (z == 0) {
loadMovie("images/image"+pic+".jpg", "_root.square");
//next pic load//
//initiate variables//
i = 0;
z = num;
}
}
if (i2<num2) {
i2 += jump;
_root.square2._alpha = i2;
} else {
//fade out redirect//
if (pic2 == max_pic) {
pic2 = 0;
}
pic2++;
//next pic//
if (z2>0) {
//fade out//
z2 -= jump;
_root.square2._alpha = z2;
} else if (z2 == 0) {
loadMovie("images2/image"+pic+".jpg", "_root.square2");
//next pic load//
//initiate variables//
i2 = 0;
z2 = num2;
}
}
};
pics = 1;
pics2 = 6;
pics3 = 11;
pics4 = 17;
max_pics = 22;
//number of pics//
jumps = 10;
//jumping of alpha//
is = 0;
is2 = 0;
is3 = 0;
is4 = 0;
nums = 200;
nums2 = 250;
nums3 = 300;
nums4 = 350;
//fade in variable//
zs = nums;
zs2 = nums2;
zs3 = nums3;
zs4 = nums4;
//fade out variable//also speed of changing pics//the smaller the faster//
_root.small._alpha = 0;
_root.small2._alpha = 0;
_root.small3._alpha = 0;
_root.small4._alpha = 0;
loadMovie("smalls/image"+pics+".jpg", "_root.small");
loadMovie("smalls/image"+pics2+".jpg", "_root.small2");
loadMovie("smalls/image"+pics3+".jpg", "_root.small3");
loadMovie("smalls/image"+pics4+".jpg", "_root.small4");
_root.onEnterFrame = function() {
//fade in//
if (is<nums) {
is += jumps;
_root.small._alpha = is;
} else {
//fade out redirect//
if (pics == max_pics) {
pics = 0;
}
pics++;
//next pic//
if (zs>0) {
//fade out//
zs -= jumps;
_root.small._alpha = zs;
} else if (zs == 0) {
loadMovie("smalls/image"+pics+".jpg", "_root.small");
//next pic load//
//initiate variables//
is = 0;
zs = nums;
}
}
if (is2<nums2) {
is2 += jumps;
_root.small2._alpha = is2;
} else {
//fade out redirect//
if (pics2 == max_pics) {
pics2 = 0;
}
pics2++;
//next pic//
if (zs2>0) {
//fade out//
zs2 -= jumps;
_root.small2._alpha = zs2;
} else if (zs2 == 0) {
loadMovie("smalls/image"+pics2+".jpg", "_root.small2");
//next pic load//
//initiate variables//
is2 = 0;
zs2 = nums2;
}
}
if (is3<nums3) {
is3 += jumps;
_root.small3._alpha = is3;
} else {
//fade out redirect//
if (pics3 == max_pics) {
pics3 = 0;
}
pics3++;
//next pic//
if (zs3>0) {
//fade out//
zs3 -= jumps;
_root.small3._alpha = zs3;
} else if (zs3 == 0) {
loadMovie("smalls/image"+pics3+".jpg", "_root.small3");
//next pic load//
//initiate variables//
is3 = 0;
zs3 = nums3;
}
}
if (is4<nums4) {
is4 += jumps;
_root.small4._alpha = is4;
} else {
//fade out redirect//
if (pics4 == max_pics) {
pics4 = 0;
}
pics4++;
//next pic//
if (zs4>0) {
//fade out//
zs4 -= jumps;
_root.small4._alpha = zs4;
} else if (zs4 == 0) {
loadMovie("smalls/image"+pics4+".jpg", "_root.small4");
//next pic load//
//initiate variables//
is4 = 0;
zs4 = nums4;
}
}
};

Movie Clip Troubles...
Im building a dropdown menu in MX and i created a clip. I would like to use that same clip 5 times but the buttons inside the change with it? How can I use that same clip 5 times but have the buttons on everyone different? Can someone please help me? Thanks Much!

Dynamic Movie Troubles
I am haveing some troubles with dynamic movies. I have, in a drop zone, loaded movie clips. My problem is, when one movie clip is loaded it has actions to load another movie clip into that same dropzone and take the previous movie clips place. Now I not only want to load a new movie clip and replace the old one, I want (linked from the old one) to go to a certain spot in that newly loaded movie clip.

here is an example to (attempt) to clarify things.

movie clip A is loaded into dropzone which is contained within a master swf file.

movie clip are removed and deposited via the links on the master swf file: for instance when you click on the news section it unloads whatever movie clip is loaded intro the dropzone and loads the new.swf file into it.

That procedure is fairely easy.

now I want to link from movie clip A to unload itself and load another movie clip (just like before) but go to a certain point in that movie clip. And to add to that, there are several links in movie clip A that link to different parts of the loaded movie clip that I want to go to. So it is loading the same Movie clip everytime yet going to different places depending on the link pressed. I hope people can be of service if they understand what I just said. I am no good at explaining all this. Thanks a lot!

Cheers

Movie Clip Troubles
I'm quite new at scripting and I've encountered something kinda complicated(to me anyway). I am making a website where i have animated characters that are movie clips. I want to be able to load another movie clip upon clicking on them and have it display centered while my animation plays behind it. I want the movie clip to go away when you click away from it all without disturbing the animation behind it(I don't want the anim to skip) The movie clip I want to load has a dynamic text box in it that loads a text file with scroll buttons. I have, surprisingly enough, got the movie clip to load, unfortunatly not in the right location and my scroll buttons no longer work.
I've tried tutorials and searched all over the forums looking for a solution. I've gotten close but still no cigar.
If anyone could offer some help with scripting it would be much appreciated.

this is how I loaded the text
loadVariables("textfile.txt", InstanceName_0);

(I don't know if you need to know that part?)


I put action scripting on the first frame of the movie clip I want to act as a button but it is definately wrong! P.S. I'm using Flash MX

Load Movie Troubles
Hello All
I have a problem with loading external swf's into a flash movie. It loads fine but the clip doesn't do what it is supposed to once it is loaded. for example I have a clip that is supposed to play audio once it is loaded into the main movie clip. It loads fine then when I press the play button I can't get sound. This is code I used for the main movie

on (rollOver) {
slider.xMove = button_2._x;
}
on (release) {
_root.createEmptyMovieClip("container", 1);

// Load external SWF
container.loadMovie("lisa.swf", 2);
}

Here is the code fromw the external swf

bytes_loaded = Math.round(_root.getBytesLoaded());
bytes_total = Math.round(_root.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
_root.loadBar._width = getPercent*100;
_root.loadText = Math.round(getPercent*100)+"%";
if (bytes_loaded == bytes_total) {
_root.gotoAndPlay(3);
}
_x=2;
_y=32;


Any help would be appreciated, and thanks in advance.

Dynamic Movie Troubles
I am haveing some troubles with dynamic movies. I have, in a drop zone, loaded movie clips. My problem is, when one movie clip is loaded it has actions to load another movie clip into that same dropzone and take the previous movie clips place. Now I not only want to load a new movie clip and replace the old one, I want (linked from the old one) to go to a certain spot in that newly loaded movie clip.

here is an example to (attempt) to clarify things.

movie clip A is loaded into dropzone which is contained within a master swf file.

movie clip are removed and deposited via the links on the master swf file: for instance when you click on the news section it unloads whatever movie clip is loaded intro the dropzone and loads the new.swf file into it.

That procedure is fairely easy.

now I want to link from movie clip A to unload itself and load another movie clip (just like before) but go to a certain point in that movie clip. And to add to that, there are several links in movie clip A that link to different parts of the loaded movie clip that I want to go to. So it is loading the same Movie clip everytime yet going to different places depending on the link pressed. I hope people can be of service if they understand what I just said. I am no good at explaining all this. Thanks a lot!

Cheers

Movie Clip Troubles
I'm quite new at scripting and I've encountered something kinda complicated(to me anyway). I am making a website where i have animated characters that are movie clips. I want to be able to load another movie clip upon clicking on them and have it display centered while my animation plays behind it. I want the movie clip to go away when you click away from it all without disturbing the animation behind it(I don't want the anim to skip) The movie clip I want to load has a dynamic text box in it that loads a text file with scroll buttons. I have, surprisingly enough, got the movie clip to load, unfortunatly not in the right location and my scroll buttons no longer work.
I've tried tutorials and searched all over the forums looking for a solution. I've gotten close but still no cigar.
If anyone could offer some help with scripting it would be much appreciated.

this is how I loaded the text
loadVariables("textfile.txt", InstanceName_0);

(I don't know if you need to know that part?)


I put action scripting on the first frame of the movie clip I want to act as a button but it is definately wrong! P.S. I'm using Flash MX

Load Movie Troubles
Hello All
I have a problem with loading external swf's into a flash movie. It loads fine but the clip doesn't do what it is supposed to once it is loaded. for example I have a clip that is supposed to play audio once it is loaded into the main movie clip. It loads fine then when I press the play button I can't get sound. This is code I used for the main movie

on (rollOver) {
slider.xMove = button_2._x;
}
on (release) {
_root.createEmptyMovieClip("container", 1);

// Load external SWF
container.loadMovie("lisa.swf", 2);
}

Here is the code fromw the external swf

bytes_loaded = Math.round(_root.getBytesLoaded());
bytes_total = Math.round(_root.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
_root.loadBar._width = getPercent*100;
_root.loadText = Math.round(getPercent*100)+"%";
if (bytes_loaded == bytes_total) {
_root.gotoAndPlay(3);
}
_x=2;
_y=32;


Any help would be appreciated, and thanks in advance.

Attach Movie Troubles
I have a simple function that will attach "mc_Btn" from the library to the stage. I'd like the name and position of the button to be attributes that can be passed to the button when it is created.

With my code, the movie clip is created, but overwritten each time. So, if I try to create three buttons, it creates and overwrites all three, leaving me with just the third.

What am I doing wrong?

Here's my code:

In the cointainer clip, I have the following code:


ActionScript Code:
function addButton (butnName:String, xVal:Number, yVal:Number)
{
    buttonsArray.push (butnName);
    this.coinMain.attachMovie ("mc_Btn", butnName, this.getNextHighestDepth (), {_x:xVal, _y:yVal});
}


In the content clip, I have the following code:


ActionScript Code:
var containerClip = this._parent;
containerClip.addButton ("btn1", 50, 500);
containerClip.addButton("btn2", 100, 500);
containerClip.addButton("btn3", 150, 500);
btn1.btnText.text = "Button 1";
btn2.btnText.text = "Button 2";
btn3.btnText.text = "Button 3";

Help Please. Design A Movie For My Club
Dear All,

I am a new club promoter and would like to know if anybody could help me design a flash movie for some plasma screens within the club.

Basically, this is my first ever shot at promoting and I have a very low budget, but as the club have a bar and its open 7 days a week we can advertise our night on their screens. Our night will be held at a university student union. We can of course let you have free VIP access to the club and some free drinks.

Could anybody help and design a flash movie for us?

Thank you for your time and reading this message.

Take care.
Darren

Flash Design Methods, (what Is The Best Way To Design The Overall Site?)
Hey guys, i am new to flash and so far I have seen a couple ways that you can develop sites. one is to have a main timeline and load swfs into it. and the other is to put everything on the main timeline. I was searching for an article that would give me the advantages and disadvantages of both. anyone know about this?

PreLoad And Loading Movie Troubles
Hi there,
I have a swf of about 3.3 megs. I have a preloader in scene one with the following script (with coments). It only shows up when 80 % of the movie is buffered. I'm not sure why. Could anyone shed some light on this?

Thanks!


// This says if the bytes are not completely loaded, begin preloading!
if (_root.getBytesLoaded() == _root.getBytesTotal()) {
// This says if the bytes are loaded, play movie!
nextScene();
} else {
// Begin Preloading
// This will calculate the bytes loaded
bytesLoaded = _root.getBytesLoaded();
// This will calculate the bytes left to load
bytesLeft = _root.getBytesTotal()-_root.getBytesLoaded();
// This will calculate the total bytes
bytesTotal = _root.getBytesTotal();
// This will calculate the kilobytes loaded
kbytesLoaded = Math.round((_root.getBytesLoaded()/1024)*100)/100 add "kb";
// This will calculate the kilobytes left to load
kbytesLeft = Math.round((_root.getBytesTotal()-_root.getBytesLoaded()/1024)*100)/100 add "kb";
// This will calculate the total kilobytes
kbytesTotal = Math.round((_root.getBytesTotal()/1024)*100)/100 add "kb";
// This will calculate the percentage
percent = Math.round((_root.getBytesLoaded()/_root.getBytesTotal())*100) add "%";
// This will calculate the loading bar
loadBar = int((_root.getBytesLoaded()/_root.getBytesTotal())*100);
// This will determine the position needed for the loading bar
setProperty("loadbar", _width, loadBar+50);
// End Preloading
}

Movie Button Troubles,,please Read
I made my menu a movie clip and the info about the different frames to play are in that movie.. I dragged the menu movie clip to the main timeline and when I click the buttons nothing happens,, but when I make the button in the main timeline it works.
Im pretty sure you can control the main timeline within a movie clip,, or am I wrong?

How do I make the menu made as an movie clip work.

Look yourself if you think my question is a bit fuzzy.

http://bluefrost.dyndns.org/bluefrost/wblue.html

The first button at the bottom named curry is a movie clip the second curry button(the one out of place) is in the main timeline.

Troubles Importing QuickTime Movie
Hi,

I try to import a .mov-file but I get the error-message: "One or more files were not imported because there were problem reading them".

How comes?

thank you
kGP

Troubles With Linking PDF And MOVIE Files
Hi,
I am using Flash MX and have troubles dealing with linked files,
especially PDF and Quicktime Movie files,
and wonder if any of you have suggestions.

I use Mac.
Actionscript used here is: "on(release)" and "getURL" tag that're applied to buttons.
There is nothing wrong with script, nor linked files.
All the files including swf, pdf, and mov files are on the Internet.

Whenever I click on any of the buttons, it always shows an error message.
If you want, try www.juridesign.net and click on "PDF RESUME".
You will get the same message over and over.

Does any one know the solution for this?

Movie Clip Troubles.. Eeps
Hello guys,

I am having this problem with movie clips. Basically, here is the problem.

My flash video works just fine when there is 1 frame, but when I add more than one frame (like to show a second movie clip), it just shows the first frame of each clip.

So when it should show about 80 frames (inside the movie clips), it only shows the first frame of each clip (like if the MCs were graphic symbols)... which is not what I am aiming for but could also start seizures if I had epilepsy.

What I have been forced to do is end up making the "movie clip frame" the actual size of the movie clip (in this example, 40 frames). All my MCs are acting as if they are graphic symbols.

It is really annoying though, since my flash book says that MCs are supposed to be timeline independent, and I shouldnt be having these problems.

Your help is very much appreciated, and I thank you very much.

-Jayson

LoadVars, Load Movie Troubles
I dont know how best to phrase this, but ill try cause i have been trying to fix it all day long.

I have a flash movie, and when its loaded another smaller flash movie is loaded into that( a guestbook).

This guestbook loads a variable in from a php script, status.

It will work fine on its on, but when i embed the movie into another movie it doesnt get the variable from the script.

attached are the files, changed the .php file to a .txt file

Please someone help me on this one

Troubles Using A Flash Movie On A Website
Ok, I'm one of the newbies

This guy bought a template and asked me to use it for his website. My problem is that I changed the structure of the website (used to have iframes) and now the flash movie, which is used for the menu and header, is acting differently. If you check the website out providerci.com and click any link, you will see the flash movie reloads. Trouble is the movie reloads EVERY time a link is clicked. What I want the movie to do is load when the person enters the site and then not reload again. I'm very ignorant of flash but I suspect I need to change some scripting. I'm having a hard time finding the right frame with the scripting that needs changing. Does anyone have any suggestions? This is kind of a shot in the dark but I'll try to provide need info

thanks!





























Edited: 10/02/2007 at 05:27:47 PM by starkween

Troubles With Implementing A Flash Movie
Hi all,
This is my first post and hope someone can assist in my troubles. I have created a webpage with DreamweaverMX and have also created a movie in flash. Actually I had help from someone here that has posted a snowfalling tutorial. Anyhow, I have both items and they both work well. I would like the snow to fall overtop of my existing webpage or as the background image. I'm having trouble with both. Can anyone help in pointing me in the right direction?

Thanks for any assistance!

Troubles With Implementing A Flash Movie
Hi all,
This is my first post and hope someone can assist in my troubles. I have created a webpage with DreamweaverMX and have also created a movie in flash. Actually I had help from someone here that has posted a snowfalling tutorial. Anyhow, I have both items and they both work well. I would like the snow to fall overtop of my existing webpage or as the background image. I'm having trouble with both. Can anyone help in pointing me in the right direction?

Thanks for any assistance!

Frame/Movie Controll...web Design
I am trying to put in transitions between pages on my web page. The site is fully flash. I am having trouble jumping out of a movie clip to the next frame on the parent timeline. I have tried gotoAndStop, but cannot get that to work right. Any suggestions on maybe how to get that to work, or maybe just a better way to do it all together?

General Movie Design Question
Hi all,

I have just recently started using MX 2004 at work and wanted to pick some experienced brains on some aspects of design...

I would like to create a movie with permanent navigation at the top that loads movieclips in and out of a bordered block beneath.

I would like to be able to fade out to white then back into the new movie when a button is pressed.

What would be the best way of designing this?
- i was thinking
1. click button
2. load movie which whites out and then fades
3. during stage 2 unload the old movieclip and load the new movieclip (This is how clueless i am!)

I hope I have explained well enough!

Any points of view welcome

Cheers,

Pete

Webpage Design -- Expand Movie To Fit?
Hi...

I am starting on a website and I would like to know if the Flash movie can be expanded in the webpage to fit the user's screen, no matter what size he/she is using.

Will the whole movie looked 'stretched', for example text that looks very long and flat?

Thanks... I've never made a website yet in flash, that's why.

Load/unload Movie (levels) Troubles
i'm trying to figure out the load/unload movie action tute

I cant figure out any of it.

the biggest thing is, where to my movies actually need to reside, - are these separate flash movies, not just separate movie clips, or separate scenes.

i understand how to get them to load unload, as it the button on release stuff, but i cant figure out levels,

please help (please with detail-i've read and searched and haven't found a clear answer yet)

THANK YOU!!!!!!!!

Load Movie Clip Troubles (i Have Several Issues)
hi

as a fairly new flash user, my brain is boggled by actionscript...

i am producing a site that will be made into a projector file & distributed on cd. the meat of it is a video & slide presentation. the videos are talking head sections sandwiching the slides (in other words there's an intro video, then the slides, then a closing video). after much finagling, i got the videos to look decent & show up in the flash site. since they're pretty large, i decided to bring them in as outside swfs within an empty movie clip with the load movie action. so, i plopped an empty clip within my scene (called "emptyclip" and it has the instance name of "loadingmovie"), then i attached the following actionscript to it:

onClipEvent (load) {
loadMovieNum("introedit00.swf", 1);
gotoAndPlay("slides");
}

i loaded it into level 1, since when i loaded it into level 0, nothing showed up of my scene EXCEPT the video. all around it was white, even tho the scene has a background color, logo, header & some navigation buttons!

so, here are my problems:

1. no matter where i place the little circle that indicates "emptyclip," the video plays in the upper left hand corner of the window--covering up other things in the background of the scene. i've tried moving the little circle around all over the place, but there's no change to its placement.

2. i then want the clip to play thru and go on to the slides movie clip (i named the frame label of this section "slides"), which i've placed on the timeline in a keyframe right after the keyframe which contains the first empty movie clip with the video loading into it. how do i do that?

3. finally, i'll need the closing video to be triggered right after the slides play. any suggestions there?

i've been working on this problem for several hours. i've read forums, tutorials, etc. i'm going a wee crazy.

thank you in advance for your help...

Movie Clip Buttons To Scene Troubles
Hi

I have made a drop down menu as a movie clip, and want the buttons on the drop down menu to jump to their respective scenes. The trouble is that when I have dragged the drop down movieclip onto the main stage in scene 1 and test the movie, The buttons (once pressed) do not jump to their scene.
Is there a way round this?

thanks
Mr Casso

Scripting Troubles For A Scrolling Movie Clip
Hey guys, I'm new to this flash scripting thing so hopefully someone can help me out here.

I'm using this movie clip to display text and a picture in a scrolling text box underneath a mask. This scrolling movie clip is controlled by an up and down button I created on the right side. When I publish this in .swf by itself, it works fine.

The problem I'm having is this page it is being used in is being called by a main page. My main page has a blank movie clip that calls in my page with the scrolling movie clip. When I hit the button to bring in the page with the scrolling movie clip, the page shows up, but the arrows dont work to scroll the text and picture the way it should. Instead it will only go down 1 line and back up 1 line with the text and the picture doesn't move at all. I've tried changing the path using a _parent and also a _parent._parent but nothing seems to work.

If anyone can help me that'd be awesome, and sorry for the long post.

- Mike

Design Time Dimensions Of Loaded Movie
Hi,

Does anyone know how to get the original size of an external movie?
I’m trying to make an album of movies instead of pictures (jpg files) using the preloader pattern. When the first frame is ready (the whole file has been loaded, and the total bytes are more than 50) I take the actual dimensions of the movie to make the scaling and resizing. The problem is that the size for some movies in the first frame doesn’t match the area where they were defined. Then when the movie starts playing is definitely wrong.

Thanks in advance…

Design Question - Classes And Movie Clips
I'm curious about how people are organizing classes that deal with movie clip behavior. What do you see as the pluses and minuses of

a) having a class extend MovieClip and then using the Flash IDE to "connect" movie clips of a certain Symbol to that class

or

b) creating a class that sets a movie clip instance as one of it's members, taking it as a paramter in the constructor or in a setMyMovieClip method?

or

other?

Any thoughts?

Thanks,
Pauline

Site Design W/ Intro As External Movie
I have a site designed using external movies. The intro is an external .swf file that I load in with the loader component. When I preview within Flash everything looks and works beautifully. When uploaded to the WWW the intro movie's music plays at a normal rate but the animation itself moves at what appears 6 ftp. HELP! Any ideas on this seemingly mysterious problem?

Loading Movie Clip Design Question
I know this can be done but I obviously do not know how. If I load a movie into a "mc" or even and external SWF file into a "mc" how can I change its perspective?

In other words I have a virtual room that is slightly at an angle and I want to load movies on the wall but it will have to be at a perspective or and angle. How can I achiever this effect?

Thanks,

tmo

Really Easy Question - With Movie Clips / Question About TILE GAME
Hey,

up until now, i haven't had to use movie clips much, but i am creating a tile game (the game with the 8 pieces in a 3x3 board and ya have to move them to get them in the right place) but if i have a movie clip that just fades from one image to the next and i have in frame 1 of that small movie clip - stop, why when in the root, when i motion tween it, it plays the movie clip over and over..

A bigger question, i haven't done much hardcore actionscript, and getting this tile game to work might be really hard for me, does anyone have a sililar thing so i could see an example, or have any tips/pointers or an outline on how to attack this game? or a site to go to??

any help would be so great!!!
thanks guys!

Greg overholt

Having Troubles With Receiving Data When Loaded Inside Another Movie
I'm creating a guestbook, and the guestbook works fine when executed on its own. But once I load the guestbook into another movie, it doesnt work anymore...

this is the actionscript used;
NumLow = 0;
NumHigh = 1;
loadVariablesNum ("GuestBook.php?NumLow="+NumLow+"&NumHigh="+NumHig h+"&R="+random(999), 0);
stop();

Anyone know why? Help is very much appreciated! thanks

View Second Frame Of Movie Clip At Design Time
Hi I have movieclip that contains my navigation, this has its own preloader on the first frame. When desiging this preloader is all I can see as the actual nav is on the 2nd frame. Is there a way I can view the nav whilst designing the rest of the site as it is otherwise hard to picture where I want to put everything. Basically I want to select the 2nd frame of a movie clip and then for that clip to stay on the 2nd frame when I move back to the top timeline and into other movieclips.

Hmm that was harder to explain than i'd imagined! If that makes sense to anyone, help really appreciated.

Create Container Movie Clip And Child Clips At Design Time?
It's always powerful and dynamic to use "createEmptyMovieClip" and "attachmovieclip" at run time. But how to create this relationship of clips at design time so that an empty movie clip can hold several child movie clips?

Thanks!

How To Load An Image In Movie Clip Made In "design View"
Hello, guides!
Before I have started with AS 3.0 I used AS 2.0 for some time. Then I had made some movie clips in Flash by the design tools and after that loaded movies or images in a blank movie clip , made by the design, too. Is it possible to do the same thing by AS 3.0 and how?

Copyright © 2005-08 www.BigResource.com, All rights reserved