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








Positioning Content Trouble


Hi and thanks for a great forum!

Im using this code to position my logo on the first frame and it works:

Stage.scaleMode = "noScale";
Stage.align = "TL";
var stageListener:Object = new Object ();
stageListener.onResize = positionContent;
Stage.addListener(stageListener);
function positionContent():Void {
mcLogo._x = Stage.width / 2 - mcLogo._width / 2;
mcLogo._y = Stage.height / 2 - mcLogo._height / 2;
}
positionContent();

But if i want to position more movieclips on lets say frame 3, i thought i could just ad them to the function i have on the first frame like:

Stage.scaleMode = "noScale";
Stage.align = "TL";
var stageListener:Object = new Object ();
stageListener.onResize = positionContent;
Stage.addListener(stageListener);
function positionContent():Void {
mcLogo._x = Stage.width / 2 - mcLogo._width / 2;
mcLogo._y = Stage.height / 2 - mcLogo._height / 2;
mcNew._x = Stage.width / 2 - mcNew._width / 2;
mcNew._y = Stage.height / 2 - mcNew._height / 2;

}
positionContent();

But when i put the new mc on frame 3, it doesnt position like i wrote in the function on frame 1. It just stays where i put it on the stage.

Any idea what im doing wrong?

Cheers!

Andreas




KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 11-14-2007, 01:45 AM


View Complete Forum Thread with Replies

Sponsored Links:

External Content Loader With Multiple Content Types (trouble Loading Graphics)
Hey all!

I am yet another new project. Our flash designer here isn't a big AS guy, and asked me to write a reusable class so that he can load a variety of content types using minimal amount of code on his part. It's also going to be the main component piece in a larger external content player once I'm done with the class itself, so I am making the loading functions into public methods of the loader object than can be called from a button, etc.

I have the code for the text and html parts working (although I can't get stage.width and stage.height to work in the class or from the frame).

The problem I have is that I can't get the graphics content to load (the swf/pic content). Could you please check my code and tell me what I'm missing? I'm sure it's something simple, like it always is.

thanks a million!

-Fish


-----------------------------


ActionScript Code:
package
{
   
    /**
    * External Multimedia Loader Class
    * @author $(DefaultUser)
    * Add new MultiLoader object and insert media type (all lowercase) and object path to control initial loaded object
    * To load a new object, call the MultiLoader.load* methods (loadText, loadPic, loadSwf, or loadHtml as appropriate), passing the path to the external file.
    */
   
    import flash.display.*;
    import flash.events.*;
    import fl.transitions.*;
    import fl.transitions.easing.*;
    import flash.net.URLLoader;
    import flash.net.URLRequest;
    import flash.text.TextField;
   
    public class MultiLoader extends MovieClip
    {
        private var media:String;
        private var path:String;
        public var textObj:TextField = new TextField;
        public var picObj:MovieClip = new MovieClip;
        public var swfObj:MovieClip = new MovieClip;
        public var htmlObj:TextField = new TextField;
        private var objLoader:Loader = new Loader();
        private var objType:String;
        private var textLoader:URLLoader = new URLLoader();
       
       
       
        public function MultiLoader(mediaType:String,objPath:String)
        {
            media = mediaType;
            path = objPath;
           
            if (media == "text" || media == "TEXT" || media == "Text")
            {
                loadText(objPath);
            }
            else if (media == "pic" || media == "PIC" || media == "Pic")
            {
                loadPic(objPath);
            }
            else if (media == "swf" || media == "SWF" || media == "Swf")
            {
                loadSwf(objPath);
            }
            else if (media == "html" || media == "HTML" || media == "Html")
            {
                loadHtml(objPath);
            }
            else
            {
                trace("ERROR: Media type not supported. Media type must be 'text', 'pic', 'swf', or 'html'.");
            }
        }
       
        public function loadText(txtPath):void
        {
            objType = "text";
           
            if (this.numChildren > 0)
            {
                this.removeAllChildren();
            }
           
            this.addChild(textObj);
            this.textLoader.load(new URLRequest(txtPath));
            this.textObj.wordWrap = true;
            this.textObj.multiline = true;
            this.textLoader.addEventListener(Event.COMPLETE, addTextContent);
            //this.textObj.width = this.width;
            //this.textObj.height = this.height;
        }
       
        public function loadPic(picPath):void
        {
            trace("loadPic started");
           
            objType = "pic";
           
            if (this.numChildren > 0)
            {
                this.removeAllChildren();
            }
           
            this.addChild(picObj);
            this.objLoader.addEventListener(Event.COMPLETE, addObjLoader);
            this.objLoader.load(new URLRequest(picPath));
           
            trace("loadPic completed");
        }
       
        public function loadSwf(swfPath):void
        {
            trace("loadSwf started");
            objType = "swf";
           
            if (this.numChildren > 0)
            {
                this.removeAllChildren();
            }
           
            this.addChild(swfObj);
            this.objLoader.addEventListener(Event.COMPLETE, addObjLoader);
            this.objLoader.load(new URLRequest(swfPath));
           
            trace("loadSwf completed");
        }
       
        public function loadHtml(htmlPath):void
        {
            objType = "html";
           
            if (this.numChildren > 0)
            {
                this.removeAllChildren();
            }
           
            this.addChild(htmlObj);
            this.textLoader.load(new URLRequest(htmlPath));
            this.htmlObj.wordWrap = true;
            this.htmlObj.multiline = true;
            this.textLoader.addEventListener(Event.COMPLETE, addTextContent);
        }
       
        private function removeAllChildren():void
        {
            if (objType == "pic")
            {
                this.picObj.removeChild(objLoader);
            }
            else if (objType== "swf")
            {
                this.swfObj.removeChild(objLoader);
            }
            else
            {
                trace("objType != 'pic' or 'swf.' objType = '" + objType + "'.");
            }
           
            while ( this.numChildren > 0 )
            {
                this.removeChildAt(0);
            }
        }
       
        private function addObjLoader(event:Event):void
        {
            trace("addObjLoader started");
           
            if (objType == "pic")
            {
                trace("trying to load pic");
                this.picObj.addChild(this.objLoader);
                this.picObj.objLoader.removeEventListener(Event.COMPLETE, addObjLoader);
            }
            else if (objType== "swf")
            {
                trace("trying to load swf");
                this.swfObj.addChild(this.objLoader);
                this.swfObj.objLoader.removeEventListener(Event.COMPLETE, addObjLoader);
            }
            else
            {
                trace("ERROR: Cannot add object loader. The 'objType' variable does not contain correct media type. The function 'addObjLoader' should only be called when objType is 'pic' or 'swf'. In this case, objType is '" + objType + "' .");
            }
           
            trace("addObjLoader completed");
        }
       
        private function addTextContent(event:Event):void
        {
            if (objType == "text")
            {
                this.textObj.text = event.target.data as String;
                this.textLoader.removeEventListener(Event.COMPLETE, addTextContent);
            }
            else if (objType == "html")
            {
                this.htmlObj.htmlText = event.target.data as String;
                this.textLoader.removeEventListener(Event.COMPLETE, addTextContent);
            }
            else
            {
                trace("ERROR: Cannot add text content. The 'objType' variable does not contain correct media type. The function 'addTextContent' should only be called when objType is 'text' or 'html'. In this case, objType is '" + objType + "' .");
            }
        }

    }
   
}

View Replies !    View Related
Positioning Content With AS2
Hi,

How to position my "full flash website" content in top left or top right or center or whtever place, to be extensible with users different resolutions.

Regards.

View Replies !    View Related
Moving & Positioning Content
I am trying to position everything I have done to the right of my document and in another file, but when i move it it is not bringing the mask and everything else in the correct position.

How do i do this?

View Replies !    View Related
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!

View Replies !    View Related
Trouble Positioning MCs And Textfields
The picture shows what I'm trying to do.

Here's my code:

Code:
for (var i = 0; i<nTotalPics; i++) {

main.createEmptyMovieClip( "container"+i, i );
var container:MovieClip = main["container"+i];
container.createEmptyMovieClip( "pic"+i, i );
var pic:MovieClip = container["pic"+i];

// load images
mcl.loadClip( astrImages[i], pic );
}

// when the image finishes loading
mclListener.onLoadInit = function(pic:MovieClip){
_level0.main.container2.createTextField("txtQuan", i+1, 0, 100, 80, 20);
var txtQuan:TextField = _level0.main.container2.txtQuan;
txtQuan.text = "How many : ";
}

// add the listener to the MovieClipLoader Object
mcl.addListener(mclListener);
I've got two questions:

First, if I add "trace (pic._name);" inside the onLoadInit function it outputs "pic3,pic2,pic1,pic0". Why does it show up in reverse order of the for-loop?

Second, is the "pic:MovieClip" in "mclListener.onLoadInit = function(pic:MovieClip)" pointing to the "pic" in "mcl.loadClip( astrImages[i], pic );"? If not, what is it pointing to? If it is, can I add another variable after "pic" so that I can pass it inside the onLoadInit function?

Ultimately what I would like to do is create a textfield under each pic.

I know this is a lot. It's just too much for me to troubleshoot because I'm overwhelmed with all of these at once. If you can answer just one question I would greatly appreciate it. Thanks all.

View Replies !    View Related
Positioning Dynamically Loaded Content
Hello.
I hope anyone can help me with a problem. I have a list of images (thumbnails) externally loaded into my flashfile. I'm using php, but while developing I,m using a textfile. This is OK. The images get loaded by the attachMovie method. Every image has a different width and different names. There will be a total of 60 images.

The problems:

- how can I position them dynamically so that they are placed next to each other. Now every new image is positioned at 0.

- if an empty MC is pulled from the library the _width seems to be 0 (or the value of the original), so that I can't calculate where to position the image relative to the prior image

- I want the images to be placed in rows depending of the value of _x. So instead of one long row, I'd like them to dynamically spread over several short rows. So that if the _x value is over 800, the next image should be moved to _y=100 and _x=0

- is there a method of getting the _width and _height of dynamically loaded content?

Here is my code:
************************************************** *******

PHP Code:



function loadimages(){

    for(var i=0; i<60; ++i){
        
        var name:String= "imageholder"+i;
        var x:Number = i * spacing;
        _root.attachMovie("clip",name,i);
        loadMovie(imagelist["image"+i],name);
        
    }
}
var imagelist:LoadVars = new LoadVars();
imagelist.onLoad = loadimages;
imagelist.load("imagearchive.txt"); 




************************************************** *******

This the code in imagearchive.txt
************************************************** *******

Code:
&image1=first_image.jpg&image2=cat.jpg&image3=house.jpg&image4=dog.jpg&image5=flower.jpg
************************************************** *******

I would be very gratefull if anyone can help me out. Thanks in advance.

Nole

View Replies !    View Related
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

View Replies !    View Related
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

View Replies !    View Related
Trouble Positioning Loaded Movie
Now that I got my swfs for my menu to show up (which link to different scenes in my root movie), I need to put a pointer showing which link it is currently on. What I want to do is load the pointer (a right-facing triangle) as a movie over the menu which is on level2. So I load the pointer movie onto level 4 and I want it to appear in different locations for each link (will be called from a each scene in the root movie). So I have this:

loadMovieNum("pointer.swf", 4);
setProperty(_level4, _x, 50);
setProperty(_level4, _y, 100);

I can't seem to manipulate where the pointer appears on my root movie. If I make a button and put the above setProperty as the action, it works fine, but I want it to appear in the proper place automatically. The pointer movie is 25x25 pixels. I don't want a separate pointer movie for all 15 links, so I'd like to be able to position this one. Thanks.

View Replies !    View Related
Trouble With Positioning Of Images In Gallery
I decided I should probably post this in the Newbie forum rather than the ActionScript forum, since I am a noob to Flash and this is more of a general Flash question than an ActionScript one.

I'm trying to create a Flash gallery of image files I will later embed within another Flash file to create a portfolio of some of my art and design work. The gallery I'm working with is a modified version of the one found at kirupa.com at http://www.kirupa.com/developer/mx2004/thumbnails2.htm .

For reference, here is the .fla file I'm working with right now (I'm using Flash 8, btw):
http://www.johnmilesart.com/Sketches/Sketches.fla
Here's a version saved for MX 2004:
http://www.johnmilesart.com/Sketches/SketchesMX2004.fla

Here is the associated .xml file:
http://www.johnmilesart.com/Sketches/images.xml

And here is the compiled .swf file:
http://www.johnmilesart.com/Sketches/Sketches.swf

The images themselves are located under the directory http://www.johnmilesart.com/Sketches/SketchesImages/ . They are gloveandhat.jpg , ladyinhatandglasses.jpg , and newbalance.jpg .

As you will see once you take a look at the .swf, I'm having some trouble getting the images to display zoomed and positioned how I want them. I have a box 500 px in width and 400 px in height set up to display them, and each image has been created at exactly these dimensions to fit perfectly. However, for some reason the images are displaying zoomed in and positioned off-center. I'm sure there's a relatively easy solution to this problem, but being new to Flash, it's evading me right now. I'd appreciate it greatly if someone could help me out a bit with this. Also, as you'll probably notice, I decided to remove the thumbnail navigation aspect, leaving just the next and previous buttons to navigate. If someone could help me remove the leftover thumbnail code to save space, that would be great.

Thanks again!

View Replies !    View Related
Help With Empty Movieclips & Loaded Content Positioning
Hi,

Im having trouble centering my loaded jpegs (in the holder mc) on the stage (the jpeg's are all different sizes). I've attached my folder with the files (in the following post). If anyone's able to offer any good pointers/tutorials relating to this i'll be very gratefull. i.e :Loading content into empty clips /
The significance of registration points

Thanks in advance,

cesca

ps) I'm wondering if i have to put each jpeg in a swf first? I hope not, i have about 80 in total)....but If so can anyone show me example code of what i would put in the first frame of each of my swf's to get it to center on the stage when it loads......many many thanks in advance

View Replies !    View Related
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();
}

View Replies !    View Related
Trouble With Y-axis Positioning / Formatting Dynamic Text Field
Hi,

Ok, here's what I've got. I have an input text field and then a submit button. The submit button places whatever text that the user enters into the input field into a dynamic text field. I then have three buttons that change the font in the dynamic field, and three more buttons that change the fontsize (using if statements).

My problem is that one of the fonts does not line up exactly as the others do on the y axis. It appears to jump down a few units when I change the font. Also, when I change the font size, using the buttons, they align to the top of the text box, appearing jump up. I've been trying all kinds of scripts, but theres always something that causes trouble.

I'm wanting the positions along the y axis for each font to appear to be even, which I have accomplished simply by defining the y-axis position for each font, on each button that changes the font. That works great. But when I change the font size to a smaller font, I want each size to still line up on the y-axis. And after I achieve this, the movie needs to be able to remember the positioning for when I go back to change the font, it will not jump back to where it was before.

Here's my script on one of the buttons that change the font:

on (release) {
myTxtFmt = new TextFormat();
myTxtFmt.font = "Franklin Gothic Medium";//Linkage name of the font in the library
_root.SignTextColor.setTextFormat(myTxtFmt);
_root.SignTextColor.setNewTextFormat(myTxtFmt);
_root.SignTextColor._y = 7.2;
gotoAndStop(1);
}



Here's my script on one of the buttons that change the font size:

on (release) {
myTxtFmt = new TextFormat();

if (myTxtFmt.font != "Franklin Gothic Medium") {
myTxtFmt.size = "57";
_root.SignTextColor.setTextFormat(myTxtFmt);
_root.SignTextColor.setNewTextFormat(myTxtFmt);
}
if (MyTxtFmt.font != "ATFAntique") {
myTxtFmt.size = "55";
_root.SignTextColor.setTextFormat(myTxtFmt);
_root.SignTextColor.setNewTextFormat(myTxtFmt);
}
if (myTxtFmt.font != "Hudson") {
myTxtFmt.size = "58";
_root.SignTextColor.setTextFormat(myTxtFmt);
_root.SignTextColor.setNewTextFormat(myTxtFmt);
}

gotoAndStop(1);
}



Can you help?
Thank you very much!

View Replies !    View Related
Trouble With Preloading Xml Content
hej peeps,

after working my way through some tutorials and searching on the forum,
i still have a question concerning preloading some xml content.

i'm trying to copy a movieclip called "containerMC" based on the data in my xml file.
the "containerMC" contains a movieclip (instance name "image") in which i load a picture using this script.
the script is placed on frame1 of the mainstage.


PHP Code:



myXML = new XML();
myXML.ignoreWhite = true;
myXML.onLoad = function (success) {
mainNode = this.firstChild;
if (success) {
for (i=0; i<mainNode.childNodes.length; i++) {
theClip=_root.attachMovie"containerMC", "containerMC"+i, i);
theClip._x = theClip._y = 0;
theClip._y += 350*i;
theClip.image.loadMovie(mainNode.childNodes[i].childNodes[0].firstChild.nodeValue);
theClip.textClip.textContainer.text = mainNode.childNodes[i].childNodes[1].firstChild.nodeValue;
            
};
};
};

myXML.load("images1.xml"); 




this works just fine .. but i want every image to be preloaded seperately
(i hope this makes sense).

i figured that i have to create a preloader movieclip inside the "containerMC"
only i'm at a loss where i put the code for my preloader ... and which code to use.


i hope someone can help me out or point me in the right direction,

thnx in advance,

odin

View Replies !    View Related
Trouble With Targets Out Of Scroll Pane Content
I've got a movieclip that is being scrolled inside of a scrollpane.
Inside of that movieclip are a group of child movieclips, and each child contains a button.

The buttons should target a placeholder movieclip on the same timeline as the scrollpane, and use loadmovie to bring new content into that placeholder.

My problem is, no matter how I direct the target from those buttons, I can't get access to the "placeHolder" clip.

I set up a trace function on the timeline I'm trying to get to, and I can activate that function from my buttons - with _parent._parent._parent.function()

But if I try
loadMovie("name.swf", "_parent._parent._parent.placeHolder");
I get nothing. I need to use relative targets rather than absolute, but I even tried _root and that still wouldn't work.

I'm at the end of my rope with this. I know my placeHolder clip is named what I'm looking for. I know my buttons can find that timeline. But because the buttons are in the scrollpane they don't seem to want to work correctly for loadmovie.

Am I crazy? Has anyone else ever run into this problem before?

View Replies !    View Related
Trouble Linking Content Within Attached Movieclip
Ok, so as the title indicated I am having trouble linking a flv file with a playback component via actionscript. Here's a breakdown of what's going on:

At the root level I have attached a movieclip named Navigation. Inside of Navigation is a button that attaches another movieclip, named List, also at the root level. Inside of List is another button that attaches a third movielcip, named Movie.

Inside of Movie is an FLVPlayback component, instance name Player, with no content linked. The code for the button in List is as follows:

on (release) {
_root.attachMovie("movie", "movie1", 3);
_root.movie1._x = 250;
_root.movie1._y = 0;
_root.movie1.player.contentPath= "http://home.comcast.net/~ptgerke/one.flv"
}

So the button in List successfully attaches Movie, and positions it correctly, but the FLVPlayback component, Player, never establishes connection with the flv file that I tried to direct it to.

Is there something simple that I'm messing up on?

Thanks for the help, and sorry if I didn't do a well enough job describing the situation. Let me know and I can further clarify or provide the .fla file or something.

Thanks

Pat

View Replies !    View Related
Trouble Printing Dynamic Content In Flash 8
Hi. I am having problems trying to print dynamic quiz results. I can get the entire page to print but not the dynamic content. I have included a link to where the fla is loaded....if you skip to question 7 submit an answer and then you will be to frame 70 with the output. That is the frame I am having troubles with.

Thank you Laura

http://www.awenarts.com/printFlashHelp.zip






























Edited: 05/30/2007 at 10:48:16 PM by lauratritz

View Replies !    View Related
Trouble Scrolling Dynamic, Xml Generated Content
I had scroll functionality working with the following code:


Code:
scrolling = function () {
var scrollHeight:Number = scrollTrack._height;
var contentHeight:Number = contentMain._height + 85;
var scrollFaceHeight:Number = scrollFace._height;
var maskHeight:Number = maskedView._height;
var initPosition:Number = scrollFace._y=scrollTrack._y;
var initContentPos:Number = contentMain._y;
var finalContentPos:Number = maskHeight-contentHeight+initContentPos;
var left:Number = scrollTrack._x;
var top:Number = scrollTrack._y;
var right:Number = scrollTrack._x;
var bottom:Number = scrollTrack._height-scrollFaceHeight+scrollTrack._y;
var dy:Number = 0;
var speed:Number = 10;
var moveVal:Number = (contentHeight-maskHeight)/(scrollHeight-scrollFaceHeight);

scrollFace.onPress = function() {
var currPos:Number = this._y;
startDrag(this, false, left, top, right, bottom);
this.onMouseMove = function() {
dy = Math.abs(initPosition-this._y);
contentMain._y = Math.round(dy*-1*moveVal+initContentPos);
};
};
scrollFace.onMouseUp = function() {
stopDrag();
delete this.onMouseMove;
};
btnUp.onPress = function() {
this.onEnterFrame = function() {
if (contentMain._y+speed<maskedView._y) {
if (scrollFace._y<=top) {
scrollFace._y = top;
} else {
scrollFace._y -= speed/moveVal;
}
contentMain._y += speed;
} else {
scrollFace._y = top;
contentMain._y = maskedView._y;
delete this.onEnterFrame;
}
};
};
btnUp.onDragOut = function() {
delete this.onEnterFrame;
};
btnUp.onRelease = function() {
delete this.onEnterFrame;
};
btnDown.onPress = function() {
this.onEnterFrame = function() {
if (contentMain._y-speed>finalContentPos) {
if (scrollFace._y>=bottom) {
scrollFace._y = bottom;
} else {
scrollFace._y += speed/moveVal;
}
contentMain._y -= speed;
} else {
scrollFace._y = bottom;
contentMain._y = finalContentPos;
delete this.onEnterFrame;
}
};
};
btnDown.onRelease = function() {
delete this.onEnterFrame;
};
btnDown.onDragOut = function() {
delete this.onEnterFrame;
};

if (contentHeight<maskHeight) {
scrollFace._visible = false;
btnUp.enabled = false;
btnDown.enabled = false;
} else {
scrollFace._visible = true;
btnUp.enabled = true;
btnDown.enabled = true;
}
};
scrolling();
Then the client wanted to be able to update content via an external XML file. Here is the code that parses the XML:


Code:
var my_xml = new XML();
my_xml.ignoreWhite = true;
my_xml.onLoad = function(success) {
// has XML loaded
if (success) {
var recInfo = my_xml.firstChild.childNodes;
var itemCount = 0;
var yCount = 0;
for (var i = 0; i<recInfo.length; i++) {
var recLink = recInfo[i].attributes.link;
var recTitle = recInfo[i].attributes.title;
var recDesc = recInfo[i].attributes.description;
var item = _root.contentBox.contentMain.attachMovie("recipeEntry_mc", "item"+itemCount, itemCount);
item.titleBox.text = recTitle;
item.descBox.text = recDesc;
item.link = recLink;
item.linkSymbol.onRelease = function() {
getURL(this._parent.link, "_blank");
};
item.descBox._height = item.descBox.textHeight + 8;
item._y = yCount;
yCount += item._height + 10;
itemCount++;

}

}

};
// load XML file
my_xml.load("sample.xml");
The problem is that the scroll functionality does not work with the XML derived content because for some reason it is not recognizing the height of the contentMain movie clip.

I've tried placing a fixed height object inside contentMain and the scrolling works based on the height of that object--but this does not solve anything as the height will change when recipes are added or taken away. I've tried sizing contentMain manually, which only stretches the data inside, and still is not recognized by the scrolling function. I would like the make sure that when contentHeight is defined in the scrolling function, that it regognizes the combined height of all instances of recipeEntry_mc that are generated within contentMain, thus allowing me to scroll this content as I could before when it was static.

Can anyone help, please?

View Replies !    View Related
Trouble Making The Active Content Update Work
Hello,

Please note, this is not a "What do I do about the white box?" question as I've already downloaded the updates, installed them, and published new .swf and .html files out of flash. This is more of a "What am I doing wrong?" question.

I downloaded and installed the update as stated on the Adobe Flash TechNote page

I received a confirmation message in Flash that the Apple Active Content update worked and have a "AC_RunActiveContent.js" file.

I brought my updated .swf file into Dreamweaver, and resaved my index.html file (my website's homepage which contains the updated .swf file). I uploaded the following files to my server:

1)my index.html file
2)my updated .swf file created from Flash
3)the updated .html file created from Flash (I don't think this is doing anything, but I uploaded it anyways-better to have it than not I figure)
4)the AC_RunActiveContent.js

I did everything that the Flash TechNotes told me to, so I'm wondering why this is not working. The white square still appears asking for confirmation, even though I have already uploaded all the files needed for the update.

Does it have to do with putting the .swf file into Dreamweaver? If so, this update does not help me at all, because I need to use the .swf in Dreamweaver to make a complete website.

Here are the sites:

http://freevox.us

This one is my main page created in Dreamweaver. If you view this in IE you will see the white box asking for confirmation.

Here is just the updated .html file that was created from Flash:

http://freevox.us/F-9.html

You will notice that here there is no problem with the confimation box.

If this is just a matter of putting the code in the right place in the Dreamweaver file, perhaps I can post my code and someone can help me find the right location to paste the active content code.

Thanks for any help you can offer.

View Replies !    View Related
Help Needed In Clearing The Content Of The XML File Content Displayed In The Flash
I have developed a flash file with combo box which displayes all the XML files in the directory and after selecting a particular XML file the flash file reads the XML file and displayes the content of the XML file in flash in a fashion I have done. But, if I chose another XML file which is a blank XML file, still the flash file shows the previous file's content in the flash. How to clear that previous file's content?

If I chose someother XML file which is having some content then it shows correctly. But, if I chose some blank XML file, the flash file shows the previous content instead of showing it blank. pls help me how to clear the previous file contents?

View Replies !    View Related
Why Does Flash Re-load Content When Content Within Hidden/shown Area?
Hi all,

A purely academic question for someone about how Flash loads. I've written a simple Flash image scroller script, see: http://www.benjaminkeen.com/software/image_scroller/

On the page above, I separated the various content (installation instructions, demo, download file, etc) into separate pages, which get hidden/shown via JavaScript. Very straightforward.

My question is: why, when you go from the "Overview" to "A few examples" sections (both of which have a demonstration scroller), does the flash get "re-drawn" each time? I don't understand - I thought that it would simply get loaded the first time the browser calls it - not every time the content becomes display:blocked through javascript...?

I guess my follow up question is: can this be prevented?

View Replies !    View Related
Scroll Pane Content - Accessing Values Within Content Mc
hey all -

i'm having a bit of a problem. i need to access the .text value of various text fields within a mc that is presented in a scroll pane. i need to check the value against another value, and i'm having trouble grabbing it.

here's what's not working:
//within a for loop where "i" is incrementing

myContent = scroll_pane.getScrollContent();
myText = eval(myContent + ".text" + i +"_txt");
trace (myText.text);

when I run this, myText ends up equal to: _level0.scroll_pane.tmp_mc.text10_txt

where i=10 in this case (all the others increment no problem)

however, if I trace (myText.text) I get nothing (not undefined, just nothing). however, if i forcibly trace(_level0.scroll_pane.tmp_mc.text10_txt.text), it will show me the .text of this text field.

any ideas as to what is happening here?

thanks

oh - flash mx on os x

View Replies !    View Related
Hiding/Masking Off-stage Content (external Content)
Hi,

I'm loading an image gallery into another movie. The image gallery itself uses XML to generate a row of thumbnails dynamically. In it's own player, this is fine, but when loaded into the larger movie, the row of thumbnails extends far beyond the container clip.

I've set the size of the container clip with an onLoad function, but I have no idea how to appropriately mask it so there is no spillover. Using a mask in the gallery clip doesn't work because the gallery is 100% scripted (unless I'm missing something terribly basic).

Is there a general method to use, aside from creating infinitely large opaque boundaries around the stage?

Thanks for any tips or insight!

View Replies !    View Related
AS3 Loader.content Access To Partially Loaded Content
I have a main swf that loads an external swf. The external swf is a fairly large video embeded on the timeline.

Ive got my Loader all setup correctly, handling PROGRESS, COMPLETE and INIT events all fine.

What id like to do (which i could do in AS2 very easily) is start the playing and accessing variables in the loaded swf before it finishes loading. If i do these things when the video swf is loaded completely, everything works fine.

Any attempt to access Loader.content or the container clip ive placed Loader.content in, BEFORE its finished loading (when it reachs, lets say, 20%), i get error:

#2099 The loading object is not sufficiently loaded to provide this information.

Anyone have any ideas on how it could be possible to start messing with loaded SWF content before all of its frames are loaded? Thanks in advance for lookin over my post!!

View Replies !    View Related
Content-Length Of Mp3 Not Receving Form Content Server
Hi,

we have develop one course using flash player 7 and action script 1.0 in macromedia flash. In this course we are facing one problem with mp3 file. we have used sound object to load external MP3 files. When these files are downloaded from content server we are not reciving content-length for this file in IE 6 + Flash player 8. If anybody knows the solution for this problem Please help me.

thsnks in advance..........

View Replies !    View Related
Not Reciving Content-length Of Mp3 File From Content Server
Hi,

we have develop one course using flash player 7 and action script 1.0 in macromedia flash. In this course we are facing one problem with mp3 file. we have used sound object to load external MP3 files. When these files are downloaded from content server we are not reciving content-length for this file in IE 6 + Flash player 8. If anybody knows the solution for this problem Please help me.

thsnks in advance..........

View Replies !    View Related
Dynamic Content Presented Over All Normal Content
I have a bunch of generated movie clips that I am creating using the duplicate movie clip function.

The problem I am having is the generated clips are covering up content. Are there any options....(I really don't feel like creating both layer a and b dynamically.)


this is how the movie is publishing:

-----layer A----- (generated content)
-----layer B----- (normal non-generated content)
-----layer C----- (normal non-generated content)


this is how i want the movie to publish:


-----layer A----- (normal non-generated content)
-----layer B----- (generated content)
-----layer C----- (normal non-generated content)


thanks for your help,
Reid

View Replies !    View Related
Error On Page: Level0.content.content
Hey guys, I hope this is the right place to post something like this.

I am definately a newbie at Flash, and I recently made a site for my gaming clan. ( http://www.aechq.com ) I have fixes all the bugs on the site, save for one that I can't find the problem that is making it occur. After the loadtext comes up for each individual page, an error will flash ( the same error that shows up when the page cannot be found ) and then the page will load normally. The error that flashes in the background is
Code:
level0.content.content
This is rather annoying, because if you aren't paying attention, you won't see it but once you do, you can't help but see it every time. Being the "noob" that I am, I don't have a clue how to fix this one...and I can't find what's wrong. If I could get some input, I'm sure it's just something small that I can't figure out.

Any help is appreciated, and off topic suggestions are fine too.

View Replies !    View Related
[CS3] How To Delay Html Content Until After Flash Content
I am working on a site where I want to have a few flash elements on the page ( i.e the navigation and the logo. ) to animate in before the the a block of text ( in a div) will be shown. The flash elements will stay on screen and be used after loading as the nav with interaction.

I don't want it to be a true flash intro before the site ( I already have one actually). I would rather it be a sequence that becomes visible as the page loads.

As I am typing I am wondering if this needs to be done in javascript or if it can be done via the embed parameters.

Any suggestions would be greatly appreciated

View Replies !    View Related
Button To Reveal Content Then To Hide Content
I'm using Flash MX and I have been able to create a button that moves an image down the page and slowly allows text to appear in its place. now i can't figure out how to get everything to go back when i hit the same button again.


thanks in advance.

View Replies !    View Related
LoadMovie Trouble Trouble Troubles
hello,

i'm having a little bit of trouble here trying to load multiple movies into the same container. not all at one time. like this:

when a button is clicked this happens in my preloader clip which is located in my _root movie:

********************************
// set vars
sectionMovie = _root.currentSection + ".swf";

// un/load movie
unloadMovie("_root.SectionContent");
loadMovie(sectionMovie, "_root.SectionContent");
********************************

then the next frame of the preloader says:

********************************
// get the percent of the movie loaded
bytesLoaded = _root.sectionContent.getBytesLoaded();
bytesTotal = _root.sectionContent.getBytesTotal();
percentLoaded = int((bytesLoaded / bytesTotal)*100);

// if it's loaded then continue
if (percentLoaded == 100) {
this.gotoAndStop (1);
}
********************************

it all seems like it should work. i click "button1" which loads "movie1.swf" perfectly. then i click "button2" and it will unload the movie fine, but it just stops when it gets to "loadMovie"... anyone know what is happening?

thakns in advance for the help, it's a school project...mwaahaha!

xo

View Replies !    View Related
"Oooooh Trouble Trouble..." (Foghat Reference +1000 Points)
I am attempting to add X movie clips to the stage via script, with follow AI behaviors added to each of them. But for now I am just having them immediately start moving left until they hit the stage edge OR eachother...which is the problem.

I cannot get them ALL to stop when they collide with somehting else on the stage...

the way I atempted to solve this problem was to start an array... a list... and to add to that list the name of every object I add to the stage when I add it to the stage. So before ANYTHING moves it loops through this array to see if it is hitting anything else on the stage. Sounds simple right?

Well it seems to only work for the LAST movie attached in my function.

I have attached the script to this post. Please take a look, provide some help, give me some alternative ideas, tell me a good joke :-P, just gimme some feedback. Thanks in advance to anyone who even tries to help.

View Replies !    View Related
Loading Content Within Content
Hello, I'm a Flash animator using CS3 who is trying to grasp the scary world of “Flash Web Design”. I'm creating a website with different sections with a tool bar on top that is always present, and content per “section” that is selectable in the tool bar.

I know the basic “gotoandplay” commands, but very little afterwards, and I've done preloader stuff before. What I'm trying to do is have it so that whenever a user clicks on something on the toolbar, it'll start loading (or preloading to play) the specific content they want and then show it without needing to “switch pages”.

Any ideas of how to work this?

View Replies !    View Related
Loading Content Within Content
Hello, I'm a Flash animator using CS3 who is trying to grasp the scary world of “Flash Web Design”. I'm creating a website with different sections with a tool bar on top that is always present, and content per “section” that is selectable in the tool bar.

I know the basic “gotoandplay” commands, but very little afterwards, and I've done preloader stuff before. What I'm trying to do is have it so that whenever a user clicks on something on the toolbar, it'll start loading (or preloading to play) the specific content they want and then show it without needing to “switch pages”.

Any ideas of how to work this?

View Replies !    View Related
Positioning Exe's
Is there any way to control the positioning of the .exe's that are being opened?
I have a project that requires 3 different exe's that opens one up after the previous one is finished and the previous one closes. But I want them to be in the same location on the desktop. Right now they cascade down.

any suggestions?

thanx
Bean

View Replies !    View Related
Positioning New .swf
People,

I am trying to load a .swf with dimensions of 320 x 240 into the base .swf of 770 x 500, I want to position the targeted swf inside the base and have control over the x and y co-ordinates. Please note these are not movie clips.
And to top it all off I cannot control the size of 320 x 240 It will not import and It is not a native FLASH file.
I am using v5. So....

Is it possible?

If so how do I do this?

Thankyou for any help....I'm desperate

View Replies !    View Related
Positioning SWF - X - Y
Hey Guys,

I was wondering what the best way was to position a swf??

I have a main SWF and wanting to load another on top.

example:

on (release) {
loadMovieNum ("example.swf", 1);
}


this loads the swf onto level 1 but is allways positioned
in the top left hand corner when i want it positioned in the center lets say.

Any help would be great.

Thanks
-Mdesign

View Replies !    View Related
Positioning An Swf
Hey everyone. I know this has been covered but I cannot find any of the old posts and I am having a brainfart.

I need to load an swf into an MC and position it. I need a frame to call the swf not an object or button. what's the script again? Here is the pseudo code.

//load movie test.swf into the MC called testMC and make sure it;s positioned at _x == 300 ans _y == 3.0


Thanks in advance to anyone who answers.

PS: I may also need to target specific frames in the loaded swf which I also forget how to do. Thanks again to anyone who answers.

View Replies !    View Related
Positioning A Swf. Within Another Swf.
I loaded a swf. file within another swf. but I can´t find the right actionscript to move it to some other place of the scene.

View Replies !    View Related
X/y Positioning
i have two different actions on buttons calling different movies and am wonderting about positioning x and y....

button 1
on (release) {
_parent._parent.targetClip._x = 112;
_parent._parent.targetClip._y = 110;
_parent.targetClip.loadMovie("test1.swf");
}

button 2
on (release) {
_parent._parent.targetClip._x = 200;
_parent._parent.targetClip._y = 375;
_parent.targetClip.loadMovie("test2.swf");
}

the only way i can get it to work is if i change the instance name to something different (targetClip1) -- is that the only way it can be done? If the instance name is not changed it just loads it in the same x/y position as button1.

View Replies !    View Related
Positioning Of Swf In Mc
I have a mc on the root and I am trying to bring in an external swf.

It is bringing the file in but it is positioned to the right and below - how do I get it into the same position as the orginal clip?

Thanks!

My code is below.

on (release) {
tellTarget ("_root.headerModule_mc") {
gotoAndPlay("openSubMenu");
_root.pBOpener_mc.loadMovie("testload.swf");
}
}

View Replies !    View Related
Positioning?
Hi
I have been trying to learn by downloading movies and taking them apart. I wanted to learn how to click a button and have a photo slide in from one side and center where I want on the page. My understanding of positioning is useless so I was thinking that maybe somebody knows of a tutorial that explains positioning and how to use it to put things where you want them. I know how basic this is, but I don't understand it and any help would be wonderful.
Thanks

View Replies !    View Related
Positioning
I am trying to position the button, the dynamic text boxes, and the drop menu the same on both of my movie clips on different frames. I can't seem to get the positioning working even by typing in the cordinates. Can anyone help?

View Replies !    View Related
Pls Help ,swf Positioning
hi,
i am loading a swf file externally ,it is working properly.but what the problem is i want them to load at a particular point.so how do i specify X & Y co-ordinates dyanmically whenever swf file is called.pls help me

View Replies !    View Related
As Positioning
is there a way to move a movieclip's position via actionscripting....ie..on(press)///move clip1 to a defined area??
thanks in advance

View Replies !    View Related
X And Y Positioning: HELP
Can someone please tell me what I am doing wrong. I have made a mini game (in it's early stages) in which you move a guy around and when he touches the walls he goes back to the red dot in the center (where he starts) Here is the problem. I program to the guy (who is a movie clip):

onClipEvent(load){
moveSpeed=10;

function reset(){
this._x=261;
this._y=173;
moveSpeed=10;
}
}

onClipEvent(enterFrame){
//all the key press stuff

if (this._x>550){
reset();
}
if (this._x<-550){
reset();
}
if (this._y>400){
reset();
}
if (this._y<-400){
reset();
}
}


Now look at the collision bit (the end bit where the If conditions are). That should work right? But when I travel in the negative axis directions, my guy just keeps moving off the screen and then after 7 secs approx it reappears in the center. How come? How can I get rid of the seven sec waiting time. I lowered both negative axis to 15 and it works! Coincedentaly, when I turn on the grid, the width and the height are both 18, near 15. Can someone please help me!

Edit:
Can someone also tell me how to make dynamic text be displayed when the guy resets? (So for example, the guy runs into the side and a message at the top of the screen displays "You bumped into the side so you were reset!"

View Replies !    View Related
Positioning?
Is there a way to position Mcs on the stage in one go without having to set the x & y manually for each one?

gabs

View Replies !    View Related
[F8] MC Positioning
hey everyone.... I need a hand here...
i've already searched for hours on the net and found nothing.....

well the thing is ....
i have on the library a few movieclips and i need that the moment i open the swf those movieclips position themselves in specific positions, each one in a specific depth as well.

the only way i found to do that was moving the movieclips (i mean, making them enter the scene), but that's no good for me, i need them to be there when i open the file.

that's what i got till now and it's not working...

Code:
var i=10
this.createEmptyMovieClip(floors_mc, i);

function buildStage() {
_root.floors_mc.attachMovie("f001", "f001_mc", i);

_root.floors_mc.f001_mc.onEnterFrame = function(){

this._x = 0;
this._y = 0;
};
_root.floors_mc.attachMovie("f002", "f002_mc", i+10);

_root.floors_mc.f002_mc.onEnterFrame = function(){

this._x = 0;
this._y = 20;
};
_root.floors_mc.attachMovie("f003", "f003_mc", i+20);

_root.floors_mc.f003_mc.onEnterFrame = function(){

this._x = 0;
this._y = 40;
};

};
the movieclips in the library are f001, f002 and f003.....

does anyone know how to solve this??
i thank in advance any intention to help...

View Replies !    View Related
Positioning A SWF Using AS3
Hello,

I am trying to bring in a swf file to the stage using ActionScript 3 but am having problems with positioning the file. As it stands the swf plays in the top left corner of the stage, but what if I wanted to change the X & Y position of it, how would I do that?

Here's my script,

stop();
var folioRequest:URLRequest = new URLRequest("scrollingPortfolio.swf");
var folioLoader:Loader = new Loader();
folioLoader.load(folioRequest);
addChild(folioLoader);

Any help would be great, thanks everyone

View Replies !    View Related
Positioning
I was wondering if anyone could tell me where to look. I am wanting to create a bar that(about 60 pixels high) that hugs the browser top or bottom and also takes 100% of the browser width. If the person browsing resizes the window the menu bar continues to hugs it programmed position.

Any ideas?

-meylo

View Replies !    View Related
MC Positioning
hey everyone.... I need a hand here...
i've already searched for hours on the net and found nothing.....

well the thing is ....
i have on the library a few movieclips and i need that the moment i open the swf those movieclips position themselves in specific positions, each one in a specific depth as well.

the only way i found to do that was moving the movieclips (i mean, making them enter the scene), but that's no good for me, i need them to be there when i open the file.

that's what i got till now and it's not working... 07/07/2006 14:49
var i=10
this.createEmptyMovieClip(floors_mc, i);

function buildStage() {
_root.floors_mc.attachMovie("f001", "f001_mc", i);

_root.floors_mc.f001_mc.onEnterFrame = function(){

this._x = 0;
this._y = 0;
};
_root.floors_mc.attachMovie("f002", "f002_mc", i+10);

_root.floors_mc.f002_mc.onEnterFrame = function(){

this._x = 0;
this._y = 20;
};
_root.floors_mc.attachMovie("f003", "f003_mc", i+20);

_root.floors_mc.f003_mc.onEnterFrame = function(){

this._x = 0;
this._y = 40;
};

};

the movieclips in the library are f001, f002 and f003.....

does anyone know how to solve this??
i thank in advance any intention to help...

View Replies !    View Related
Copyright © 2005-08 www.BigResource.com, All rights reserved