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




Dynamic Positioning Problem (Please Help)



Okay I am making a drop-up menu (drop-down that goes up) and am having major problems with getting the child links to be placed in the correct area. I have attached the fla so you can see what it is doing. I need to know what I am doing wrong and why it is positioning the child items incorrectly and scattered. I have also attached the xml file if you want to have that as well. What I am needing it to do is simply take each parent and place the child links direcly under it. Any help would be greatly appreciated.



KirupaForum > Flash > Flash 8 (and earlier)
Posted on: 04-10-2007, 07:12 PM


View Complete Forum Thread with Replies

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

Dynamic Positioning Help
Here is what I have:
_root.createEmptyMovieClip("imageHolder"+f, 200+f);
_root.imageHolder+f._x=5 * f;
_root.imageHolder+f._y=100;

But Flash doesnt allow the '+f' being added onto the positioning since it isn't directly part of of the variable's name. What can I do?

I have Flash MX 2004

Dynamic Positioning
hi.

i have a calendar and it calculates the width of each row dynamically:
code:
numCols = 7 // 7 days in the week
columnWidth = _width/7;

very nice-nice. however, the rows aren't that easy because depending upon where the first day of the month falls, there could be either 4, 5, or 6 rows. currently, i hard code the values for the rows, i.e.:
code:
startThirdRow = 50;
tuesday_mc._y = startThirdRow

and when a new row starts, i do this:
code:
// If it's Saturday, Increment the Week Count
if (firstDay == 7) {
firstDay = 0;
startThiRowYPos += 25;
}

that's not going to cut it because i'm building a component and i need to program it so it can be resized by the end user.

any ideas? as always, any help is greatly appreciated.

thanks. fumeng.

Dynamic Positioning
how can i position a movieclip on the stage that has been dynamically loaded with a dynamic instance name?

[F8] Dynamic Positioning
Greetings,

I’m relatively new to action script so this may take a while. I am attempting to create a website which can be controlled via an external .txt file. I have all the Text, Images, and menu items being taken from a single .txt file and now I want to experiment with the dynamic positioning of say text boxes and loader components.

What I am aiming for is providing a set of CoOrds in a text file and having flash apply them to a text field or loader.

I know I am way out of my depth but if anyone could give me a few pointers or knows of an idiots tutorial, it would help me greatly.

Cheers,

Atomiser

Dynamic Positioning
Hi,
I have a problem with my xml gallery. I load each picture on a container and on the onEnterFrame of this container i'm waiting that the picture is loaded, i take the _width and _height and center the picture then a fadein effect. All is working great except that i can see the picture moving while the fadin. I tried everything i think but didn't find what to change to make it work properly.
Here's some of my code and a link to see what's happen :
http://adesign.tonsite.biz/xml_alerie/xml_galerie.swf

Code:
function attache_btn() {

//Create an array of the xml values with the function tableaux()

tableaux();
//Create a container for the buttons
_root.createEmptyMovieClip("thumb_mc", 1);

thumb_mc._x = 10;

thumb_mc._y = 10;

nb_ligne=3;

nb_colonne=3;

//attach the tooltip 'thumb_mc'

thumb_mc.attachMovie("texte","tooltip_mc",100,{_visible:false});

//attach 'container_image' on the scene

_root.attachMovie("container_image","container_mc",0,{_y:10,_x:120});

container_mc.preloader._visible=false;

thumb_mc.tooltip_mc.onEnterFrame = function() {

if (_global.x == 1) {

this._x = Math.round(_root._xmouse);

this._y = Math.round(_root._ymouse);

this._visible = true;

} else {

this._visible = false;

}

};

//attach les buttons inb the container

nb_images = images_xml.firstChild.childnodes.length;

for (i=0; i<nb_images; i++) {

thumb_mc.attachMovie("Btn", "Btn"+i, i, {_x:35*(i%nb_ligne), _y:35*Math.floor(i/nb_colonne)});

thumb_mc["Btn"+i].i=i;

thumb_mc["Btn"+i].j=tableau_url[i];

//Rollover

thumb_mc["Btn"+i].onRollOver=function(){

this.gotoAndPlay("over");

_global.x=1;

thumb_mc.tooltip_mc.caption.text=tableau_texte[this.i];



//Format tooltip

thumb_mc.tooltip_mc.caption.background=true;

thumb_mc.tooltip_mc.caption.backgroundColor="0xFFFFFF";

thumb_mc.tooltip_mc.caption.autoSize=true;

thumb_mc.tooltip_mc.caption.border=true;

thumb_mc.tooltip_mc.caption.bordercolor="0xCCCCCC";

}



//Rollout

thumb_mc["Btn"+i].onRollOut=function(){

this.gotoAndPlay("out");

_global.x=0;

}



//Release

thumb_mc["Btn"+i].onRelease=function(){

container_mc.container._alpha=0;

container_mc.container.loadmovie(this.j);

container_mc.onEnterFrame=function(){

//Preload the picture

charge=this.container.getBytesLoaded()

total=this.container.getBytesTotal()

rapport=Math.round((charge*100)/total);

if(charge==total){

this.preloader._visible=false;

this.preloader.barre._xscale=0;

//pos the picture in the center

largeur=(this._width/2)-(this.container._width/2);

hauteur=(this._height/2)-(this.container._height/2);

this.container._x=largeur;

this.container._y=hauteur;

this.container._visible=true;

}else{

this.preloader.barre._xscale=rapport;

trace(this.preloader.barre._xscale);

this.container._visible=false;

this.preloader._visible=true;

}



//fadein picture

this.container._alpha+=5;

if(this.container._alpha>=100){

this.container._alpha=100;

trace(this.container._alpha);

delete this.onEnterFrame;

}

};

}



//text on each button

thumb_mc["Btn"+i].texte=tableau_num[i];



}



}

Top Right Dynamic Positioning
Hey All,

how would you go about positioning a MC in the top right hand corner - a few pixels. And How to get it to stay even on Resize? to get it to stay in that corner so it moves with the screen resize??

Cheers,

Dynamic Positioning
I am using actionscript to place every thing on the flash dynamically. However, when I was finished I noticed a tiny little bug that I just can't fix. Whenever the stage.height is an even number one of the objects is misaligned by half a pixel. When ever the stage.height is odd it is perfect. See images below for what I mean.

Here is the related actionscript (called upon load and resize):

ActionScript Code:
left_object1._x = Stage.width / 2 - left_object1._width;left_object1._y = Stage.height / 2 - (left_object1._height / 2);right_object2._width = Stage.width / 2;right_object2._x = Stage.width / 2;right_object2._y = Stage.height / 2 - (right_object2._height / 2);


Object 1 is: 109px x 255px
Object 2 is: 1/2 stage width x 253px





Does anyone know how to fix this silly problem? I was thinking something to do with rounding down? But I don't know really. I would really appreciate the help!

Dynamic Positioning
Hi,
I have a problem with my xml gallery. I load each picture on a container and on the onEnterFrame of this container i'm waiting that the picture is loaded, i take the _width and _height and center the picture then a fadein effect. All is working great except that i can see the picture moving while the fadin. I tried everything i think but didn't find what to change to make it work properly.
Here's some of my code and a link to see what's happen :
http://adesign.tonsite.biz/xml_alerie/xml_galerie.swf

Code:
function attache_btn() {

//Create an array of the xml values with the function tableaux()

tableaux();
//Create a container for the buttons
_root.createEmptyMovieClip("thumb_mc", 1);

thumb_mc._x = 10;

thumb_mc._y = 10;

nb_ligne=3;

nb_colonne=3;

//attach the tooltip 'thumb_mc'

thumb_mc.attachMovie("texte","tooltip_mc",100,{_visible:false});

//attach 'container_image' on the scene

_root.attachMovie("container_image","container_mc",0,{_y:10,_x:120});

container_mc.preloader._visible=false;

thumb_mc.tooltip_mc.onEnterFrame = function() {

if (_global.x == 1) {

this._x = Math.round(_root._xmouse);

this._y = Math.round(_root._ymouse);

this._visible = true;

} else {

this._visible = false;

}

};

//attach les buttons inb the container

nb_images = images_xml.firstChild.childnodes.length;

for (i=0; i<nb_images; i++) {

thumb_mc.attachMovie("Btn", "Btn"+i, i, {_x:35*(i%nb_ligne), _y:35*Math.floor(i/nb_colonne)});

thumb_mc["Btn"+i].i=i;

thumb_mc["Btn"+i].j=tableau_url[i];

//Rollover

thumb_mc["Btn"+i].onRollOver=function(){

this.gotoAndPlay("over");

_global.x=1;

thumb_mc.tooltip_mc.caption.text=tableau_texte[this.i];



//Format tooltip

thumb_mc.tooltip_mc.caption.background=true;

thumb_mc.tooltip_mc.caption.backgroundColor="0xFFFFFF";

thumb_mc.tooltip_mc.caption.autoSize=true;

thumb_mc.tooltip_mc.caption.border=true;

thumb_mc.tooltip_mc.caption.bordercolor="0xCCCCCC";

}



//Rollout

thumb_mc["Btn"+i].onRollOut=function(){

this.gotoAndPlay("out");

_global.x=0;

}



//Release

thumb_mc["Btn"+i].onRelease=function(){

container_mc.container._alpha=0;

container_mc.container.loadmovie(this.j);

container_mc.onEnterFrame=function(){

//Preload the picture

charge=this.container.getBytesLoaded()

total=this.container.getBytesTotal()

rapport=Math.round((charge*100)/total);

if(charge==total){

this.preloader._visible=false;

this.preloader.barre._xscale=0;

//pos the picture in the center

largeur=(this._width/2)-(this.container._width/2);

hauteur=(this._height/2)-(this.container._height/2);

this.container._x=largeur;

this.container._y=hauteur;

this.container._visible=true;

}else{

this.preloader.barre._xscale=rapport;

trace(this.preloader.barre._xscale);

this.container._visible=false;

this.preloader._visible=true;

}



//fadein picture

this.container._alpha+=5;

if(this.container._alpha>=100){

this.container._alpha=100;

trace(this.container._alpha);

delete this.onEnterFrame;

}

};

}



//text on each button

thumb_mc["Btn"+i].texte=tableau_num[i];



}



}

Dynamic Positioning?
Hello,

I am working on a project and am in need of some help.

I know this is a simple issue, but I'm just running into walls.
I have a 5 nav buttons and a slider window. As you click on
one of the navs it's position is set and the slider moves either
right or left depending on the position of the button to the slider.

Now, that all works just fine except that my slider is moving
at slider._x = slider._x + (or -) 10
so that when it gets to the location it should stop at it jump to
ten on oneside (right) and then it jumps to the left on the other side.
I need to dynamically set the slider to slide and stop. I have tried
a hitTest but sometimes that doesn't work either and my slider
convulses. Does anyone have a possible solution for me that would make
this slide smooth fast and stop where it needs to reliably?

jay

Dynamic Text Positioning
Hello,

I have several text fields which gets dynamic value,
the length of the values can be different from one initialization to another.

how can I align all the text fields to each other, the size of the field is fixed ?

any idea of how to tackle this

thanks in advance
/monga.

Positioning Dynamic Jpegs
Greetings,

I am loading external jpegs into a flash mx file. No problem there, but they only seem to want to be positioned from the upper left corner. I would like to position them from the upper right corner instead so as to fit my movie correctly. Doesn't seem like the registration point can be changed. Any help would be greatly appreciated.

Thanks in advance.

Dynamic Text Box Positioning
Hi
i posted about this earlier but the thread seems to have dissappeared.
Im populating three dynamic text boxes with variables from a php script, and trying to get them to line up underneath each other dependent on how many lines of text is in each, i.e. box 2 sits just under box 1 irrespective of whether box 1 has 12 or 72 lines of text in it. each text box is in its own mc.

the action script:

/////set text box sizes to auto /////

_root.namemc.NAME.autoSize = true;
_root.studiedmc.STUDIED.autoSize= true;
_root.textmc.TEXT.autoSize= true;

///// load variables /////

var quotesVars = new LoadVars();
quotesVars.onLoad = function(ok) {
if (ok) {
studiedmc.STUDIED.text = quotesVars.STUDIED;
namemc.NAME.text = quotesVars.NAME;
textmc.TEXT.text = quotesVars.TEXT;

}
};
quotesVars.load("http://mydomain.uk/code/servers/quote.php");

///// position three movieclips containing textboxes at zero //////

setProperty (studiedmc, _y, 0);
setProperty (namemc, _y, 0);
setProperty (textmc, _y, 0);

//////get the height of the the 'name' movieclip//////

var nameheight = getProperty (namemc, _height);

////// and position 'studied' movieclip accordingly //////

setProperty (studiedmc, _y, nameheight);

/////get hieght of 'studied' movieclip /////

var studiedheight = getProperty (studiedmc, _height);

////// add the 2 together //////
var textpos = (studiedheight + nameheight);

/////and position text movieclip accordingly //////

setProperty (textmc, _y, textpos);

</actionscript>

it doesnt seem to make any difference how many lines are in each box, they always lie in the same position.

any pointers greatly appreciated.
thanks
ben

Dynamic Sizing And Positioning
Hi in ammendment to my previous post, i am trying to get this file to work and still can't! my aim is to get the bar that is clicked on to resize to 398px width and make the other bars move accordingly so they fit and they resize to 40px. a the moment i only have the code working to make the bars move. any help would be greatly appreciated!

(mx2004)

Dynamic Text Positioning
currently i am dynamically creating a text box within a dynamically created MC and using the tween class to manipulate there _xscale and _yscale properties.

because the the registration point is at 0,0 (top left), then it animates from scale 0-100 (x and y) rather than appearing to come from the centre, it appears to grow from the corner

how can i make it so the MC's registration point is centre on the text box?

Dynamic Navigation Positioning
Hi all,
I need some help.
I've setup a loop which runs and attaches buttons for a horizontal navigation, the button text is dynamic so the width of the button varies. I am checking the width of the text box and using this value to set the width of the button. This is all fine, the problem is with the positioning of the buttons. I don't want them to be equally spaced using something like xPos = i *50;

If button 01 is 50 wide and button 02 is 30 wide then button 02 would need to be positioned at 50 so it follows on from button 01. Then the 3rd button would be at 50+30 and so on. Hope this makes sense, it's a bit tricky to explain.

Here's my code

PHP Code:



for (i=0; i<clientInfo.length; i++) {         
clientId = clientInfo[i][0];         
clientName = clientInfo[i][1];         
clientButtons = attachMovie("client_button", clientId, i+20);
clientButtons.clientTxt.text = clientName;         
//Scale the button's width         
clientButtons.clientTxt.autoSize = "left";         
buttonXsize = clientButtons.clientTxt._width;
clientButtons.clientButtonHit._width = buttonXsize;         
//Position the buttons         
clientButtons._y = 150;
// this next bit is where i need help         
clientButtons._x = 150*i;     
}
}




Any help much appreciated
Thanks

Movieclip ._x & ._y Dynamic Positioning
I have a set of movie clips I need to position within the bounds of a circle with equal distances between each movie clip. Basically, I need to dynamically position movie clips like you would position the numbers on a clock but it would not be limited to just 12 as the number of movie clips changes.

I am loading my movies via attachMovie:

for(var i=0; i < 26; i++) {
this.attachMovie("mc", "mc" + i, this.getNextHighestDepth());
}

... and am stuck on how to set the x/y coordinates for what I need. Again, it would resemble a clock with 26 numbers and the clock would have a diameter of 130.

Any help would be greatly appreciated.

Dynamic Navigation Positioning
Hi all,

I need some help, it's pretty urgent. I don't normally state that but this time it really is

I've setup a loop which runs and attaches buttons for a horizontal navigation, the button text is dynamic so the width of the button varies. I am checking the width of the text box and using this value to set the width of the button. This is all fine, the problem is with the positioning of the buttons. I don't want them to be equally spaced using something like xPos = i *50;

If button 01 is 50 wide and button 02 is 30 wide then button 02 would need to be positioned at 50 so it follows on from button 01. Then the 3rd button would be at 50+30 and so on. Hope this makes sense, it's a bit tricky to explain.

Here's my code


ActionScript Code:
for (i=0; i<clientInfo.length; i++) {
        clientId = clientInfo[i][0];
        clientName = clientInfo[i][1];
        clientButtons = attachMovie("client_button", clientId, i+20);
        clientButtons.clientTxt.text = clientName;
        //Scale the button's width
        clientButtons.clientTxt.autoSize = "left";
        buttonXsize = clientButtons.clientTxt._width;
        clientButtons.clientButtonHit._width = buttonXsize;
        //Position the buttons
        clientButtons._y = 150;
// this next bit is where i need help
        clientButtons._x = 150*i;
    }
}

Any help very much appreciated.
Thanks

Positioning Dynamic Textboxes
Hi, I was hoping someone would have some advice on this. It's been driving me nuts all afternoon.

Basically I have 2 dynamic textboxes, both with the same variable name but different instance names (txt1 and txt2). For the design, I need the second box, which is slightly underneath the other, to have its x position half way along the text in the first box. I've tried writing txt2._x=txt1.width/2, but this isn't working, and in fact when I use trace the width of the first textbox is coming back as 1.5, regardless of whether the text input is 4 letters or 100 letters long.

Does anyone have any ideas?

Many thanks.

Dynamic Positioning Of XML Text
Hi!

I have XML text I load into different MCs with attachMovie. For each XML node I create a new MC with 3 text fields and place it on stage.

I need to (but can't!!) place each MC under the previous one, and _y will depend on the previous MCs height (amount of text). It is the third text field (txt3) that would have varying height.


for (var i = 0; i<news.length; i++) {
item = Container.attachMovie("newi", "newi"+i, i);
item.txt1 =this.firstChild.childNodes[i].childNodes[0].firstChild.nodeValue;
item.txt2= this.firstChild.childNodes[i].childNodes[1].firstChild.nodeValue;
item.txt3 = this.firstChild.childNodes[i].childNodes[2].firstChild.nodeValue;
item._x = 80;
item._y = ???????;

}

Does this make any sense? Any help would be much much appreciated!!
Thanks in advance!

Trouble With Dynamic Positioning _y
I’m stumped with this maybe someone here can help.

I have a list of collapsible move clips.
When anyone of the clips is closed or opened the rest or the clips in the list react by changing position.
I had this running with and on enter frame event. But that was a memory hog when too many items were in the list.
So what I want to do is this
When any clip is closed or opened it triggers this function



Code:
function resetY() {

for (var i = order; i>=many; i++) {
this.onEnterFrame = function() {
_y = previousitem._y+previousitem.box._height;
roundB4me = Math.ceil(previousitem._y+previousitem.box._height);
roundme = Math.ceil(_y);
if (roundB4me == roundme) {
delete this.onEnterFrame;
}


}
}
My problem is with placing this clip on clips in the _parent.
So what I want is more like this:



Code:
function resetY() {

for (var i = order; i>=many; i++) {
_parent[nextClip+i]onEnterFrame = function() {
_y = previousitem._y+previousitem.box._height;
roundB4me = Math.ceil(previousitem._y+previousitem.box._height);
roundme = Math.ceil(_y);
if (roundB4me == roundme) {
delete this.onEnterFrame;
}


}
}
But I cant use: _parent[nextClip+i]onEnterFrame = function() {
Can any one help me out with this?
Thanks for any help!

Positioning Dynamic Images
Hello,

This is my first but probably not last time that I will be asking a question.

I am creating a fully dynamic XML based flash site.

here is a sample of some of my code:

myXML = new XML();
myXML.ignoreWhite = true;
myXML.load("gallery.xml");
myXML.onLoad = function() {
numimages = this.firstChild.childNodes.length
logospacing = 70
spacing =90;
for (i=0; i<numimages; i++) {
loader._x = 250;
loader._y = 220;
title_txt._x = 250;
title_txt._y = 420;
logos._x = 25;
trace (logos._x)
logos._y = 25;
picHolder = this.firstChild.childNodes[i];
this.logoHolder = _root.logos.createEmptyMovieClip("logo"+i, i);
this.logoHolder._x = i*logospacing;
this.logoHolder.logo = picHolder.attributes.logo;
this.logoHolder.campain = picHolder.attributes.campain;
this.logoLoader = this.logoHolder.createEmptyMovieClip("logo_image"+ i, i);
var twlm:Tween = new Tween(sep1, "_y", Regular.easeOut, 0, 92, 1, true);
var twlm:Tween = new Tween(logomask, "_alpha", Regular.easeInOut, 100, 0, 1, true);
var twlh:Tween = new Tween(logos, "_y", Regular.easeOut, -75,25, 1, true);
this.logoLoader.loadMovie(picHolder.attributes.log o);

My question is how do I position the created logoHolder with all the logos that are going to be dynamically loaded by the XML to be centered on the stage via _x.

I know that the positioning of the logoHolder can be positioned by setting the logos._x to a value and it will put it on the stage along the x axis.

What I would really like is for the logos to either be centered on the stage or have them spread out accross the stage evenly but staying within the boundaries of the stage.

If this is confusing I am sorry. But you can check out what I have done so far by going to HERE and what i mean by the logos being spaced. The logos I want spaced properly are the Puma logos.

Thnks in advance for your help.

Movieclip ._x & ._y Dynamic Positioning
I have a set of movie clips I need to position within the bounds of a circle with equal distances between each movie clip. Basically, I need to dynamically position movie clips like you would position the numbers on a clock but it would not be limited to just 12 as the number of movie clips changes.

I am loading my movies via attachMovie:

for(var i=0; i < 26; i++) {
this.attachMovie("mc", "mc" + i, this.getNextHighestDepth());
}

... and am stuck on how to set the x/y coordinates for what I need. Again, it would resemble a clock with 26 numbers and the clock would have a diameter of 130.

Any help would be greatly appreciated.

Dynamic Positioning Of XML Text
Hi!

I have XML text I load into different MCs with attachMovie. For each XML node I create a new MC with 3 text fields and place it on stage.

I need to (but can't!!) place each MC under the previous one, and _y will depend on the previous MCs height (amount of text). It is the third text field (txt3) that would have varying height.


for (var i = 0; i<news.length; i++) {
item = Container.attachMovie("newi", "newi"+i, i);
item.txt1 =this.firstChild.childNodes[i].childNodes[0].firstChild.nodeValue;
item.txt2= this.firstChild.childNodes[i].childNodes[1].firstChild.nodeValue;
item.txt3 = this.firstChild.childNodes[i].childNodes[2].firstChild.nodeValue;
item._x = 80;
item._y = ???????;

}

Does this make any sense? Any help would be much much appreciated!!
Thanks in advance!

Positioning Dynamic Movieclip Over Another
I am working with this script and would like the larger images to display over the thumbnails . I am having trouble positioning it over it's thumbnail?

I couldn't figure it out. Any guidance?


Any help is appreciated.

I only posted what I think is the neceesary code... if you need more, just let me know.


Code:
var thumbHolder : MovieClip = this.createEmptyMovieClip("holder_mc", this.getNextHighestDepth()); // movie clip that holds all the thumbnails
var mc : MovieClip = this.createEmptyMovieClip("mc", this.getNextHighestDepth()); // mc for the loaded images, that will show up when you click something
var thumb : MovieClip; // movie clip that holds the movie clip that the thumb will be loaded into
var button : MovieClip; // movie clip that the thumb will be loaded into

// function requires 2 parameters, the url of the thumb, and movie clip we need to load the thumb into
function loadThumb(path_url:String, mc:MovieClip) {
mc.loadMovie(path_url); // load the thumb into the movie clip
temp_mc = _root.createEmptyMovieClip("temp_mc", _root.getNextHighestDepth()); // create a temporary movie clip to handle our onEnterFrame event
temp_mc.onEnterFrame = function() {
l = mc.getBytesLoaded(); // get the bytes loaded
t = mc.getBytesTotal(); // get the bytes total
percent = l/t; // get the percent between the two
if (percent>=1) { // if the percent is greater to our equal to 1, this means the thumbnail is loaded
curr++;
if(curr <= tN-1) {
loadThumb(path_a[curr], mA[curr]);
thumbText.text = (curr+1)+" / "+tN+" THUMBNAILS LOADED";
}
else {
thumbText.text = (curr--)+" / "+tN+" THUMBNAILS LOADED";
animate(tA[currAn], xRA[currAn], xPA[currAn], yRA[currAn], yPA[currAn], r_w_h_array[currAn], blurArray[currAn]);
}// for a little extra flare, lets animate the thumb into the grid from a random position
// set up the text properly
temp_mc.removeMovieClip(); // delete the onEnterFrame event
}
};
}

[as1] Issues With Dynamic Positioning
What I want to do is simply place some MCs in a certain area after they have been created with the 'attachMovie' script. Here is my code, am I barking up the wrong tree?

ActionScript Code:
//---functions---
//
function setPos(clipName, xPos, Ypos) {
    clipName._x = xPos;
    clipName._y = yPos;
}
//---button code---
//
tb1_btn.onRelease = function() {
    count++;
    attachMovie("playerClip", "pClip"+count+"_mc", count);
    attachMovie("itemClip", "iClip"+count+"_mc", count+10);
    setPos("pClip"+count+"_mc", 400, 400);
};

Dynamic Positioning / Textfield / Autosize
ok, basicily what im trying to do is convert some string to array, and populate it to separate dynamic textfields, so I will be able to make every word clickable. No problem with that. What im strugling with is positioning a textfields like they are layout in a normal textBox. For some reason it's behaves very funny unless I change the autosize to "right" but then im running into trouble when spliting a text to few lines instead of having a very long one. (look commented field)

hopefuly someone can understand what my problem is. attache *FLA might be helpful.


Please help
Thank you
/M



code:
str = "at some point you may have to be a flash-db member to use is the web service we are invoking in this case"
var myWords = [];
myWords = str.split(" ");

for (var i = 0; i < myWords.length; i++) {
_root.holder.attachMovie("textField_mc","word_"+i, 100+i);
var word = _root.holder["word_"+i];
if (i != 0) {
var previousWord = _root.holder["word_"+(i-1)]
var previousWordWidth = previousWord._width
} else {
var previousWord= 0;
var previousWordWidth = 0;
}
word.label.autoSize = true;
word.label.text = myWords[i];
var w = word._width;
word._x = previousWord._x + w
trace(word._x)
//if (word._x > 200) {
//word._y +=20
//}
}

Positioning In Dynamic Image Gallery
Hi

I have built a dynamic image gallery that works brilliantly except that the loaded image falls in the top left corner of the container.......which i have a feeling there is not much i can do about.
So is there a way of determining the image size and work off that so that I can adjust the area for the image so that it can be centralized irrespetive of image shape.

i hope you know what i mean. ( i also hope i know what I mean?)

Dynamic Positioning Using External Files
Greetings,

I’m relatively new to action script so this may take a while. I am attempting to create a website which can be controlled via an external .txt file. I have all the Text, Images, and menu items being taken from a single .txt file and now I want to experiment with the dynamic positioning of say text boxes and loader components.

What I am aiming for is providing a set of CoOrds in a text file and having flash apply them to a text field or loader.

I know I am way out of my depth but if anyone could give me a few pointers or knows of an idiots tutorial, it would help me greatly.

Cheers,

Atomiser

Dynamic Image Caption Positioning
I have a Flash slideshow that pulls the image information from an XML file. You've probably seen these all over the place. Anyway, what I'd like to do is make the text accompanying the image to appear below or to the side of an image depending on the image dimensions. For example, if the image is vertical the flash file should be smart enough to put the caption to the right. On the otherhand, if I have a wide horizontal shot the caption would appear below it. Sounds pretty simple, but I'm not sure how to do this. Anyone seen a good tutorial or know of an easy way to automate this?

Dynamic Positioning / Textfield / Autosize
ok, basicily what im trying to do is convert some string to array, and populate it to separate dynamic textfields, so I will be able to make every word clickable. No problem with that. What im strugling with is positioning a textfields like they are layout in a normal textBox. For some reason it's behaves very funny unless I change the autosize to "right" but then im running into trouble when spliting a text to few lines instead of having a very long one. (look commented field)

hopefuly someone can understand what my problem is. attache *FLA might be helpful.


Please help
Thank you
/M

str = "at some point you may have to be a flash-db member to use is the web service we are invoking in this case"
var myWords = [];
myWords = str.split(" ");

for (var i = 0; i < myWords.length; i++) {
_root.holder.attachMovie("textField_mc","word_"+i, 100+i);
var word = _root.holder["word_"+i];
if (i != 0) {
var previousWord = _root.holder["word_"+(i-1)]
var previousWordWidth = previousWord._width
} else {
var previousWord= 0;
var previousWordWidth = 0;
}
word.label.autoSize = true;
word.label.text = myWords[i];
var w = word._width;
word._x = previousWord._x + w
trace(word._x)
//if (word._x > 200) {
//word._y +=20
//}
}

ScrollPane Content Dynamic Positioning?
Hello list,

I am trying to "reset" my ScrollPane content back to its original scale and position. My scaling is working, but I am having trouble repositioning the content back to its original coordinates. I thought I could set the scroll positions, but can't find anything that would suggest that.

I've looked at all the main forums for this, but can't find anything. Therefore, I post.
Hopefully one of you guys/girls knows how I can do this. Thanks for any help.

I've posted the snippet I'm using to handle this below.
sp: the ScrollPane
mc_map: the content name

Jim








Attach Code

function initMap():void
{

/* set postion */
MovieClip(sp.content).mc_map.x = 0;
MovieClip(sp.content).mc_map.y = 0;

/* set scale */
sp.content.width = fitMapWidth;
sp.content.height = fitMapHeight;

/* set scroll limits */
maxHScrollVal = sp.content.width - sp.width;
maxVScrollVal = sp.content.height - sp.height;

}

























Edited: 12/28/2007 at 08:41:26 AM by Jim_W

Problem With Mac IE And Dynamic Image Positioning
Hello all. I'm new here so I hope this goes in the right place.

I'm using MX 2004 for a photographic portfolio project. The site seems to work fine on 99% percent of systems. Unfortunatley a strange error occus when viewing the site with IE on Mac OSX.

I a dynamically loading images using LoadMovie and repostioning them so that they are centred. Sometimes with Mac IE the image doesn't get centred and is loaded with the top left corner in the centre of the screen as it would had the repositioning not happened.

This only happens sometimes and only with some images and with different images each time. I can reproduce the effect on my Mac but am stumped as to why it happens. I have ruled out the flash player version (it happens with them all) and have tried numerous export settings.

Here's the code for the loading and repositioning and the link, any ideas?

http://www.stevenewbold.co.uk

if (_root.image1loaded == false) {
//load image to empty movie clip
_root.images.createEmptyMovieClip("holder1", 1001);
_root.images.holder1.loadMovie("flashimagesmac/mike.jpg");
//loader
_root.images.attachMovie("loader", "loader1", 10);
_root.images.loader1._alpha = 50;
_root.images.loader1._xscale = 50;
_root.images.loader1._yscale = 50;
_root.images.loader1._x = _root.images.holder1._x;
_root.images.loader1._y = _root.images.holder1._y;
//check loading
_root.images.onEnterFrame = function() {
var bl = _root.images.holder1.getBytesLoaded();
var bt = _root.images.holder1.getBytesTotal();
if (bt>4) {
// if the movie has started loading
var percentage = Math.round(bl/bt*100);
var percentile = Math.round(percentage/10);
this.loader1.gotoAndPlay(percentile+1);
if (bl>=bt) {
// the movie has finished loading

//remove loader
_root.images.loader1.removeMovieClip();
//center image
_root.images.holder1._x = -(_root.images.holder1._width/2);
_root.images.holder1._y = -(_root.images.holder1._height/2);
//make sure image is visable
_root.images.holder1._visible = true;
// delete the method
delete this.onEnterFrame;
// tell the button the image is now loaded
_root.image1loaded = true;
}
}
};
}

Problem With Mac IE And Dynamic Image Positioning
Hello all. I'm new here so I hope this goes in the right place.

I'm using MX 2004 for a photographic portfolio project. The site seems to work fine on 99% percent of systems. Unfortunatley a strange error occus when viewing the site with IE on Mac OSX.

I a dynamically loading images using LoadMovie and repostioning them so that they are centred. Sometimes with Mac IE the image doesn't get centred and is loaded with the top left corner in the centre of the screen as it would had the repositioning not happened.

This only happens sometimes and only with some images and with different images each time. I can reproduce the effect on my Mac but am stumped as to why it happens. I have ruled out the flash player version (it happens with them all) and have tried numerous export settings.

Here's the code for the loading and repositioning and the link, any ideas?

http://www.stevenewbold.co.uk

if (_root.image1loaded == false) {
//load image to empty movie clip
_root.images.createEmptyMovieClip("holder1", 1001);
_root.images.holder1.loadMovie("flashimagesmac/mike.jpg");
//loader
_root.images.attachMovie("loader", "loader1", 10);
_root.images.loader1._alpha = 50;
_root.images.loader1._xscale = 50;
_root.images.loader1._yscale = 50;
_root.images.loader1._x = _root.images.holder1._x;
_root.images.loader1._y = _root.images.holder1._y;
//check loading
_root.images.onEnterFrame = function() {
var bl = _root.images.holder1.getBytesLoaded();
var bt = _root.images.holder1.getBytesTotal();
if (bt>4) {
// if the movie has started loading
var percentage = Math.round(bl/bt*100);
var percentile = Math.round(percentage/10);
this.loader1.gotoAndPlay(percentile+1);
if (bl>=bt) {
// the movie has finished loading

//remove loader
_root.images.loader1.removeMovieClip();
//center image
_root.images.holder1._x = -(_root.images.holder1._width/2);
_root.images.holder1._y = -(_root.images.holder1._height/2);
//make sure image is visable
_root.images.holder1._visible = true;
// delete the method
delete this.onEnterFrame;
// tell the button the image is now loaded
_root.image1loaded = true;
}
}
};
}

Dynamic Movieclip Positioning Prob
Hi there,

I have a problem with this xml news system. I need each duplicated MC to be stacked in the bottom of each other, by calculating height + space between each MC. The problem is it assumes the last MC height, so the 1st XML entry, which has a big textfield with autoSize on stays over the bottom modules.

Can you please check why it only accesses the last MC height value? I really dont know how to solve this. Take the attached file (Flash 8).

» get the file here «

Dynamic Positioning / Textfield / Autosize
ok, basicily what im trying to do is convert some string to array, and populate it to separate dynamic textfields, so I will be able to make every word clickable. No problem with that. What im strugling with is positioning a textfields like they are layout in a normal textBox. For some reason it's behaves very funny unless I change the autosize to "right" but then im running into trouble when spliting a text to few lines instead of having a very long one. (look commented field)


Please help
Thank you
/M

ActionScript:--------------------------------------------------------------------------------
str = "at some point you may have to be a flash-db member to use is the web service we are invoking in this case"
var myWords = [];
myWords = str.split(" ");

for (var i = 0; i < myWords.length; i++) {
_root.holder.attachMovie("textField_mc","word_"+i,100+i);
var word = _root.holder["word_"+i];
if (i != 0) {
var previousWord = _root.holder["word_"+(i-1)]
var previousWordWidth = previousWord._width
} else {
var previousWord= 0;
var previousWordWidth = 0;
}
word.label.autoSize = true;
word.label.text = myWords[i];
var w = word._width;
word._x = previousWord._x + w
trace(word._x)
//if (word._x > 200) {
//word._y +=20
//}
}

Dynamic Button Creation Positioning Help Please
Hey all

I have another quick (hopefully) question for you guys.

Ok, so this is the senario: I'm doing the news example from the action script studio book from Friends of ED and all is just brilliant. It all works fine and it's cool.

I now want to play around and try different things since this application can be used for so many different things.

What i want to do is generate dynamic buttons which display 4 buttons on a line and then the fith starts on a second line below button 1.

As i said, it's fine creating the buttons and all, but how do i check when it's the last button of the line and tell flash to start another line?

Thanx in advance

Dynamic Positioning And Repositioning Of Movieclips
hi there

i am trying to write a layout algorhythm in actionscript for a "word" cloud - like http://www.wordle.net see attachment...

am thinking of doing initial layout with hit test ..... not sure if this will successfully 'justify' the movieclips

but then i want to add new movieclips (words) as and when and for them to 'squeeze' into spaces (thus pushing others out)........ a bit like apples bobbing in a bucket....

any ideas... has anyone attempted anything similar......

thanks a million

andy

Carousel 3: Dynamic Content Positioning
Hey there guys,

I am still working on my own carousel and would like to change the position of the content depending on wich page im viewing.

At the moment i have a holder_mc that loads all of my content when an icon is clicked. But i want to change its position on different pages so that the content will fit on the screen.

Would this be done through my xml document by making 2 new attributes(xPos and yPos) then calling them back in my Actionscript ?

Here's my XML

Code:

<icons>


<icon image="YellowH.png" tooltip="Gallery" content="Gallery" loadSwf="gallery.swf" back="click to return"/>


<icon image="RedH.png" tooltip="Resume" content="Resume" loadSwf="resume.swf" back="click to return"/>


<icon image="BlueH.png" tooltip="Video" content="Video" loadSwf="flvPlayer.swf"  back="click to return"/>


<icon image="GreenH.png" tooltip="Contact" content="Contact" loadSwf="contact.swf"  back="click to return"/>


</icons>



Here's my Actionscript:


Code:

import mx.utils.Delegate;
import mx.transitions.Tween;
import mx.transitions.easing.*;

var numOfItems:Number;
var radiusX:Number = 300;
var radiusY:Number = 75;
var centerX:Number = Stage.width / 2;
var centerY:Number = Stage.height / 2;
var speed:Number = 0.05;
var perspective:Number = 250;
var home:MovieClip = this;
theText._alpha = 0;

var tooltip:MovieClip = this.attachMovie("tooltip","tooltip",10000);
tooltip._alpha = 0;
holder._alpha = 0;


var xml:XML = new XML();
xml.ignoreWhite = true;

xml.onLoad = function()
{
   var nodes = this.firstChild.childNodes;
   numOfItems = nodes.length;
   for(var i=0;i<numOfItems;i++)
   {
      var t = home.attachMovie("item","item"+i,i+1);
      t.angle = i * ((Math.PI*2)/numOfItems);
      t.onEnterFrame = mover;
      t.toolText = nodes[i].attributes.tooltip;
      t.content = nodes[i].attributes.content;
      t.backTo = nodes[i].attributes.back;
      t.icon.inner.loadMovie(nodes[i].attributes.image);
      t.ref.inner.loadMovie(nodes[i].attributes.image);
      t.loadSwf = nodes[i].attributes.loadSwf;
      t.icon.onRollOver = over;
      t.icon.onRollOut = out;
      t.icon.onRelease = released;
   }
}



function over()
{
   
   var sou:Sound = new Sound();
   sou.attachSound("Boop");
   sou.start();
   
   home.tooltip.tipText.text = this._parent.toolText;
   home.tooltip._x = this._parent._x;
   home.tooltip._y = this._parent._y - this._parent._height/2;
   home.tooltip.onEnterFrame = Delegate.create(this,moveTip);
   home.tooltip._alpha = 100;
}

function out()
{
   delete home.tooltip.onEnterFrame;
   home.tooltip._alpha = 0;
}

function released()
{
   
   var sou:Sound = new Sound();
   sou.attachSound("hum");
   sou.start();
   
   home.tooltip._alpha = 0;
      for(var i=0;i<numOfItems;i++)
   {
      var t:MovieClip = home["item"+i];
      t.xPos = t._x;
      t.yPos = t._y;
      t.theScale = t._xscale;
      delete t.icon.onRollOver;
      delete t.icon.onRollOut;
      delete t.icon.onRelease;
      delete t.onEnterFrame;
      if(t != this._parent)
      {
         var tw:Tween = new Tween(t,"_xscale",Strong.easeOut,t._xscale,0,1,true);
         var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut,t._yscale,0,1,true);
         var tw3:Tween = new Tween(t,"_alpha",Strong.easeOut,150,0,1,true);
      }
      else
      {
         var tw:Tween = new Tween(t,"_xscale",Strong.easeOut,t._xscale,150,1,true);
         var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut,t._yscale,150,1,true);
         var tw3:Tween = new Tween(t,"_x",Strong.easeOut,t._x,50,1,true);
         var tw4:Tween = new Tween(t,"_y",Strong.easeOut,t._y,600,1,true);
         var tw5:Tween = new Tween(theText,"_alpha",Strong.easeOut,0,150,1,true);
         var tw7:Tween = new Tween(theTextBack,"_alpha",Strong.easeOut,0,150,1,true);
         theText.text = t.content;
         theTextBack.text = t.backTo;
         
          _root.createEmptyMovieClip("holder",1);
            _root.holder._x = 300;
            _root.holder._y = 50;

            var tw6:Tween = new Tween(holder,"_alpha",Strong.easeOut,0,100,1,true);
            holder.loadMovie(t.loadSwf)
         
         var s:Object = this;
         tw.onMotionStopped = function()
         {
            s.onRelease = unReleased;                           
         }
      }
   }
}

function unReleased()
{
   
   var sou:Sound = new Sound();
   sou.attachSound("sdown");
   sou.start();
   
   
   delete this.onRelease;
   delete _root.createEmptyMovieClip("holder",1);
   
   var tw:Tween = new Tween(theText,"_alpha",Strong.easeOut,150,0,0.5,true);
   var tw:Tween = new Tween(theTextBack,"_alpha",Strong.easeOut,150,0,0.5,true);
   for(var i=0;i<numOfItems;i++)
   {
      var t:MovieClip = home["item"+i];
      if(t != this._parent)
      {
         var tw:Tween = new Tween(t,"_xscale",Strong.easeOut,0,t.theScale,1,true);
         var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut,0,t.theScale,1,true);
         var tw3:Tween = new Tween(t,"_alpha",Strong.easeOut,0,150,1,true);
      }
      else
      {
         var tw:Tween = new Tween(t,"_xscale",Strong.easeOut,150,t.theScale,1,true);
         var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut,150,t.theScale,1,true);
         var tw3:Tween = new Tween(t,"_x",Strong.easeOut,t._x,t.xPos,1,true);
         var tw4:Tween = new Tween(t,"_y",Strong.easeOut,t._y,t.yPos,1,true);
         tw.onMotionStopped = function()
         {
            for(var i=0;i<numOfItems;i++)
            {
               var t:MovieClip = home["item"+i];
               t.icon.onRollOver = Delegate.create(t.icon,over);
               t.icon.onRollOut = Delegate.create(t.icon,out);
               t.icon.onRelease = Delegate.create(t.icon,released);
               t.onEnterFrame = mover;
            }
         }
      }
   }
}


function moveTip()
{
   home.tooltip._x = this._parent._x;
   home.tooltip._y = this._parent._y - this._parent._height/2;
}

xml.load("icons.xml");

function mover()
{
   this._x = Math.cos(this.angle) * radiusX + centerX;
   this._y = Math.sin(this.angle) * radiusY + centerY;
   var s = (this._y - perspective) /(centerY+radiusY-perspective);
   this._xscale = this._yscale = s*100;
   this.angle += this._parent.speed;
   this.swapDepths(Math.round(this._xscale) + 100);
}

this.onMouseMove = function()
{
   speed = (this._xmouse-centerX)/4500;
}


Any help is always greatly appreciated

Thanks
Hamo

Wierd Dynamic Sizing / Positioning Problem
OK so i wrote some code dynamically rezise and position an mc which is having an image laoded into it using the MovieClipLoader class. All was working fine until i added my re-positioning code. (at least i think it was, i was tinkering around with it still at 4am....) Anywho... now if you load (for example, it does vice verca) a wide image first (width>height) it scales fine (and is centered fine) If you then load a long image (height>width) it centers fine but this time it makes it 11.25 pixels shorter than than it's supposed to be... Which is wierd considering i'm using Math.round before i scale it!

Here is the MovieClipLoader functions (i removed the onLoadProgress, onLoadComplete & onLoadError functions as they make no reference to the target MC and would make this post even longer :P) :


Code:
//create an instance of MovieClipLoader
var myMCL = new MovieClipLoader();
myMCL.onLoadStart = function(targetMC) {
var loadProgress = myMCL.getProgress(targetMC);
//to reset position of target MC
targetMC._y = 20;
targetMC._x = 20;
};
myMCL.onLoadInit = function(targetMC) {
//the size i wish it to be scaled to in 1 axis
var size = 275;

if (targetMC._height>targetMC._width) {

while (targetMC._height>size) {
targetMC._height -= Math.round(targetMC._height/size);
targetMC._width -= Math.round(targetMC._width/size);
}
//repositioning code
var diffx = (size-targetMC._width);
targetMC._x += diffx/2

} else if (targetMC._width>targetMC._height) {


while (targetMC._width>size) {
targetMC._height -= Math.round(targetMC._height/size);
targetMC._width -= Math.round(targetMC._width/size);
}
//repositioning code
var diffy = (size-targetMC._height);
targetMC._y += diffy/2
myTrace("diff is "+diffy);
}

};
it's really annoying because it dosen't seem to affect the positioning, which i thought it would???

please HELP!!!

love you all

x

Menu W/ Dynamic Images + Width & Positioning
For part of a site I'm working on, I'm creating dynamic submenus that are built from a loop into an empty movie clip, attaching set-up movie clips to display product names and load in external JPGs. I'd like to be able to center the entire menu horizontally but I realize that the widths of these movie clips cannot be determined until the JPGs are fully loaded in. My question is, how would I set up a function that could determine when all of these JPGs are loaded and then center their parent clip? And this function would have to apply to varying numbers of menu items and JPGs of varying widths -- can anyone help? Thanks...

Dynamic Positioning Kills A Timeline Tween? (CS3)
Hi, I'm working on a banner ad project where we're trying to send dynamic variables from one of our servers to position a movieclip that simply slides in from offstage and then does a little bounce.

My AS2 frame script at the beginning of the tween sets the _x and _y properties of the clip successfully. But that seems to destroy all the movement of the tween. In other words, when I set those two positioning properties on the clip, it just sits there and no longer slides in or bounces.

I've tried a lot of different values, but they all seem to kill the movement of the tween. Any constructive ideas would be appreciated, thanks!

Document Structure For Dynamic Scaling And Positioning
Hi all

This is my first post. I'd rate myself between advanced beginner and intermediate in my development skills. Today I have a question; I hope another day I'll provide an answer.

I'm trying to get my head around document structure and have a site that needs something like the following http://www.hzdg.com/. What this does that I have not yet understood, is it seems to have a container movie that scales to x 100% and y100% but the loaded movies don't scale. Loaded movies maintain position relative to the scaled container and relative to each other or some unseen or at least non-obvious object.

How do I break the link the scaled parent? I tried Stage.scaleMode = "noScale"; in a test on a child movie but it kept the parent from scaling as well [which made no sense to me.] Any suggestions? TIA

John Paul

AS 2 Trouble With Positioning Dynamic Text For A Menu
I've got some simple code that I'm struggling with. Can someone point out what I've done incorrectly? I can't position the text in the center of gradient_mc, and the trace reports that the gradient_mc is NOT 200 wide, like it should be.

What am I missing?

All that's required is a linked font symbol in the library.

Thanks everyone

QUICK EDIT:
if I change the numbers in the creation of the textField and comment out the line for autosize, the height and width seem to be correct.
What if I can't know the width of the text? Shouldn't autosize do the trick?


Code:
gradient_mc.createTextField("myText", gradient_mc.getNextHighestDepth(), 0, 0, 200, 32);

Code:
var SW:Number = Stage.width;
var SH:Number = Stage.height;
var _gradientWidth:Number = 200;
var _gradientHeight:Number = 32;
//_textsize set to the approximate width of a letter
var _textsize:Number = 18;
this.createEmptyMovieClip("gradient_mc", this.getNextHighestDepth());

gradient_mc.createTextField("myText", gradient_mc.getNextHighestDepth(), 0, 0, 0, 0);
var myTextFormat:TextFormat = new TextFormat();
//TextField myText;
//TextFormat myTextFormat;
myTextFormat.font = "Artist_Choice";
myTextFormat.size = _textsize;
myTextFormat.color = 0xFFFFFF;
myTextFormat.align = "left";
gradient_mc.myText.autoSize = "left";
gradient_mc.myText.multiline = true;
gradient_mc.myText.border = "true";
gradient_mc.myText.embedFonts = true;
gradient_mc.myText.antiAliasType = "advanced";
gradient_mc.myText.gridFitType = "subpixel";
gradient_mc.myText.sharpness = 75;
gradient_mc.myText.thickness = -15;
gradient_mc.myText.text = "hey there";
gradient_mc.myText.setTextFormat(myTextFormat);
//
gradient_mc.myText._x = gradient_mc._width / 2;
gradient_mc.myText._y = gradient_mc._height / 2;
trace("gradient_mc.myText._x " + gradient_mc.myText._x);
trace("gradient_mc.myText._y " + gradient_mc.myText._y);
trace("gradient_mc._width " + gradient_mc._width);
trace("gradient_mc._height " + gradient_mc._height);
trace("gradient_mc.myText._width " + gradient_mc.myText._width);
trace("gradient_mc.myText._height " + gradient_mc.myText._height);
/*
gradient_mc.myText._x = (gradient_mc._width/2) - (gradient_mc.myText._width/2);
gradient_mc.myText._y = (gradient_mc._height/2) - (gradient_mc.myText._height/2);
*/
var fillType:String = "radial";
var colors:Array = [0x651178, 0x8888FF];
var alphas:Array = [100, 100];
var ratios:Array = [0, 0xFF];
var matrix:Object = {a:_gradientWidth, b:0, c:0, d:0, e:_gradientHeight, f:0, g:_gradientHeight, h:_gradientHeight, i:1};
var spreadMethod:String = "reflect";
var interpolationMethod:String = "linearRGB";
var focalPointRatio:Number = .95;
with (gradient_mc) {
beginGradientFill(fillType, colors, alphas, ratios, matrix, spreadMethod, interpolationMethod, focalPointRatio);
moveTo(0, 0);
lineTo(_gradientWidth, 0);
lineTo(_gradientWidth, _gradientHeight);
lineTo(0, _gradientHeight);
lineTo(0, 0);
endFill();
}

HELP Full Browser Flash - Dynamic Positioning
HELP!
I Want to do something like this:

http://www.easybit.it/flash2005/main.php?language=eng

or like

http://www.converse.com/index.asp?bhcp=1

I can´t do it , one bar always on top, another on bottom, and a movie always in the midle.
When browser resizes, everythings moves to place, how do they do it? ANYONE?
Can anyone help? Post FLA or explain the code, please. :'(
Thanks so much.

AS2 - Dynamic Positioning Kills A Timeline Tween?
Hi, I'm working on a banner ad project where we're trying to send dynamic variables from one of our servers to position a movieclip that simply slides in from offstage and then does a little bounce.

My AS2 frame script at the beginning of the tween sets the _x and _y properties of the clip successfully. But that seems to destroy all the movement of the tween. In other words, when I set those two positioning properties on the clip, it just sits there and no longer slides in or bounces.

I've tried a lot of different values, but they all seem to kill the movement of the tween. Any ideas here?

HELP Full Browser Flash - Dynamic Positioning
HELP!
I Want to do something like this:

http://www.easybit.it/flash2005/main.php?language=eng

or like

http://www.converse.com/index.asp?bhcp=1

I can´t do it , one bar always on top, another on bottom, and a movie always in the midle.
When browser resizes, everythings moves to place, how do they do it? ANYONE?
Can anyone help? Post a FLA or code please.
Thanks so much.

Flash MX - Dynamic Text Field Positioning...
Hi,

I have 2 dynamic text fields, drawing their content from a text file containing 2 variables (text). Both text fields are set to autosize, so they change in width according to the amount of characters in the variable.

I also have the following code to position text field 2 to the right of text field 1:

textField2._x = textField1._x + textField1._width + 5;
textField2._y = textField1._y;

When the textfield is static, it works fine. However, using dynamic text seems to be a problem and the right field just displays 5 pixels from the left x position of text field 1.... I think the problem is the way i've set up the script - it doesn't appear to recognise the width of textfield 1 as set by the autosize command.

If anyone can help I'd be very much obliged.
Cheers

Dynamic Textbox Width - Positioning Movie Clip
Hi,

I have a dynamic text box which will display text of varying lengths. To the right of this I have a movie clip. I want to be able to set the x position of the movie clip as the x position where the text ends.

I assumed this would be easy:

_root.mc._x = _root.textBox._x + _root.textBox._width

The movie does move when I use this code but it doesn't move to the end of the text it positions itself within the bounds of the text box.

It looks like it is something to do with the textBox._width property but I am not sure what. Can anyone point me towards how to get the x position of the end of a text box? and also what exactly the textBox._width does.

Many Thanks

Dynamic Positioning Of The Rollover Images In A Movie Clip
hi everybody...

i am facing a problem... i have a movie in which i have 50 thumbnails dynamically added to a mc and i have a scroller to scroll the mc which works fine.. on each thumb i have a rollover image (which is a bigger image of the thumb) which works fine but i want the rollover image to be shown within the area of mask area which is not happening now.. i am attaching herewith the fla and swf...
please help..

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