Drag movie clip with dynamic text box inside it?
Hi team, I can drag a movieclip with static text inside it, but when I change the text to dynamic, I get a Property Startdrag not found on Flash.text.textfield and there is no default value.. Any help?
Cheers
sub
assign the mouseChildren property of your movieclip to false.
Similar Messages
-
Printing a movie clip with dynamic text boxes
I've got a certificate inside a movie clip, and i want the
dynamic text box to dispay the user name, but for some reason it is
coming up undefined, even though i have the dynamic text box set to
finalname = _root.inputname, but it comes up as undefined on the
screen. :( Can anyone tell me where i am going wrong?
Is there a way to print just a specific movie clip on the
screen? I can only print all the frames in the movie and without
the dynamic text box... any help would be greatly
appreciated.assign the mouseChildren property of your movieclip to false.
-
Targeting Dynamic Text Box inside moviecip with variable
Hi,
How does one target a dynamic text box to change the border
color inside of a movie clip? Example below which does not work
theName = ("answerPrint" + arryCount);
boxName = ("box" + (arryCount+1));
_root.pagePrintPartA[theName][boxName].border = true;
_root.pagePrintPartA[theName][boxName].borderColor =
0x00cc66;Thanks for the reinforcement, but I should of indicated what
was what:
theName = ("answerPrint" + arryCount);// Name of Variable
inside Dynamic Text Box Inside MovieClip
boxName = ("box" + (arryCount+1));// Instance Name of Actual
Dynamic Text Box Inside MovieClip
_root.pagePrintPartA[theName][boxName].border = true;
_root.pagePrintPartA[theName][boxName].borderColor =
0xFF0000;
By certifying this script you showed me wher I went wron (not
seeing the forest from the trees). The last two lines should be:
_root.pagePrintPartA[boxName].border = true;
_root.pagePrintPartA[boxName].borderColor = 0xFF0000;
I was targeting backwards. Thanks alot DazFaz. -
Issues with dynamic text box formatting
I'm running into issues with using HTML formatting for a dymanic text field. I know these are quirky and I cannot figure out how to get the formatting proper.
I have on my stage a dynamic text box called "content_txt" inside of a movie clip instance "content_mc". When it enters the frame, I fade the "content_mc" from alpha 0 to 100 using a timeline animation. In order for this to work, I have to embed the font in my "content_txt" text field. However, the only way I get get the HTML formatting to work is if I do not embed the font.
The dymanic text field is set to render as HTML. In my actions layer, I set the text:
this.content_mc.content_txt.htmlText = "<b>Hello world,</b> it is me again."
In summary:
1. If I do not embed the font, the alpha fade does not work but the HTML formatting does.
2. If I embed the font, the alpha fade works but the HTML formatting does not.
How do I resolve this? It's driving me nuts!How do you embed just one style?
I've tried typing three words in the text field and formatting each (regular, bold, italic) but the text field just defaults to whichever format is first.
Also, I tried embeding the whole character list and did not have success. -
Help with code for score-keeping with dynamic text box
Hi All,
I'm having an actionscript 2.0 problem with keeping score.
I have a dynamic text box with a variable called score.
I have the following action code for that variable:
_root.score = 0;
For the correct answer button I have this action:
_root.score = Number (score) +10;
This works fine to increase the score by 10 for each correct answer.
The problem is that I can't get an if statement to work for when the score reaches 150 to gotoAndPlay a certain frame. I've tried various syntax, I've tried it on the action for a button and an action for the timeline with:
onRelease = function () {
(My learning game is set up to allow for users to answer up to four extra questions to reach the score of 150).
Nothing works. Any suggestions please?
PamBelow is a link to a small sample file. See if you can find anything different between your file and the one linked that might cause yours to not work as desired.
http://www.nedwebs.com/Flash/AS2_score_sample.fla -
New and need help - drag and drop with dynamic text
So I'm doing this project and as an animator I'm not familiar with the whole action script side of flash
Okay so far I've managed to create the whole Drag and Drop feature and it works well, the thing is I want to make it so when you drag in object in the correct spot and new text appears, and I need like six different object with the dynamic text. but I have no idea how to integrated it in my code or where I should start!
So i based myself on some tutorial so theres some code in there that had dynamic text, but not exactly what i wanted
Your help would be much appreciated!
This is my code:
var counter:Number = 0;
var startX:Number;
var startY:Number;
six_mc.addEventListener(MouseEvent.MOUSE_DOWN, pickUp);
six_mc.addEventListener(MouseEvent.MOUSE_UP, dropIt);
five_mc.addEventListener(MouseEvent.MOUSE_DOWN, pickUp);
five_mc.addEventListener(MouseEvent.MOUSE_UP, dropIt);
four_mc.addEventListener(MouseEvent.MOUSE_DOWN, pickUp);
four_mc.addEventListener(MouseEvent.MOUSE_UP, dropIt);
three_mc.addEventListener(MouseEvent.MOUSE_DOWN, pickUp);
three_mc.addEventListener(MouseEvent.MOUSE_UP, dropIt);
two_mc.addEventListener(MouseEvent.MOUSE_DOWN, pickUp);
two_mc.addEventListener(MouseEvent.MOUSE_UP, dropIt);
one_mc.addEventListener(MouseEvent.MOUSE_DOWN, pickUp);
one_mc.addEventListener(MouseEvent.MOUSE_UP, dropIt);
function pickUp(event:MouseEvent):void {
event.target.startDrag(true);
reply_txt.text = "";
event.target.parent.addChild(event.target);
startX = event.target.x;
startY = event.target.y;
function dropIt(event:MouseEvent):void {
event.target.stopDrag();
var myTargetName:String = "target" + event.target.name;
var myTarget:DisplayObject = getChildByName(myTargetName);
if (event.target.dropTarget != null && event.target.dropTarget.parent == myTarget){
reply_txt.text = "Good Job!";
event.target.removeEventListener(MouseEvent.MOUSE_DOWN, pickUp);
event.target.removeEventListener(MouseEvent.MOUSE_UP, dropIt);
event.target.buttonMode = false;
event.target.x = myTarget.x;
event.target.y = myTarget.y;
} else {
reply_txt.text = "Try Again!";
event.target.x = startX;
event.target.y = startY;
if(counter == 6){
reply_txt.text = "Congrats, you're finished!";
six_mc.buttonMode = true;
five_mc.buttonMode = true;
four_mc.buttonMode = true;
three_mc.buttonMode = true;
two_mc.buttonMode = true;
one_mc.buttonMode = true;where you have
xxx.text = ....
is where you're assigning text. -
Showing RSS feed in Dynamic Text box (with hyperlink)
Hi all -
I am currently trying to pull RSS data into a project for my first time and am trying to get 3 (potentially 4) boxes filled with rss data that will be updated. So far, I am going with Actionscript 3. So far I have the code below, but it puts data in a listbox. What is the easiest way to put the data in three dynamic text boxes inside a movie clip, so I have one for the title, one for description and one for link (shown as 'read more' text but a link using the url from the rss value)?
I am really banging my head against the wall on this one and want to get it sorted asap, so any help would be GREATLY appreciated! I have also attached an image to show what I am trying to do:
I also want to know if it's possible to show rss values only if they exist. For example, my xml feed currently only has 3 items that change, and i will be assigning these to boxes, but is it possible to display a fourth if it exists, and if it doesn't it just shows the first?
My code so far:
var loader:URLLoader = new URLLoader();
loader.addEventListener(Event.COMPLETE, onLoaded);
var xml:XML;
function onLoaded(e:Event):void
xml = new XML(e.target.data);
var il:XMLList = xml.channel.item.description};
trace(il[1]);
lb.addItem({data:il.description.text()
label:il.title.text()}):
loader.load(new URLRequest("http://www.rssfeedhere.xml"));you would create a movieclip (exported for actionscript and class = rssItem) with 3 textfields and the display shown in your message and use something like:
var loader:URLLoader = new URLLoader();
loader.addEventListener(Event.COMPLETE, onLoaded);
var xml:XML;
function onLoaded(e:Event):void
xml = new XML(e.target.data);
var il:XMLList = xml.channel.item.description};
for(var i:uint=0;i<il.length();i++){
var mc:rssItem = new rssItem();
addChild(mc);
mc.x = 300*i%2;
mc.y = 300*Math.floor(i/2);
mc.titleTF.text = il[i].title.text();
mc.descriptionTF.text = il[i].description.text();
mc.readmoreTF.text = ?
loader.load(new URLRequest(http://www.rssfeedhere.xml)); -
Flash 7 dynamic text box IE issues
Hi all,
I am having issues with IE V.6.0.3790.0 not loading dynamic
text into text boxes inside a Flash 7 SWF on a remote desktop. Does
anyone know of any compatability issues with dynamic text boxes and
IE? The file loads properly into Safari on my MAC, and I have the
latest Flash Plugin installed. Could it be a Plugin issue, rather
than a IE issue? The reason I am asking is I have a site launched
and many people cannot see the pages that pull in Dynamic text. I
am trying to either get to the bottom of it and provide a fix, or
at least come up with some answers!quote:
Originally posted by:
AnandMX
use embedFonts=true
coz it seems that your fonts are not embedded thats y it is
not visible there.
Thanks - but why would the fonts be visible in Safari and
Firefox, for example, and not in that version of IE? -
A drag and drop game with dynamic text response
Hi,
I am a teacher and my school has recently upgraded to Adobe Design Premium. Our previous version was about 5 versions out of date.
I teach A Level which requires students to create an Interactice Multimedia product.
In the previous 6 years, I have taught students how to create simple drag and drop game with dynamic text responses.
Since the upgrade to Actionscript 3.0 the dynamic text response has ceased working.
When creating the game from scratch, I need to move to Actionscript 2.0 as 3.0 does not allow me to add actionscript to objects - I know and am sure that this is a better way of doing things, but I would prefer to keep working the way I am used to.
I use a switch case statement which I have copied below to make the drag and drop work. The objects I apply the code to work in that they can be dragged, however, my dynamic text box with a variable name of "answer" is no longer displaying the response when an answer is left on a dropzone (rectangle converted to a symbol and given an instance name).
on(press) {
startdrag(this);
on(release) {
stopdrag();
switch(this._droptarget) {
case "/dropzoneB":
_root.answer="Well done";
break;
case "/dropzoneA":
case "/dropzoneC":
_root.answer="Hopeless";
break;
default:
_root.answer="";
break;
Any help would be much apeciated.
Thanks
AdrianTo drag in as3
blie_btn is the instance of the object drawin on the stage. In AS3 you have to assign a even listener, in this case MOUSE_DOWN, and MOUSE_UP, as we want the drag to stop if the mouse is not clicked. Then we fire the functions, and tell the object to start drag.
// Register mouse event functions
blue_btn.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
blue_btn.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
red_btn.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
red_btn.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
// Define a mouse down handler (user is dragging)
function mouseDownHandler(evt:MouseEvent):void {
var object = evt.target;
// we should limit dragging to the area inside the canvas
object.startDrag();
function mouseUpHandler(evt:MouseEvent):void {
var obj = evt.target;
obj.stopDrag();
if you want to make the text do what you want then something like this might work.
In the function, you could add a text box onto the stage, give it a instance of something like outputText
and then:
outputText = ("Bla Bla Bla");
(^Not sure if this will work exactly^)
PS. I am currently a A-level student -
Dynamic text box, HTML Text with Image
Hello Everyone,
I am using Flash version 8. I have used the text tool and
created a dynamic text box and have attached the UIScrollBar
component to it. This text box is configured to allow the use of
html text to be inputted to it. I have code that reads a file which
contains a list of text files that I then read and place them into
the text box. The user can use the scroll bar to scroll through all
the text.
I have created an image that is a picture of the tab portion
of a file folder. On the tab I have place some text. This was all
done in Photoshop. This tab image is used to separate the different
stories in the text box. The image is save as a jpeg file
Everything you have just read works with out any problems.
Now for the problem!
This image is only 20 pixels tall and the text is not very
readable. As we all know the HTML tags are very limited in Flash 8.
Ideally I would like to put the text and image in to the text
box as I would normally do. Then place text on top of the image and
have it all scroll properly with in the text box.
I have taken the tab image and converted it in to a graph
symbol and then put the text on top of the image. This looks good;
however I don’t know how (or if it is even possible) to place
the graphic symbol in to the text box at the correct place within
the text.
Does anyone have ideas on what may work? Remember that the
image I am working with is only 20 pixels tall which is why the
text quality on the image is so poor.
Thank you all for any help you may provide,
SteveYes Tim I am using the <img> tag and I know that I
can’t place text over the image. I have set the height and
width to be the exact size of the image. However When you go to the
webpage it will open the movie to the maximum size based on the
resolution of your display; however I do maintain the aspect ratio
of the movie. For testing I did set a fix size to the size of the
movie. Sometimes the fix size (1000x750) looks better and sometimes
a larger size (example 1280x1024). I believe that the main problem
is the fact the size of the image is 670 pixels wide by 25 pixels
high and of the 25 pixels the text is only 18 pixels tall. In
Photoshop this makes it about a 1.75 point font. As you can see the
real problem is that I don’t have enough pixels to make up
the text. This is why I am looking for an alterative way to create
the text.
I tried importing the image into flash as a graphic symbol
and then using the text tool to create the text. The results looked
real sharp, the text was nice and crisp (just what I wanted). The
problem is that I could not find a way to place the graphic symbol
into the dynamic text area like id did using the <img> tag.
This symbol needs to scroll as you scroll the text in the text
area.
This is why I am asking for help. I am looking for some ideas
that may work.
Thank you,
Steve -
How to link one scroll bar with two dynamic text boxes.
How to link one scroll bar with two dynamic text boxes.
If i move scroll bar in one text box,automatically text will
be moved in another text box.But scroll bar is not visible.
Can you please help me.
Thanks in advance.See the following article:
JavaScript - setFocus Method for tabbing to next form field
And see if iOS can even handle the sample form.
iOS and android devices are not a powerful as your desktop of laptop computer and have limited support for JavaScript within PDF forms. This limitation for specific apps ranges from none to quite a bit but not all JavaScript. -
Dynamic Text box with linking to frames
I have a problem. I've tried everything I can think of and what I have Googled, but nothing has helped. I have a scrolling dynamic text box and I need some words in that text box to link to frames, like buttons (Not a URL). This is the file and the frame I'm on is "conflictNorthernPlains" https://dl.dropbox.com/u/72608572/civilWarEra7.zip
Thanksuse:
var tf:TextField = new TextField();
addChild(tf);
tf.htmlText = "<a href='event:frame1'>link to frame1</a><br/>";
tf.htmlText += "<a href='event:frame2'>link to frame2</a><br/>";
tf.addEventListener(TextEvent.LINK, tfF);
function tfF(e:TextEvent):void{
gotoAndStop(e.text);
p.s. please mark helpful/correct responses, if there are any. -
Need help with specifying type range in dynamic text box
is it possible to specify my type range in a dynamic text box
that is loading images as well as type? Everytime i specify the
range flash quits. if i take out the image loading actionscript
then it's fine. grrrrrI assume that you have added this field to the field catalog, so make sure that the name in the field catalog is exactly the same as in the internal table which holds your data, and make sure that you are filling the field name as uppercase.
Regards,
RIch Heilman -
CS4 Dynamic text box crash!!!
Files created in CS 3 that have a dynamic text box crash
Flash. I've tried over 20 different files. Any ideas how to get
around this? Do I or can I re-install CS 3 just to work on these
files? Any ideas...It appears I have fixed this. I have also called and notified
support about the results of my findings.
When using a font on your system that is corrupt Flash
doesn't ignore it, like it did with CS3. It actually will make
Flash act the way it did for me. What it was doing was, when any
text box was clicked on or a movie clip with a font inside was
pressed, Flash crashed. If you created new text you couldn't select
anywhere on the stage and it leave the text properties info.
After about 20 hours working on this and trying various types
of installs I figured out it must be a font problem because it only
happend with text boxes. Going down to just system fonts the
problem did not exist.
It was actually happening on a CS3 file I had created
previously.
After using just system fonts I was able to open the file and
click on text fields. I slowly began adding fonts again and found
the coulprit. It was a font from a client converted from a mac font
to a pc font. My font manager software refferred to it as "Open
Type TT". The extension of the file was .ttf. After deleting these
two files everything worked fine.
They files have been in this client folder and have been used
for over a year. So CS3 would ignore them and not give you any
problems where CS4 will crash. -
Displaying the result of a calculation in a dynamic text box
Hi folks,
I'm having a very minor issue here (operator error, I'm sure ). With the help of some folks here, I've created a series of calculations, and I've got that part down. Now, I just need it to show up in the movie.
I've created the dynamic text box in Flash (CS3), but when I hit test, it won't show up.
After all the calculations, I should have a figure that I call totalmoney. My dynamic text box is called total. The user doesn't need to hit anything for it to appear. It just appears as part of the movie.
Here's my code:
stop();
var startDate:Date = new Date(2010,0,12); // use your startyear, startmonth, startdate in the new Date() parameters.
var currentDate:Date = new Date(); // assuming user's clock is correct and in your timezone. else use server date/time.
var numberOfSeconds:Number = (currentDate.getTime()-startDate.getTime())/1000;
var interest:Number = (numberOfSeconds*0.74356);
var totalmoney:Number = (interest+15,000,000);
function displaytotal(evt:TextEvent):void {
total.text = "totalmoney";
Any thoughts?
Thanks!
NapoYou didn't have to bury any of the calculations in the function--leaving it as you had it is better. They could remain where they a=werew, and you'll probably find you want them outside it if you have other plans for using them. If left inside, they only have scope inside. In the programming world, it's good to think of functions as things that do one thing and one thing only (though it isn't often practiced that way)--it's called modular design.
When you place an event as an argument for a function, it typically means that there is an event listener that initiates the call to the function. If you work with buttons you'll see what I mean. But if the plan is to create your own call to a function when you desire it as such, not have it driven by an event listener, then you don't need to pass any event to it, though you may pass some other type of variable to it if need be.
For instance, what you have now will call the function without an argument because the function has the value built into its code....
displaytotal();
But you could also make the function a little more generic and set it up to recieve the value instead as an argument...
function displaytotal(amt:Number):void {
total.text = String(amt); // an earlier error of mine
displaytotal(totalmoney);
That would make your function a little more useful. Now it could be used to display other Number variables as well.
// my earlier error was that a textfield displays text, so you need to convert the Number value to s String.
Hope I'm not confusing you.
Maybe you are looking for
-
FileVault 2 seems to be causing kernel boot panics
Hello, I'm on a 10.8.2 Mountain Lion OS X (13-inch, Mid 2010), no new updates are available. I turned on FileVault 2 a few months ago and since then I've had a lot of kernel panics while booting. Sometimes it just booted ok and sometimes it panicked.
-
[b]How inserting an icon in a JTable[/b]
I want to insert an icon in a JTable's column. But a different icon each time in order to represents details about a Jtree. I display an adress instead of an icon. If you could help me by a sample code, Thanks.
-
Is there any way to change the parameters LR send to programs (WIN)? For example i have a export profile that saves images to e:\export\web and then opens my FTP program (filezilla). I placed the filezilla shortcut to export actions folder... Now whe
-
Cannot copy files from my network using finder
If I try to copy files from my NAS or my PC to my Macmini running Leopard, I cannot copy files that are larger than 64kb. Otherwise I get an error message. Interestingly, if I use the cp command in the console instead, he can copy the file, but the f
-
Connection problem(error 500), please help
Hello Im a newbie to db connections with java ive written a servlet to acces mymy hsql db(sample): String dbURL = "jdbc:hsqldb:" + getServletContext().getRealPath("/~mazzok/myDB"); Class.forName("org.hsqldb.jdbcDriver"); conn = DriverManager.getConne