Weird Problem With MC Placement
Hi all I have a movieclip that is just a basic frame that is supposed to resize with my window... Now my problem is that when I go to resize my movieclip for my bottom liner is not being adjusted... well it is but it is also leaving the last movieclip that was placed before the new movie was placed but I cannot figure out how to get rid of the previous movieclip as it is messing with the look...
Here is some AS for ya... pus if need I will upload a swf so you can see whats up... actually I will do that anyway sorry I am typing before thinking.
http://www.dem-pro.com/problem/test.swf
just resize the page and you will see what I am talking about...
Here is the code and thank you for your help
Code: package dempro { import flash.display.MovieClip; import flash.display.StageAlign; import flash.display.StageScaleMode; import flash.display.Stage; import flash.display.DisplayObject; import flash.display.DisplayObjectContainer; import flash.events.Event;
public class Main extends MovieClip { var LinerMC:MovieClip = new MovieClip(); var bg:bgImage = new bgImage(); var bottomLiner:BottomLiner = new BottomLiner(); var nav:NavBar = new NavBar(); var rightLiner:RightLiner = new RightLiner(); var leftLiner:LeftLiner = new LeftLiner(); var bottomRight:BRCorner = new BRCorner(); var bottomLeft:BLCorner = new BLCorner(); var topRight:TRCorner = new TRCorner(); var topLeft:TLCorner = new TLCorner();
public function Main():void { stage.scaleMode = StageScaleMode.NO_SCALE; stage.align = StageAlign.TOP_LEFT;
buildInterface();
stage.addEventListener(Event.RESIZE, onResize); }
private function onResize(e:Event):void {
buildInterface(); }
private function buildInterface():void { bg.x = stage.stageWidth/2 - bg.width/2; bg.y = stage.stageHeight/2 - bg.height/2;
addChild(bg);
var sW:Number = stage.stageWidth; var sH:Number = stage.stageHeight;
LinerMC.x = 0; LinerMC.y = 0;
for(var tx:Number = 0; tx < sW; tx += 100) { var tlMC:MovieClip = new TopLiner(); tlMC.x = tx;
LinerMC.addChild(tlMC); }
nav.x = sW/2; nav.y = 0;
leftLiner.height = sH;
for(var bx:Number = 0; bx < sW; bx += 100) { var blMC:MovieClip = new TopLiner(); blMC.x = bx; blMC.y = sH - blMC.height;
LinerMC.addChild(blMC); }
rightLiner.height = sH; rightLiner.x = sW - rightLiner.width;
bottomRight.x = sW - bottomRight.width; bottomRight.y = sH - bottomRight.height;
bottomLeft.y = sH - bottomLeft.height;
topRight.x = sW - topRight.width;
LinerMC.addChild(nav); LinerMC.addChild(leftLiner); LinerMC.addChild(rightLiner); LinerMC.addChild(bottomRight); LinerMC.addChild(bottomLeft); LinerMC.addChild(topLeft); LinerMC.addChild(topRight);
addChild(LinerMC); } } }
FlashKit > Flash Help > Actionscript 3.0
Posted on: 08-26-2008, 11:04 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Weird With My MC Placement On Resize.
Hi all I have a movieclip that is just a basic frame that is supposed to resize with my window... Now my problem is that when I go to resize my movieclip for my bottom liner is not being adjusted... well it is but it is also leaving the last movieclip that was placed before the new movie was placed but I cannot figure out how to get rid of the previous movieclip as it is messing with the look...
Here is some AS for ya... pus if need I will upload a swf so you can see whats up... actually I will do that anyway sorry I am typing before thinking.
http://www.dem-pro.com/problem/test.swf
just resize the page and you will see what I am talking about...
Here is the code and thank you for your help
ActionScript Code:
package dempro
{
import flash.display.MovieClip;
import flash.display.StageAlign;
import flash.display.StageScaleMode;
import flash.display.Stage;
import flash.display.DisplayObject;
import flash.display.DisplayObjectContainer;
import flash.events.Event;
public class Main extends MovieClip
{
var LinerMC:MovieClip = new MovieClip();
var bg:bgImage = new bgImage();
var bottomLiner:BottomLiner = new BottomLiner();
var nav:NavBar = new NavBar();
var rightLiner:RightLiner = new RightLiner();
var leftLiner:LeftLiner = new LeftLiner();
var bottomRight:BRCorner = new BRCorner();
var bottomLeft:BLCorner = new BLCorner();
var topRight:TRCorner = new TRCorner();
var topLeft:TLCorner = new TLCorner();
public function Main():void
{
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
buildInterface();
stage.addEventListener(Event.RESIZE, onResize);
}
private function onResize(e:Event):void
{
buildInterface();
}
private function buildInterface():void
{
bg.x = stage.stageWidth/2 - bg.width/2;
bg.y = stage.stageHeight/2 - bg.height/2;
addChild(bg);
var sW:Number = stage.stageWidth;
var sH:Number = stage.stageHeight;
LinerMC.x = 0;
LinerMC.y = 0;
for(var tx:Number = 0; tx < sW; tx += 100)
{
var tlMC:MovieClip = new TopLiner();
tlMC.x = tx;
LinerMC.addChild(tlMC);
}
nav.x = sW/2;
nav.y = 0;
leftLiner.height = sH;
for(var bx:Number = 0; bx < sW; bx += 100)
{
var blMC:MovieClip = new TopLiner();
blMC.x = bx;
blMC.y = sH - blMC.height;
LinerMC.addChild(blMC);
}
rightLiner.height = sH;
rightLiner.x = sW - rightLiner.width;
bottomRight.x = sW - bottomRight.width;
bottomRight.y = sH - bottomRight.height;
bottomLeft.y = sH - bottomLeft.height;
topRight.x = sW - topRight.width;
LinerMC.addChild(nav);
LinerMC.addChild(leftLiner);
LinerMC.addChild(rightLiner);
LinerMC.addChild(bottomRight);
LinerMC.addChild(bottomLeft);
LinerMC.addChild(topLeft);
LinerMC.addChild(topRight);
addChild(LinerMC);
}
}
}
Help: Weird Or Not So Weird Thingy With Dynamic Text Animation
http://www.david.bullaro.com/
there are 3 buttons on the right side education, experience and awards. Each loads an MC that then motion tweens into view from the side. The MC dynamically loads a text file. At the end the text blinks once. I understand the blink because i needed to reload the text for that keyframe but is there anyway around that blink?
TIA.
[F8] Weird Weird Loading Problem
Hey all,
Check out this project I'm working on:
http://www.niekdekker.com/overig/
The weird thing is, and you can see this, that the movie just stays white while it's loading. When the movie is fully loaded the movie begins.
And I am CERTAIN this has nothing to do with the way I built my flash. Even if I remove all the loading code it's still just white until it's all loaded. Think about it: There's isn't even a white frame in the entire movie!
So I dont' know what I am doing wrong.
Does anybody recognize this problem?
Thanks in advance,
Niek Dekker
Weird, Weird Stupid Problem
Ok, guys so I pressed something on my keyboard in actionScript 3 while writing code, and some weird sybmols popped up all over the place, I can't get rid of them :/
there is >> after every indent and line, and also some sort of backwards "P" on every new line.
does anyone know how to get rid of these? Cause they are crowding the code, and it's really hard to read and write.
Thanks deewds
Weird Weird Mask Problem
For some reason, all of a sudden, I'm experiencing a weird problem:
If I load an external swf into a movie clip that has a mask, the swf fails to show up. Delete the mask, and the swf appears. Put the mask back in, and POW! no swf.
The odd thing is, a project I authored a few weeks ago, with masks, works just fine!
Anybody else experience this issue??
I'm running OSX Tiger on a G5 dual processor.
Weird Weird Mask Problem
For some reason, all of a sudden, I'm experiencing a weird problem:
If I load an external swf into a movie clip that has a mask, the swf fails to show up. Delete the mask, and the swf appears. Put the mask back in, and POW! no swf.
The odd thing is, a project I authored a few weeks ago, with masks, works just fine!
Anybody else experience this issue??
I'm running OSX Tiger on a G5 dual processor.
MC Placement
on (press) {
if (_root.inputtext1.text == "go1") {
_root.attachMovie("correct", "correct", 2);
_x=205;
_y=69;
}
this script is not placing the "Correct" MC where I am specifying...what am I doing wrong?
Help With Placement
Hello.
I have a quick question. Let's say i have a menu set up, kind of like this one:
Click here for menu
So far there's no problems. This is where things get complicated. I have both Frontpage 2002 and Dreamweaver MX. Now, the thing is, i want to be able to place the navigation to the left, and still be able to place images, text, etc to the right (and even on top of the flash document).
You see, i had a little problem with my previous site with that.
My site
As you can see, i had to place to the next as part of the navigation (made in Fireworks MX).
So to put my question in simpler terms, how can i set up my site so i can have my navigation set up to the left, and still be able to use the rest of the page itself to do anything with.
EX
|-----| |-----------------|
| | | |
| | | |
| | | |
| | | |
| | | |
|-----| |-----------------|
Navigation Pictures placed using FP/Dreamweaver
Last but not least, am i able to publish a website using BOTH DW and FP?
Thank you,
ApersonCL
MC Placement
I am generating MC's using the attachMovie() command.
I can control the _x value from within the clip, but when I code outside the clip to control the _x value, I get an "undefined" trace.
outerMC.tagMC1._x = (iCount-1)*pWidth
==========
Could this be because the first MC is also generated using the attachMovie() command?
Is it possible to control the _x property from outside of 2 attached MCs?
Or is this some other problem?
-------
Placement -
I was wondering how to place my movie on the lower bottom side of the webpage.
thanks
Odd Placement
hi,
well i have made a full screen flash page, set the publish things to 100% height and width, and i use the script:
Stage.scaleMode = "noScale";
Stage.align = "TM";
to make it full screen.
Everything is sexy, however, when i open the html doc its in, the entire flash bit it moved right like 400pixels-ish and the left are is black html.
WHY! i cant figure it out this hasnt happened to me on ne other occasion where i use the fullscren, no sclae script. its very odd
[f8]weird DuplicateMovie...very Weird...
Hi,
I'm trying to create an application where users can add a textfield from the context menu and then extend the textbox to suit their needs. I have managed to do this pretty much but something very odd is happening when the clip is duplicated...see SWF.
Where am I going wrong if I just want the clip to be duplicated and I don't want the original clip visible otherwise the context menu would be pointless.. Notice what happens when you right-click a second time and try to extend the clip.
Code:
root_cm = new ContextMenu();
root_cm.hideBuiltInItems();
root_cm.customItems.push(new ContextMenuItem("Add card", itemHandler));
function itemHandler(obj:Object, item:ContextMenuItem) {
for (i=0; i<100; i++) {
card1.duplicateMovieClip("card1"+i, i);
}
};
_root.menu = root_cm;
And this code inside the MC
Code:
this.drag_mc.onPress = function ()
{
this._parent.swapDepths(_root.getNextHighestDepth());
this._parent.startDrag();
dragging = 1;
};
this.drag_mc.onRelease = function ()
{
trace("new_y=" + this._parent._y);
this._parent.stopDrag();
dragging = 0;
};
stop();
Finally I use this to enlarge the textbox:
Code:
onClipEvent (enterFrame)
{
if (pressing == true)
{
_parent.textbox._width = _x + 37;
_parent.textbox._height = _y + 32;
_parent.drag_mc._y = _y + 15;
_parent.drag_mc._x = _parent.textbox._width / 2;
} // end if
if (_parent.dragging == 1)
{
} // end if
}
Help would be much appreciated as I have been trying for a while now...
Weird Problem, Really Weird.
Okay, using this script on the frame...
ActionScript Code:
var Stamina = 100;
and this on a MC...
ActionScript Code:
onClipEvent (load) {
walkSpeed = 1.5;
runSpeed = 1.8;
moveNum = 0;
}
onClipEvent (enterFrame) {
if (Key.isDown(Key.RIGHT)) {
this._x += walkSpeed;
_root.Stamina -= .1;
} else if (Key.isDown(Key.LEFT)) {
this._x -= walkSpeed;
_root.Stamina -= .1;
} else if (Key.isDown(Key.UP)) {
this._y -= walkSpeed;
_root.Stamina -= .1;
} else if (Key.isDown(Key.DOWN)) {
this._y += walkSpeed;
_root.Stamina -= .1;
} else if (Key.isDown(68)) {
this._x += runSpeed;
_root.Stamina -= 2;
} else if (Key.isDown(65)) {
this._x -= runSpeed;
_root.Stamina -= 2;
} else if (Key.isDown(87)) {
this._y -= runSpeed;
_root.Stamina -= 2;
} else if (Key.isDown(83)) {
this._y += runSpeed;
_root.Stamina -= 2;
}
}
For some reason, the number never goes down by .1, it goes down by something like .100000000001. Is there a way to fix it? And how would I use Math.floor, Math.ceil, or Math.round to fix it?
StaminaBox is the name of the TxtBox
Browser Placement
My SWF is 650x400. What HTML or JS do I use to have the swf centered at different resolutions. I looks good at 800x600 but the higher resolutions it goes to a corner.
RemoveMovieClip Placement In The MC?
thanks to Little Ben, I was able to get the duplicateMovieClip(s) placed under a mask on the main timeline :-)
however, I'm trying to use a button on the main timeline to turn off the duplicate movie clips that appear behind the mask. I've looked at the forums and found items that are close, but they don't mention where to put the removeMovieClip action. is it placed in the duplicating mc timeline? or is it placed in relation to the "holder" with the mask that is on the main timeline?
your help with this "beginner glitch" would be appreciated.
best,
andrew
Swf Placement Using Button
having problems loading an swf file using a button
I want to be able to load he swf using the x,y position that I set in the button action
say my buttons at 0,0
and I want the the swf file to load at 0,200
also, when a swf file loads does it position by the top left corner or by the center of the swf?
thanks for any help
AttachMovie() & _x, _y Placement
Problem:
I have a global function on my main timeline that looks like the following:
Code:
_global.change = function(mc){
_root.attachMovie(mc, "current", 69);
_root.current._x = 395;
_root.current._y = 60;
};
It's real basic, I use it all over the site. BUT, I have a list column of buttons that each have that function applied to it.
i.e
Code:
on(realease){
change("_sla");
}
When the site opens I have change("home"); on the last frame which loads the initial content into place. From there, the user can click the buttons browse other areas. For some reason though, if I click the 2nd to last button and then the home button, it loads the "home" information @ 0,0 rather than 395,60.
Anyone up for this?
MC & Placement Question
I made a movie...the movie has MCs that are called in by the "attachMovie" command. How can I determine exactly where on the MC stage to place the image/animation so that it will show up exactly where I want it to on the main stage when I publish...as of now, I've just been nudging it, then testing it, then nidging it again, and so on until it's in the correct spot. When I set X & Y coords based on the main stage, it's not in the right place...what am I doing wrong...?
SWF Html Placement
I have a very tight frameset that I need to use, my movie runs in 800x600 and I have exactly an 800x600 frame to fit it in. But I also need the html to make sure the users have swf 6.0 so they can run my movie. I have tried setting a table in the page and putting the movie in the top left corner of it but there is still a gap surrounding the top and left edges. So far the only way I have found to remove this gap is if I set the frame to run the movie and not any of the html that checks for the correct version. Is there a way to get the video in the top left or could I possibly put the checking code on a different frame? Thanks
Placement Of External .swf
i have an external .swf i am loading, and it is smaller than my main movie. is there a way to place it at certain corridnates in the main movie?
Thanx,
Duplicated Mc Placement
Hola all,
I am basically an actionscript dud.
I would like to have a little mx swf that duplicates the same mc into a grid form. Thus I have put together the following piece of code, which I have placed in the first frame:
Quote:
ypos = 0;
xpos = 0;
i = 0;
j = 0;
while (j<6){
while (i<10) {
duplicateMovieClip("dot1", "dot1" add x, x);
setProperty("dot1" add x, _x, xpos);
setProperty("dot1" add x, _y, ypos);
x = Number(x)+1;
xpos = xpos+50;
i++;
}
ypos = ypos+40;
j++;
}
Now I'm sure this is terrible code, but it also doesn't work.
All I get is the top line of mcs? ie I get 10 across the top row, but then the yposition doesn't move down and start again?
I suspect it will be something simple, but I would really appreciate some help?
Thanks
E
Loadmovie Placement
I am relatively new to flash and am trying to load various swf movies onto the same page in the same place and resize each to the same standard size. I have tried creating a target movieclip called "dropzone" and loading the movies to this target but can't get it to work.
Here is the button action to load the swf movie named "escudospromo' into the movie clip.
on (release) {
loadMovie ("escudospromo.swf", "dropZone");
}
thanks in advance for any advice on how to load movies to specific locations on the page.
Hugh
Random Mc Placement
Hi all... hope someone can help. This is probably pretty easy.
I have some real simple code that randomly places a pop up m/c.
setProperty(popUp, _x, random (800));
setProperty(popUp, _y, random (600));
What I'd like to do is place that pop up between a range of numbers that is smaller than what allowed for above, i.e.
setProperty(popUp, _x, random (100-700));
setProperty(popUp, _y, random (100-500));
although this particlar example doesn't work. Does anyone know what I should do to make it work?
Thanks in advance...
-B
Help With Random Placement
Hey i need a little help with actionscripting with random placement.
Ok i have a rain effect however, i want it to pick a random spot between an area. I have it so it plays the clip wait, plays again, however i cant quit figure out the 'randomness'
can some one please help!
Placement In Page
Hi, I have a flash movie in a table 100% height, how do i get this movie to be at the top of this 100% table without just using the return key to push it up in dreamweaver.
K.
Preloader Placement
If I were loading swf's into diffrent levels where would I put the preloader. Would I have to put a preloader in each of the diffrent swf files or could I just have one that gets called up when a certain movie is loaded.
Random Placement Of MC ?
I want to place a MC randomly on the stage with attachmovie
- BUT I want the _x an_y min and max coordinates to be constrained -
or constrained to a box on the stage
- with random alpha states as well - -
I've seen this before but can't figure how it's done -
Button Placement ..
ok..
if i use load movie commands...in my document...
it covers up any buttons...on the base of my stage..
so the buttons work...they just invisible.
i tried to import a button...using load movie...
but the actions i gave it ..dont work once...it is imported
so ...can you load buttons..as movie clips...and make them work..
or am i way off...here eyeconimaging@aol.com
phil thanx
Help With Drag And Mc Placement
Hello all - I have attached an example swf below. What I am trying to figure out is the following:
I want to have a draggable mc which holds thumbnails of pictures for a portfolio. (I know how to do this part)
What I am trying to figure out is that I want an expanding mc to look like it is coming from the thumbnail that is selected and expands to the center of my movie. If you look at the example attached, when I drag the thumbnail mc to a different part of the stage I don't know how to have the expanding mc also start from the new position and expand to the center of the stage.
Does this make sense?
Any ideas would be greatly appreciated.
Thanks
Random Placement Help
i want a movie clip to show up at a random spot here is how i did it
timer = getTimer();
timewait = function () { space = random(1);if (space == 0) {_root.man._x = 90};{ space = random(1);if (space == 1) {_root.man._x = 0};}};
setInterval(timewait, 2000);
;
and im not sure if this works or not, i want to to every 2 seconds show up at the random spaces
and if this does work, can someone explain my code to me, cuz i jsut kinda copied it from a differnt thing i downloaded
Image Placement
Hi,
I was just wondering if there was a way to place 16 images all origionaly 1600x1200 in to a flash document automaticaly. Because if i did this by hand the images would never be the same size. Is there some kind of script or something.
Or is there a way of selecting many images and resizing them all at once ? I would also like to use the an effect so when you so called rollOver your mouse the image enlarges and when you rollOut the images decresses back to normal size.
I would be greatful if any one could help me
Scott
Rotation And Placement Of A Mc
I have a movieclip (picture of a switch) that I want to rotate when a button is pressed. I want it to rotate back when a different button is pressed. I am using the code below on one of the switches. It seems to rotate the switch but it also moves it. I don't think that it is rotating about the center of the movieclip which is what I want.
Code:
mcXcoord = getProperty("mcModeSwitch", _x);
mcYcoord = getProperty("mcModeSwitch", _y);
mcModeSwitch._rotation = 45;
setProperty("mcModeSwitch", _x, mcXcoord);
setProperty("mcModeSwitch", _y, mcYcoord);
The attached file shows how the switch will move when rotated. Can someone help me align this so that the switch rotates on its center or at least appears this way.
Thanks
Grid Placement
Hey freinds.
So, what I have is a basic script to make an object snap to a position on a grid depending on where the mouse is:
For refernce sake, 'map', is the grid in which the script is applied to, being a small block, 20 by 20px.
code:
onClipEvent (enterFrame) {
_x = math.round((_root._xmouse-10-_map._x)/20)*20+10;
_y = math.round((_root._ymouse-10-_map._y)/20)*20+10;
if (_root._xmouse>_parent.map._x && _root._xmouse<_parent.map.mapwidth+_parent.map._x && _root._ymouse>_parent.map._y && _root._ymouse<_parent.map.mapheight+_parent.map._y ) {
_visible = true;
} else {
_visible = false;
}
}
However, when I make the map move, (just adding _parent.map._x++ on the script above), the object snaps to a grid that isnt relative to the map. So while the map creeps away, the object stays in the one place.
help appriciated
thanks everyone
Work Placement Help?
Hi all hope all's going well with you.
This is my problem I’ve just finish my 2nd year at university studying interactive multimedia and now need to start a Work placement job in about a months time around the LONDON or down South UK area, doing web/multimedia design. The obvious problem is I can’t find one! even with my skills and cheap asking wage.
Just wonder if any you were working for a company or knew of any companies which were in need of a placement student, or had any helpful advice on how to get a placement job or where you did your placement. The whole thing is getting quite depressing.
My portfolio is available at http://www.jonathanhammond.com
Any help would be really great
thxs a lot
Jon
Blood Placement
hi all,
im making a shoot-em-up and i was just wondering whether you can put a patch of blood on the bit of the body that you shoot at or do you have to have blood in the same place each time.
thx bye
Function Placement
I've been using a function to resize my stage, and it worked without the _global prefix, when the function was on the same layer (one long script). It started getting ugly quickly though, so I decided to break the code up to two seperate layers; actions, and functions.
However, despite being on the same timeline and the same single frame, the stage resize function would only work when prefixing myStage with _global but the function won't execute when the stage first loads ... only when it is resized. I even ran a trace in the resize function, and it runs when the movie first loads ... but the content object does not size to 100% of the stage width, until I resize the stage.
Anybody have an incling as to why this is? It seems odd to me that it all worked in the same script window, but not when seperated over two (it isn't like the're on different timelines).
Thanks for any clarification.
I'm using MX2004.
Actions Layer
Stage.scaleMode = "noScale";
Stage.align = "LT";
_global.myStage = new Object();
myStage.onResize = function() {
moveItems();
};
Stage.addListener(myStage);
myStage.onResize();
Functions Layer
function moveItems(){
content._width = Stage.width;
content._height = Stage.Height;
}
Placement Of MCs Via AttachMovie()
Good morning citizens! CoachZ here.
I am creating a simple Pin-a-Tail-on-a-Donkey style game by attaching a movie clip (tail) via attachMovie() to another movie clip (donkey).
Attaching the clips is easy enough but the tail is always placed in the center of the donkey's movie clip.
Is there a way to alter the default attach point so that the tail will be placed onto the donkey at the cursor's current X,Y location rather than the center point?
Cheers!
Placement Of Duplicate Mc's
Hi group
I'm duplicating an mc and placing them in rows, at the moment I have an if statement that set's them out in 2 columns running down the page,
what I'm trying to achieve or understand is how to get them to duplicate in which ever way i want i.e 3 or 4 columns, also to achieve some kind of paging function within flash to only show 10 records at a time.
This is what I have so far, I'm using mx 2004
[as]
var MyData = new LoadVars();//puts LoadVars object into the var nav
MyData.load("http://localhost/eden/scripts/Ascript/photogallery/test.txt");
MyData.onLoad = function(success){
if (success){
var amount = MyData.amount;
myY = 10;
myX = 40;
for (i=0; i < amount ; i++){
duplicateMovieClip("target", ["target"+i], i);
_root["target"+i]._y = myY
loadMovie("http://localhost/mypath/"+MyData["imageName"+i],["target"+i]);
if ((i+1) % 2 == 0){
myY +=90;
}else{
_root["target"+i]._x =_root["target"+i]._x + 100;
}
}
}
}
[as]
Can anyone shed some light on this
or point me in the direction of a tutorial.
Thanx in advance
Placement Of Preloader
I have two empty movie clips, mc_menu and mc_monitor. mc_menu displays the menu for my webpage. Any content or the preloader should be displayed in the mc_monitor clip. The enter button loads menu.swf into the mc_menu clip. When the menu is loading I would like the preloader to be displayed in the mc_monitor clip. If the user clicks on anything in the menu, the content is loaded into the mc_monitor clip. Where and how should I setup the preloader? What should the actionscript look like?
Right now the progress bar is currently is in its own movie clip called NTSC, but I haven't got the preloader on becuase I wanted to find out the best solution for this before I put a lot of work into it. I would like the preloader to show up in the empty movie clip that the movie is loading into. Thank you for any assistance. This is the only big problem left that I need to solve.
This is complicated, so here is a flash example of how its setup:
http://home.cogeco.ca/~erikwithak/example.rar
Cursor Placement
After clicking on a button is it possible to replace the position of the cursor to specific co-ordinates?
Is it simple code or something else?
Any suggestions would be great!
[F8] Flash Placement
hi i have ceated a website using flash 8 and i will like to know how to place it so it will appear in the middle of the browser as opposed to the left or right thanks
[F8] A Bug With The Stage Placement?
As far as i know, 0,0 is the coordinates of the center of the stage am i right? It seems to be true thus far........
Now THIS comes along and changes all that!
Ok, I figured maybe the best way to learn stuff would be to revisit the basics in many tutorials in the help file i never tried.......tutorials are supposed to help after all.......apparently this one's a rebel.
The first one I've tried (supposedly 30 mins), is a FMA of some cook place (refer to help file under "Tutorial: Building your first flash application", and for some reason with this project, 0,0 is not even on the stage, its to the left of it!
So, when i adjust the positions to 0,0 like it tells me to, it doesnt look like in the pictures......its halfway on there in fact..........
I've stopped this tutorial until i know whats wrong and how to fix it, cause my version is far from what the finished should look like!
Please help a newb in need!!! Thanks!
Placement Issues
Hi
Lets say I have a loop counting from 1 to 15 and creating an instance of a checker piece each time, ( it places it and sets properties etc ).
Now, each of these pieces acts exactly the same, can be dragged with a set of constraints ( not important to this ). When the pieces are dropped that snap onto the playing board into the correct positions.
Now the way this works is on the board there are a set number of drop points that trigger _droptarget . The problem im having is if there are already pieces on this point, if another is dropped it misses the actual place on the board as the drop target and is replaced with the top piece on there... any way around this?
[F8] Browser Placement
i posted this on the flash 8 board but received no responses. sorry for the repost.
i completed a portfolio site (now a placeholder since i'm rebuilding) and was horrified to see that unless input the exact url (cosmicbeanbag.com) in a browser search window, my site is nowhere to be found. inputing my name or the sitename sans .com (cosmicbeanbag) returns posts i have made to other forums and message boards with my homepage nowhere to be found.
when creating the site i titled the page in the document properties window and gave it a description with my full name and the site name. why doesn't this page show up at the top in a google search?
how can i title the file so that a browser search of either my name or handle lists my homepage at the top of the first page?
thanks,
k
Random MC Placement
I'm writing code a make a random static starfield behind an animation (the animation is not code, all placed/tweened images) My animation is getting bulky (i.e. over 35k) and I am trying to find ways to get the weight down, and replacing bitmaps with code seems a good start.
I wrote something, and suprise, suprise! I doesn't work.
I'm sure I can find code somewhere online to do what I need, but I'm stubborn and want to know why the things I write don't work.
I made a new animation, and made three circles of different sizes, and gave them instance names sStar, mStar, and bStar. Then i placed this code on frame 1:
---------START CODE-------
var i:Number;
var stars:Array = ["sStar", "mStar", "bStar"];
var currentStar:String;
var xPos:Number;
var yPos:Number;
for (i = 0; i < 100; i++)
{
currentStar = stars[Math.floor(Math.random()*3)];
xPos = Math.floor(Math.random()*728);
yPos = Math.floor(Math.random()*90);
duplicateMovieClip(currentStar, currentStar add i, i);
setProperty(currentStar add i, _alpha, Math.floor(Math.random()*100);
setProperty(currentStar add i, _x, xPos);
setProperty(currentStar add i, _y, yPos);
}
------END CODE----
Im fairly certain the reason it doesnt work it because I cant assign movie clips as strings, but I cant figure out how to set up an array of movie clips to be randomly accessed. Could someone please let me know what to do?
Thanks.
.ryan.
Preloader Placement
Using Flash MX 2004
Hi, where do I place the preloader in the timeline? I have a portfolio and I have an image in frames 1, 3, 5, 7 etc. do I create a new layer named "preloader" then create a keyframe in frame 1, 3, 5, 7 etc and place the preloader in those frames or do I put the preloader in the frame before the image?
Thanks
PS if someone could upload a simple .fla file showing their preloader place ment it would help me to understand this a lot. : )
Hittest Placement
Okay, I have a menu/submenu. On the rollOver state of the button on the main menu I have an attachMovie action. The attached mc contains two more buttons. I want the attached mc to be removed when the cursor is not over either of the two sub-buttons.
Someone recommended using hittest to accomplish this. This is the first time I've used hittest, so I'm having problems. Namely, where do I place the script for the hittest? Everything I've read so far says, to place the script on the instance of the mc where I want the function to happen, but because I'm using attachMovie to call the mc, there is no actual instance on the stage that I can write script to.
Any help on how to do this, or if there is a completely different way I should go about trying to accomplish what I want is greatly appreciated.
I'm including the file.
Graph Value Placement
I am trying to make a graph, the graph's height is 260px, so I need to place dots (values) according to the number passed to it.
What would be the best formula to place the value?
Conditionals And Placement Of AS
I've got two questions:
1) I always use a separate layer for my ActionScript, and I will have script in keyframes. That script will effect only that frame. Is there any way to have script that is effects the entire scene/movie (ex: a button), without scripting that for every keyframe?
2) I have 4 scenes, (Scene1, Scene2, Scene3, and Scene4). When I click a button in scene1 I want Scene 2 and Scene4 to play (but not Scene3). I also have a button in Scene4 that I want to play Scene3 then Scene1. It looks like I'm going to have to use an if/then statement. How then does one code and if/then statement, similar/like the one I'm trying to make?
Thanks for your help.
|