ActionScript 1/2 :: Swapdepths With New Mc From Dynamic Text Still Not Working
Feb 21, 2011
difference but Im using Flas cs5 with AS2. but my clock timer is still behind. Ned, I used your suggestion of putting my dynamic text into a new mc (create sybol method, the only one I know) then I made a new movieclilp named time_mc. I then pasted the actionscript with the 30 minute countdown timer on it. It is still behind. The clouds have to stay on the last depth and the timer has to stay on the top. The rest can go whereever. Not sure what i am doing wrong. I bet Im doing something incorrect but cant figure it out. I kept playing around with codes, but nothing worked. Here is the final non-working code. Working on this issue three days. The timer works if I remove all other layers but it stays hidden once I put them back,
I'm trying to set up an app that moves one movie clip to the top of the screen, regardless of where it is or how deeply it is nested. To do this, I take the full path of the movie clip and go in, movie clip by movie clip, putting the depth of each nested clip on top. This part works perfectly. Afterwards, I want to move everything back to where it was. In the first step, I store the current depths of everything in an array before changing depths. In the second step, I'm trying to change everything back to its original depth, as shown in the array.
The code is below: _global.videoPath = _root.clip1.clip2; var pathString = String(_global.videoPath); var videoPathArray = pathString.split("."); var depthArray:Array = new Array(); [Code] .....
I followed this tutorial on making Tabbed Content with swapDepths, but mine isn't working quite right. When you click a tab the text and icon disappear behind the tab. So each tabbed page is an mc and there is a button for each tab that has this AS on it:
on (release) { _root.btn1.swapDepths(3) ; _root.tab1.swapDepths(2) ; }
I have a movie clip I am using to display a group of logos i created which are also movie clips. when the user clicks on each logo the logos are supposed to enlarge except, that because of the way the layers are stacked, one of the enlarged logos displays underneath the smaller one. so, someone suggested i use swapDepths. But nothing happens. it won't even enlarge. here's the script:
on (release) { this.swapDepths("manard"); gotoAndPlay("oataup"); }
"oataup" is a frame label, obviously and "manard" is the name of the movie clip instance I'm trying to swap with. I've never used the swapDepths method before so I'm hoping I screwed something simple up.
I am trying to create a carousel effect with AS3. It all works good except that I get my swapdepths to work. I have a CarouselItem class
ActionScript Code: package{ import flash.display.Sprite; public class CarouselItem extends Sprite{ private var _angle:Number; public function CarouselItem(){ super(); [Code] .....
I get the depth of the current object and then swap it with the one with the higher index.
I have been battling this for 2 days now and can't seem to find any solutions. I am making a flash Statistics chart for my website which pulls the stats from the database and loads them into corresponding arrays in the actionscript. Once all the information is pulled, it goes to the next frame and duplicates the existing stat bars on the flash document depending on how many stats were retrieved. The loaded stats are then calculated to adjust the stat bar heights to fit the grid. So far, everything is working up to this point.Now for the problem... Directly above each stat bar, I have a text field which I want to fill with the value of the specified stat. The stat text fields are duplicated by the duplicateMovieClip function. For some reason, stat text fields are not visible at all even when using the depthManager function I found in my research.[code]
I have a percentage counter in my preloader which always worked perfectly well in CS3. Now that I've uploaded to CS5 the preloader shows the static text "LOADING" but not the dynamic text with the percentage loaded. I have re-embedded the fonts, get no errors when I publish, and the preloader actually does seem to be working. Why would the dynamic text not show up? I am using Classic Text fields.
My HTML tags are not working in a dynamic text box. Im guessing it is cause of the scrolling and maybe it dosn't see <br> so it dosn't allow them. This is the code i am using below.
TextField.prototype.maxviewable = function(){ if(this.maxscroll>1) return this.bottomScroll; var b = (this.html) ? this.bottomScroll-1 : this.bottomScroll; if (!this.length) this.text = ">>";
Some of the dynamic text fields in my application stopped working. This is part of a major application which I have been working on for a few months. It worked fine until today. 3 different dynamic text fields suddenly do not show text when I set the text from actionscript This is what I tried:
1) Tried with and without text embedding
2) Turned on and off html
3) Tried with .text and .htmlText
4) Removed the TextField and added a new one
5) Added static text into the dynamic TextField and did not add the dynamic text with actionscript --> the initial text appeared I am working with CS3 and recently updated. I am considering deleting Flash and not running the update.
i have the AS setting the mask, and my fonts are embedded.. but the dynamic text doesnt mask my other movieclip.my dynamic text is "fly_in" MC with the text field inside. the MC label is: "headerTxt_mask" the sheen is labeled "sheenMC" and put in a layer below "headerTxt_mask" in the same "fly_in" MC then on the first frame of my scene i have:
I'm just starting working with AS but I'm a pretty experienced programmer. AS syntax and Adobe Flash are often driving me crazy but usually after hours of days of struggling I get what I want. Not this time though. In the game I'm making I have a global variable that counts your steps. I made a dynamic text field and as its variable I typed: _global.mile And now the fun part. It's not refreshing. When I leave the frame and get back to it, it's updated, but it's not being updated all the time. To test this, I put this code in onEnterFrame function:
I am pulling my hair out trying to find out why this isn't working. Is there anyone out there that can help me out? I'm trying to get the dynamic text fields to display the numbers I have set in variables but the dynamic text field will not display anything, even if I put numbers in there, I have checked my syntax and it is correct, I have made sure that bold is not checked and I have made sure that my fonts are embedded but this thing still will not display.
I have some dynamic text boxes loading text from an array. I initially have the text box aligned "right" but when you put dynamic text it "left" aligns them. Anyway, here is my code:
Code: var format:TextFormat = new TextFormat(); format.align = "right";
I've got a bit of a problem with dynamically created text fields. I want to have the required effect :
The flash file loads the xml file (this works fine) and is able to read all nodes and attributes (yup, works too) and then create a certain amount of dynamic text fields populated with data from an attribute(not working so well....) Heres my code :
Code: var news = new XML(); news.ignoreWhite = true; news.load("newsdata.xml");
I have an AS3 project I'm working on. All the text is coming in dynamically via XML file.I'm also using an external CSS to control the look of the text. Everything seems to be coming in fine. I can dynamically create a new TextField and put my text into it. The problem is that I want it centered on the stage and I've been trying with NO success.If I set the width of the TextField to be the width of the stage, that works, but I cannot get the text to center in it if multiline is true
Code: var serverNameTxt:TextField = new TextField(); addChild(serverNameTxt);
This is a problem I often come across but have never found an answer through extensive searching of the net.
I have a simple line
_root.txt_progressbar.text = "Parsing CSV file to grid.";
Yet this sometimes works and sometimes doesn't work. Seems to have issues if I put it in a function. It is like it doesn't have enough time to action this line. Is there some kind of delay I can use to wait for it to be done?
this post references the files listed at:i've implemented a dynamic text box that calls a txt file into it. it uses a scroller that i found a tutorial on:i've got everything working splendidly - everything EXCEPT the scrolling bar... as you can see, it scrolls up and down just fine, but doesn't control the text.i've pretty much exhausted my search through the actionscript to locate the problem and i can't find it.
I have generated several TextFields dynamically through a for loop. I would like all the text fields to have their alpha set to 0 so that each field can eventually fade in.
When I apply the alpha property by setting it to 0, or even .5 the text appears to still be at an alpha of 1. Does anyone know how to make the text appear with a low to 0 alpha?
I have attached the code from the function which runs the for loop to generate the text fields. Please not that the value of the text fields are stored in a global array, and the text format objects are also global and are declared in the main body of the class.
In an attempt to use a dynamic text field on my page, and passing text to it such as..
question.text = "Sample text here"
..where the instance name of the dynamic text field is "question" ..I found that if I add another text box to the page as static text, but using the same font as the dynamic field, the dynamic field populates incorrectly.If I compile using CS4 it works fine, and if I break apart the static text in CS5 it works fine.I also found if I change the font of the static field to something other than that of the dynamic.. it works fine.However in further testing..if I place a second static text field on the page,the dynamic again breaks even if I use the different font as before.
All of these scenarios work fine in CS4, but in CS5 is causing my dynamic field to change to the same as my static text, or simply mixing letters and otherwise not displaying my dynamic text...I've tested on three systems here all with CS5 ...
ok, i have been working with this text to load in dynamic text fields. what I have is a movieclip called 'textInfo' inside this two dynamic text fields called 'headerTex1' and 'headerText2' where I want the text to load into from the XML file.the text should appear next to image that rotate on menu which has 25 images on the menu.What I am getting confused with is do I need to repeat the script 25 times with 25 differently labeled movieclips and text fileds,this is the script;
Code: Code: var textInfo:TextInfo = new TextInfo();
I have a dynamic text field populated by xml which doesn't seem to like the autoSize property. The field populates correctly but doesn't auto size at all. The purpose of this text field is to inform the user of the url for an ad they can click on as they roll over it.
Setting autoSize while inside the XML onLoad() function and outside it made no difference. Please help, I'm sure I must be forgetting something? Does this have to be applied with a new text format or something?
i have been working with this text to load in dynamic text fields. what I have is a movieclip called 'textInfo' inside this two dynamic text fields called 'headerTex1' and 'headerText2' where I want the text to load into from the XML file.
the text should appear next to image that rotate on menu which has 25 images on the menu.
What I am getting confused with is do I need to repeat the script 25 times with 25 differently labeled movieclips and text fileds,
I am trying to limit then number of characters in a dynamic text box, but its just not working. I am loading the text from an external xml file and thought that this might be the problem, but to be honest it shouldnt be really... I have put this code inside the movie clip:
i am making an flash histroy the desc text shoud be accept the cadata Structures i tried to make this , i dont know where i am missing . i am getting the desc text in ( "filed") inside an mc called " nod" i am loading this mc from library plese check my code
stop(); left.useHandCursor = 0; var gata:Boolean = true;
I'm trying to load an XML file and place the content into a dynamic text field. The XML nodes contain content within CDATA sections that have basic <b> and <i> tags. Once I have the content loaded into a variable and trace it, I can see all my tags within.
I then place the content into a dynamic text field with html set to true but for some reason it doesn't show any formatting, the tags appear to have been rendered because they don't show up inline. I thought maybe this was due to embedded fonts but i have all of my bold, bold italic, italic and regular font's within a text field embedded so I wouldn't think thats an issue. Is there something I'm overlooking?
I have a for loop updating a dynamic text element but it seems to iterate so fast that only the last item in the loop is updating the text. I'd like the dynamic text element to be updated with EACH item in the loop, not just the last.
1. I have a single frame movie where I create a simple array of strings from an external text file: