Unwanted HTML Markup In Text Box Value
I've inherited a Flash MX 2004 document that has some text entry points that verify you've entered the right text before continuing or provide you a warning message and urge you to try hard. They're set up like so:
Code: on (keypress "<Enter>") { if (titleInputText == "hoped-for text entry") { gotoAndPlay("someNamedTarget"); } else { comment = "Hey--enter hoped-for text entry to continue!"; } } Some of them just weren't behaving at all correctly. With some handy-dandy trace() statements, I found that a few of them were returning values that included HTML formating of the text. Instead of getting
Code: something entered
I was getting
Code: <FONT = "Arial">something entered</FONT>
which is causing me all sorts of problems. How on earth can I turn off the HTML tags? Where did it come from?
(Why, yes, I do know just enough to get myself in trouble. Why do you ask?)
Any help would be greatly appreciated on this.
FlashKit > Flash Help > Flash ActionScript
Posted on: 08-29-2006, 06:31 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Namespaces In Xml For Html Markup
hi, we have an xml file we will be loading into a project. The xml will be littered with AS3 friendly styling (inline) but we were hoping to avoid the ugly CDATA--ie:
Code:
<![CDATA[<p>This is text</p>]]>
The approach we are hoping to accomplish would be declaring a namespace in the xml:
Code:
<pages>
<page>
<content xmlns:h="http://www.w3.org/1999/xhtml">
<text targetid="1">
<h:font color='#ffffff'>This text</h:font>will go into the box with id of 1.
</text>
<text targetid="2">
This text will go into the box with id of 2.
</text>
</content>
</page>
</pages>
i know there is a Namespace class, but i am not sure how to tie the two together....can someone give me a lead? I have read this , but it does not lead me to the connection with how this MAY work with html...if at all.
My Flash Variables Contain Html Markup?
am using actionscript below to post variables to cgi script:
stop();
avertissement = "";
t_name.text = "";
t_email.text = "";
t_phone.text = "";
t_comments.text = "";
recipient ="user@domain_name.com";
subject="Enquiry from website";
bt_submit.onRelease = function() {
if (t_name.text == "") {
avertissement += " name";
}
if (t_email.text == "") {
avertissement += " email adress";
}
if (t_comments.text == "") {
avertissement += " comments";
}
if (avertissement !== "") {
t_status.text = "Please fill in these fields : "+avertissement;
avertissement = "";
} else {
loadVariablesNum("cgi-bin/nms_formmail.pl", 1, "POST");
t_status.text = "";
nextFrame();
}
};
bt_clear.onRelease = function() {
avertissement = "";
t_name.text = "";
t_email.text = "";
t_phone.text = "";
t_comments.text = "";
t_status.text = "";
};
The flash variables are sent to the script which generates an email message but the variables seem to come with html markup. Here is what comes in the email:
Below is the result of your feedback form. It was submitted by (<TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Arial" SIZE="14" COLOR="#666666" LETTERSPACING="0" KERNING="0">test@test.com</FONT></P></TEXTFORMAT>) on Thursday, May 10, 2007 at 17:31:17
---------------------------------------------------------------------------
comments: <TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Arial" SIZE="14" COLOR="#666666" LETTERSPACING="0" KERNING="0">test message</FONT></P></TEXTFORMAT>
phone: <TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Arial" SIZE="14" COLOR="#666666" LETTERSPACING="0" KERNING="0">000 555 3430343</FONT></P></TEXTFORMAT>
name: <TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Arial" SIZE="14" COLOR="#666666" LETTERSPACING="0" KERNING="0">test name</FONT></P></TEXTFORMAT>
---------------------------------------------------------------------------
The same script works fine with html, have been searching everywhere trying to find a solution but everything I try either doesn't work or still sends variables with markup??
Any ideas??
XML Text Displaying Markup
We are encountering an intermittent issue where the markup and tags that we are reading in from an xml file are being displayed. This problem occurs randomly for some and not at all for others. Has anyone experience this issue and have any insight?
Unwanted Blurring Of Text
Hi,
I'm working on a flash file that is blurring my type for some reason. I want to use verdana with anti-aliasing turned off but for some reason flash is blurring the type.
I am attaching the .fla file to demonstrate. On the left there is a paragraph that's working fine. On the right the paragraph of text blurs as soon as it animates (it's looping over 3 frames). This makes it look like it's flickering when the flash file is run.
Both paragraphs are constructed in the same way (a text block inside a movie clip, inside another movie clip), but the one on the right is blurring and I just can't figure out why.
Can anyone help me with this? I was rushing to meet a deadline and this has really ruined my day!
Thanks
Unwanted Glow On Text
I'm having a problem with an unwanted green glow around some dynamic text and can't figure out how to get rid of it. The font is Futura (I've tried different versions), size is 12, and I've tried anti-aliasing for readability and for animation, with no luck. Screen shot is attached. Any ideas?
Dynamic Text & An Unwanted Zero Appearing
I have an animation that processes up to 12 choices. The results of which are displayed in a dynamic text box. Each choice is listed on a new line in the same box using the "
". This works fine unless the user only selects one item.
My problem is that when only one choice is selected, a zero preceeds the text - as so.
0 - My text here.
It should only be...
- My text here.
Here is a sample of the code:
if (box01out==1) {box01result="- Speed and quality are equally important.
"};
if (box02out==1) {box02result="- Quality is more important than speed.
"};
//etc to box12out - then...
_root.results01.resultstext=box01result+box02resul t+box03result // etc to box12result.
Any ideas on how to get rid of the dreaded unwanted zero?
Unwanted Text Flow Change
I'm building an application that needs very accurate screen display and printing. I discovered several things in Flash that don't work as expected.
A very annoying thing is the unwanted change of text flow in a dynamic or input text when: 1) scaling or 2) printing.
An example:
I have a textfield (embedded font / multiline / autoSize = true) in a movieclip that shows 1 line on screen. When I change the scale (for example an increase in steps of 5%) the text flow in the textfield changes from 1 to 2 to 1 line and so on. Not predictable.
I think changing the scale of a movieclip should not affect the text flow.
The same goes for printing. When I print a movie with a textfield via a PrintJob then it occurs that the printed output differs from the movieclip: again the text flow has changed. I again think that this should not happen.
Am I overlooking something or isn't Flash (version 8) capable in handling accurate font display?
I'm curious if there is a way to do accurate font handling in Flash, i.e. a printed output of a movie is exactly the same a the on screen display; so no differences in text flow.
Someone?
Unwanted Bold Text In Mac With Special Characters
I'm publishing for Flash player 6. Some of the text in the site is loaded from a XML text file then displayed in a text field using htmlText. It works fine in Windows. However you look at the site in Safari on a Mac (OX10, FP 9) whenever there's a special character in the text the line in which the character appears is bold. The special characters are included in the text file as I wish them to appear, rather than giving the character codes.
Anyone know what's going / have a solution? If you've got a Mac go to www.catherineking.org and hover over More Music to see what I mean.
Thanks
Andrew
Input Text Field - Remove Unwanted Characters
I'm building a form with some input fields. I need to write a function to ensure that the user only puts numbers in the fields and not odd characters, letters or spaces.
Is there a good tutorial on stripping out unwanted content from input fields?
My form performs a math calculation, so any unwanted characters will screw it up.
Thanks!
Removing Unwanted Chars From A Input Text Field.
Hi guys , ok this is what im trying to do, i can get so far but i cant work out how to do the next bit.
What i am trying to do:
there is a input textbox where the user enters a stake, now the user can enter more than 1 decimal point, i need to code up a function to run through the chars entered, using the onchange event, and count the decimal points, if there is more than one then remove the latest one.
so far i can count the number of points, detect when more than one has been entered, but how do i remove then second decimal point without removing the 1st one, i belive i have to reference the character number , i have worked out how to get which char it is , if i use the split & join function it removes the 1st decimal & the second one, i only wish to remove the second one.
My code:
ignore commacount terminology its ment to be decimalpointcount.
PHP Code:
stop();
var commacount=0;
_root.stakebox.onChanged = function(){
commacount=0;
for(j=1; j<_root.stake.length; j++) {
if(stake.charAt(j) =="."){
commacount++
}
if (commacount >1){
//how can i remove character j only and then join the string back up ?
_root.stake = _root.stake.split('.').join('');
}
}
}
Dynamic Text Animation - Unwanted Side Effect
Could you please take a look at the code below just for the sake of teaching?
cut and paste in flash
let it play for a few minutes, the animated letters will start to place one over another, that’s not a wanted effect..
unfortunately I can not set it right
Thanks for your help
marzia.neri@buongiorno.com
ActionScript Code:
function create(str) {
for (var i = 0; i<str.length; i++) {
this.createEmptyMovieClip("abc"+i, i);
this["abc"+i].createTextField("TextField", 1, 50, 50, 100, 100);
this["abc"+i].TextField.text = str.substr(i, 1);
this["abc"+i]._x = i*15;
//distance
}
}
function Wave(amp, t) {
return amp*Math.sin(t/6);
//wave
}
myStr = "Wave Me Baby , Wave me !!!";
create("Wave Me Baby , Wave me !!!");
t = 0;
this.onEnterFrame = function() {
t++;
for (var i = 0; i<myStr.length; i++) {
this["abc"+i]._x += Wave(2, t+i);
this["abc"+i]._y += Wave(2, t+(10*Math.PI/2)+i);
}
};
[F8] Mysterious Unwanted Text Added To Externally Loaded File
I'm using load vars to load text from an external file and have it appear in a dynamic, scrolling text box on stage. It works great, but at the end of my block of text, flash adds " &=onLoad=[type Function]". This is not part of my text, and I don't know how to get rid of it! I haven't added any special characters to the text in the file-- orginally i had "escaped" the text (which i though you had to do), but all those extra characters just showed up in the text in the movie, so I typed my text out as I wanted it to appear, and it works fine, except for this last line...
Any ideas?
Thanks
z
Flash Geniuses..unwanted Code Appears In My Text Field
I used the Kirupa tutorial on loading text in a flash file dynamically from a txt file and after my txt file displays in flash it is followed by unwanted html code that it displays for some reason. I can't figure out why it is doing this so if anyone knows how i can fix this please let me know... If you want to see what I am talking about, it is at:
http://snow.prohosting.com/solrise
click on a picture and scroll to bottom of text
THanks,
Ter
Xml Markup Still Showing Up
i'm trying to load an xml file into my flash file but each time i load the xml into the flash, the xml markup is still there.
here is the fla and xml file
http://www.whathedale.com/kirupa/home.fla
http://www.whatthedale.com/kirupa/text/update.xml
thanks in advance.
dale tan.
Markup Tool
Hi
I am developing an application called markup. This allows a user to markup on pages/content he is viewing….my markup application has one tool bar and one markup area ….
What I want is to have different makrup areas for different pages in a presentation.
How I m doing this…
in a master file /base file I load this markup swf and the presentation swf….my markup is works fine if there is only one page in the presentation…but if there are more than one my markup objects are visible in the second page also…but I want separate markup regions for separate pages..
please help me..
thanks
shan
Xml Markup Still Showing Up
i'm trying to load an xml file into my flash file but each time i load the xml into the flash, the xml markup is still there.
here is the fla and xml file
http://www.whathedale.com/kirupa/home.fla
http://www.whatthedale.com/kirupa/text/update.xml
thanks in advance.
dale tan.
Using Web Standard Markup In Flash
Hello,
Simple question: I have numerous transitional xhtml pages marked up and ready to go. The code is basic but uses a few tags that are not recognized in Flash via HTML import- <h1>, <div> etc. Is there a best practice method for using this code without having to "dummy" down the code for use in Flash? Is there any advantage to importing the xhtml pages as XML and going that route or will I have the same problem?
Thanks,
Bob
Flash Markup Language
hey,
anyone out there know's anything about flash markup language? Just saw it at work at http://www.sukima****a.com. Thanks.
Dynamicl Adding Text To An HtmlText Area Input : Adds Another Unwanted Line.
Ok if you have a input HTML text area then add html text to that area it creates an extra line.
Coded like this :
Text.htmlText = '<P ALIGN="LEFT"><FONT FACE="Century Gothic" SIZE="20" COLOR="#FFFFFF">Add Text Here</FONT></P>';
This should just add a left aligned "Add Text Here", in white size 20. Which it does but it adds a line return on the end. You can see its there by pressing the down key in the text area and the cursor moves to the next line down.
It has to do with the paragraph tag which flash uses for all alignments and also for blank lines.
I'm basicly taking the flash htmlText area value. Writing it to a file and reloading it into Flash. Which all works fine except for that added line return.
The only solution i could come up with is this.
Selection.setFocus(Text);
Selection.setSelection(Text.length - 1,Text.length);
Text.replaceSel(" ");
This replaces that linereturn with a space which fixes the problem but of course adds a space to all my text boxes.
Anyone know a better solution to this?
Flash Inventing Nonexistent Markup <li>
Hi There--
Have put together a site where textfields are imported using the loadVars command.
Here it is:
http://grasshpr.home.mindspring.com/...ernate1_3.html
Here's the entire folder, which includes the textfiles and the fla:
http://grasshpr.home.mindspring.com/shinnAlternate1
The problem is that on some of the textfiles, Flash is adding markup where there isn't any, in the form of list dots. The kind you get when you put <li> in front of a line. (It probably won't do it for you. Flash just wants to drive me crazy. (It's succeeding.))
This only occurred in the last iteration of the design.
It's occurring on both of the computers I have access to, so it's something in the file.
Since this is the first time I've imported text, I'm utterly clueless as to what could be making this happen.
Has this happened to anyone else? If so, how did you solve it?
Any insight will be vastly appreciated.
Thanks for reading this,
Lee
Retaining Markup Tags In HtmlText Fields
Is it possible to wrap an XML object so that it's element tags are preserved (not parsed) if it populates a text field as htmlText? I'm trying to use XML in an htmlText field where other (non-XML) text is styled using CSS. I get the results I'm looking for (except for the CSS) when I populate the text field as plain text (not htmlText).
I tried wrapping the XML in a <![CDATA[]]> tag, but that too was parsed when used as htmlText.
Any ideas?
W3C Markup Validation Service Web Site Shows Lots Of Errors For .swf Object
Hello;
I'm using the method to insert a .swf file into an Html document as described in the "Frequently Asked 'Flash' Questions" tutorial in this forum:
http://www.sitepoint.com/forums/showthread.php?t=210919
The flash object works fine in my browser.
When I try to validate the Html using the W3C Markup validation service it says that there are no attributes for SRC, QUALITY, PLUGINSPAGE, TYPE, WIDTH, HEIGHT, and MENU. It also says that the element EMBED is undefined.
Since it shows so many errors it looks like the W3C Markup Validation Service might not configured to work to .swf objects.
You can copy and paste the code below and you can see what I'm talking about. Here's the link to the W3C Markup Validation Service page:
http://validator.w3.org/
PHP Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Shockwave Flash Movie</title>
</head>
<body bgcolor="#AAAAAA">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="300" height="250">
<param name="movie" value="300 x 250.swf" />
<param name="quality" value="autohigh">
<param name="menu" value="false" />
<embed src="300 x 250.swf" quality="autohigh" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="300" height="250" menu="false"></embed>
</object>
</body>
</html>
I think that using the flash object will be ok but for my peace of mind can somebody tell me is it safe or wise to use the .swf object when the W3C web site shows so many errors?
Thanks.
Sending Html Text To Html Dynamic Text Field But It Dosnt Show
code: theNews = "<font color=#FF9900>"+newsRow0newsDate+"</font>"+": "+newsRow0newsStory+newline+"<font color=#FF9900>"+newsRow1newsDate+"</font>"+": "+newsRow1newsStory+newline+"<font color=#FF9900>"+newsRow2newsDate+"</font>"+": "+newsRow2newsStory+newline;
newsArea.textMain.htmlText = theNews;
trace("the news ="+theNews);
The data dosn't display but if i change the textMain.htmlText to .Text then it works, i need the formatted text.
Is ther something wrong with this?
i cant see anything wrong.
Cheers
Paul
Sending Html Text To Html Dynamic Text Field But It Dosnt Show
ActionScript Code:
theNews = "<font color=#FF9900>"+newsRow0newsDate+"</font>"+": "+newsRow0newsStory+newline+"<font color=#FF9900>"+newsRow1newsDate+"</font>"+": "+newsRow1newsStory+newline+"<font color=#FF9900>"+newsRow2newsDate+"</font>"+": "+newsRow2newsStory+newline;
newsArea.textMain.htmlText = theNews;
trace("the news ="+theNews);
The data dosn't display but if i change the textMain.htmlText to .Text then it works, i need the formatted text.
Is ther something wrong with this?
i cant see anything wrong.
Cheers
Paul
Loading Text Loading Something Unwanted
sorry if this thread has been repeated.
i followed the tutorial for loading external text files. works great. only problem is that when it's done loading, my dynamic text field returns: "_level0.extTxt" (extTxt is the instance name of the text field). is there anyway to avoid this message from appearing? any help is appreciated.
thanks in advanced.
cmplx
----
Loading Text Loading Something Unwanted
sorry if this thread has been repeated.
i followed the tutorial for loading external text files. works great. only problem is that when it's done loading, my dynamic text field returns: "_level0.extTxt" (extTxt is the instance name of the text field). is there anyway to avoid this message from appearing? any help is appreciated.
thanks in advanced.
cmplx
----
Unwanted Sound
I have a sound in the movie but it is only supposed to go off at the end of the time. For somereason it goes off when ever the movie goes between scenes. here is the movie if ne one has an idea I can send you the code or just tell me. thanx. http://www.sowebdesigns.com/mini/auto_scoreboard.swf
Unwanted Characters
This is my first time dealing with countdowns. I have my code working and everything is fine until I preview my movie. I just want the movie to look like this:
00 minutes 00 seconds
I have more than just minutes and seconds but you get the idea. The only problem is that when I view the movie it puts a hyphen in front of the time remaining:
- 00 minutes 00 seconds
Here is my conde:
Code:
now = new Date();
war3 = new Date (2002, 07, 015, 23, 59, 59);
days = (war3-now)/1000/60/60/24;
daysRound = Math.floor(days);
hours = (war3-now)/1000/60/60-(24*daysRound);
hoursRound = Math.floor(hours);
minutes = (war3-now)/1000/60-(24*60*daysRound)-(60*hoursRound);
minutesRound = Math.floor(minutes);
seconds = (war3-now)/1000-(24*60*60*daysRound)-(60*60*hoursRound)-(60*minutesRound);
secondsRound = Math.round(seconds);
if (secondsRound == 1) {
sec = " second ";
} else {
sec = " seconds ";
}
if (minutesRound == 1) {
min = " minute ";
} else {
min = " minutes ";
}
if (hoursRound == 1) {
hr = " hour ";
} else {
hr = " hours ";
}
if (daysRound == 1) {
dy = " day ";
} else {
dy = " days ";
}
timeRemaining = daysRound+dy+hoursRound+hr+minutesRound+min+secondsRound+sec;
tellTarget ( target ) {
}
I don't know if the problem is in this code or not, but it is the only thing I can think of. Thanks for your help.
Unwanted Flickering
Howdy!
I got a problem. I am working on a flash movie, sort of a sci-fi series. In the first scenes I include some spaceships flying above a futuristic city. The problem is that when the ships fly by, the background behind them flickers slightly. Not much, but annoying anyway.
The background is an imported jpg picture and everything else is symbols drawn in flash.
What can I do to prevent this flickering effect?
Unwanted Shift In Pic
I'm having a problem with a shift or small movement in my background pic. It doesn't happen in the .swf file when you look at it, but it does when you look at is via the html file. The shift occurs only in part of the pic, and it happens immediately following a motion tween that fades in the background (changing the alpha). Does anyone have any ideas? Thanks
MX: Help With Unwanted _mc Dragging
Hello All.
I have jpeg loaded into mc, loaded into another _mc (masked) .. It is a full size photo. I have a start / stop drag action on the _mc. In a nutshell, a zoomable dragable photo. Lower on the screen I had placed some scrollable text. When I scroll the text, or click and drag anywhere outside of the masked area "picture frame". it drags the pic. Not a huge problem but undesirable. I have approached this problem with invisible buttons and _onRollOut / _onRollover tactics.
I have tried to turn the dragable _mc to null etc when the pointer is not in the area. Am I approaching this problem correctly or am I way off? (btw Not Using Expert Mode.... yet)
Thanx for any input.
Unwanted Looping.....
Hey, I created a flash menu at http://ww.web-medium.com/titaniumserver/ but everytime the mouse rools over it lops the movie...I have never encountered this before..any ideas why? Thanks...
Unwanted Space
Check out my site... promises for bethany and see if you know how to solve the problem of there being white space on the side. I have tried using javascript to resize the window, but I can't seem to figure it out. Help please. Thanks!
Unwanted Looping
Hello, I have created a site for my cliect with an opening "enter" page. One of the effect that I used is a swish effect. But, it loops continuously on that page and I even added a "remove" to it, but it still does its thing, and keeps on doing its thing. It is very annoying. Can someone help me out with a suggestion, to end my blues?
Thanks, NYmagicwww.rccbrooknam.com
Unwanted Hotspots
i have a regular text based movie and i placed another full page movie over to pop up for easy access, and so that when you are done you can go back to the exact frame that your at in the bottom movie. any way i have one movie over another movie but the hotspots/sounds of the bottom movie bleed through when you are navigating the top.
thanks for any help
Help With Unwanted Looping
in one of the scenes of my animation the movie sequence run fine and through to the end when testing the scene, but when i test the whole movie a certain part of the sequence just keeps looping. this is just a simple moving animation
sorry if this has been answered before but not knowing what it is is hard to search for an answer
Getting Rid Of Unwanted Background
hi,
I started to use "swiff chart" to make animations of some charts I want to include in my project. This software works great but It always outputs a white background. I've been trying to get rid of the background in swiff chart but I can't so far. So I was wondering if it was possible to do that in flash when the swf loads into my main project?
tks
Unwanted MC Rescaling
hi all
i have a very strage problem at a very bad time...i need to finish of a project by monday mornin, and now, doin the last change, i all of a sudden get this problem:
on converting an imported file (jpg, png, swf...dont matter) to an MC, flash rescales the created MC just a tiny bit. but just enough to get the type all messed up...
has anyone had similar problems ?? am using flash 8, exportin for flash player 7
thanks....
Unwanted References
When I have this code...
Code:
var point1:Point = new Point();
var point2:Point = new Point();
I have two separate Point instances, but if I then do this...
Code:
point1 = point2;
point1 becomes a reference to point2. Is there any way to avoid this, such that a copy of point2 is made, or just so that only the values are copied, but they remain two separate instances.
Unwanted Pausing
Hello there, I'm new here because I have had questions in the past about some actionscript issues, however I found my answers within previously posted threads by other users on this site.
BUT, I've had a continuing problem that I can't understand. I'm making a site that consists of two seperate flash files. The first is just a navigation bar with buttons that load different .swfs into an iFrame below it.
So I have a bunch of different .swfs to load into this frame. One of them in paticular I've been working on and updating and then replacing the old one to view it in my browser. So it was working fine. However, I made some minor updates to this .swf, of which the updates contained nothing actionscript related... just some symbol swapping. I published it again, replaced the old one and when I went to view it in my browser, it would pause on the first frame.
On the first frame is a load bar, the same as I have used on other files and altered in no way. So all this .swf does is load the movie and then pause on the empty screen without continuing (which it did fine 10 minutes before). I can right-click on the .swf in my browser and select "play" and it will continue... but I don't have any idea why the hell it's doing this... can anyone help???
Unwanted Rotation...
Hi there,
I'm working on a little flash project again. Everything's working fine for now but I encountered this little problem. And don't understand why this problems happens. Please read...
My site contains two swfs that are loaded in a 'container' swf.
• images.swf are those big background images (animated fadein/fadeout)
• main.swf is the actual site (menu, text, content)
• tmp.swf is the container in wich the aforementioned swfs are loaded.
The flash files are getting centered via actionscript (off-center images are intended that way). Everything works perfectly.
Check it out here: http://www.bodysong.co.uk/tmp/tmp.html
Then I'd like to have them background images as big as the stage.
I add one line of code and then it happens!!!! The background images are getting rotated!! I didn't add ANY rotation code at all and still this happens. Why?
Check this wrong version here: http://www.bodysong.co.uk/tmp_wrong/tmp.html
Do you people understand why?
This is the AS (in tmp.swf):
ActionScript Code:
this.createEmptyMovieClip("images", this.getNextHighestDepth());
this.createEmptyMovieClip("container", this.getNextHighestDepth());
container.loadMovie("main.swf");
images.loadMovie("images.swf");
// center of the very first position of the swfs
this.onEnterFrame = function() {
container._x = Stage.width/2-472.5; // half the size of the main.swf is subtracted for perfect centering.
container._y = Stage.height/2-287.5; //
images._x = Stage.width/2.75; // divided to be off-center
images._y = Stage.height/2.75;
// images._height = Stage.height;
// the line of code above is getting me in trouble. Adding this makes the background images rotate!!!!!??????
};
// stage listener for continuously recentering on stageResize
var stageL:Object = new Object();
stageL.onResize = function() {
container._x = Stage.width/2-472.5;
container._y = Stage.height/2-287.5;
images._x = Stage.width/2.75;
images._y = Stage.height/2.75;
images._height = Stage.height;
// the line of code above is getting me in trouble. Adding this makes the background images rotate!!!!!??????
};
Stage.addListener(stageL);
Unwanted Slowing
I have a gallery-flash/AS thingie all set up, just one little annoyance: For picture frames I use a pre-drawn box that I scale down to the size of the picture like this:
on the _root -level I have a movie called picture.border which has the following nested within the instance itself
Code:
onClipEvent (load) {
_root.Xfactor = 100;
_root.Yfactor = 100;
}
onClipEvent (enterFrame) {
varXfactor = this._xscale;
varYfactor = this._yscale;
difXfactor = 100-(_root.W/this._width*100);
difYfactor = 100-(_root.H/this._height*100);
setProperty(this, _xscale, varXfactor-(difXfactor/5));
setProperty(this, _yscale, varYfactor-(difYfactor/5));
}
Oh, I forgot... The _root.W and _root.H are variables assigned by the picture to be framed...
It works fine, but after a while everything just keeps slowing down. Any ideas why?
Unwanted Buttons
In my movie I make it so when you move your mouse over a button, in the over frame I make another picture pop out to tell you what button it is.
Well if you go over to where the button would be and you put the mouse over it, it acts as if the button has the mouse over it, and it pops out...
The effect that pops out is another .swf so i dont know if it is just acting as a button and i'm screwed, or if there is a way i can deactivate that part of the button?
Unwanted Scaling
A user reports that a flash movie is scaling so that it appears much larger than it should be. They were using Windows IE version 5.5.
Can this be fixed by putting the line fscommand("allowscale","false"); in the first frame of the movie, or is it something else? I'd have tried this myself but I don't have a machine running that browser.
Unwanted Red Lines
Hello everybody,
I created a graphic with Illustrator and imported it into the library of my Flash movie. The problem I'm having is when that graphic is converted to a button symbol I get red lines on areas where my graphic should show something round. The weird thing is that those red lines aren't shown when the symbol is not a button but rather a graphic.
What can I do to get rid of those red lines?
Getting Rid Of Unwanted Background?
I'm importing a simple image from photoshop, an when i paste it into the work area in flash, it puts a white rectangle around it...how do i get the white rectangle out an just keep the image I'm trying to work with???
(it's a simple brush stroke..nothign crazy)
...thanks in advance
dmiller
Unwanted Jpg Resizing...
ok... what i've got is attached movieclips, basically they are like pictureframes. each frame will change width and height depending on the xWidth, yWidth attributes defined in an xml file.
my question is, why do the jpg's that are then loaded into a "container" MC within the frame movieclips scale to an obscenely different size. also, if i try to define the size of the empty container by drawing an invisible box, the image seems to load correctly but it overwrites the xWidth and yWidth i had defined for each pictureframe movieclip.
is it possible to load a jpg into an empty container clip within a movieclip that is having it's width and height changed and not have the jpg also change?
thanks for the help.
ActionScript Code:
var pictures:Array = new Array();
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("photo.xml");
function loadXML(loaded){
if (loaded){
photoNode = this.firstChild.childNodes;
for(var i = 0; i< photoNode.length; i++){
pictures.push(photoNode[i].attributes.name);
trace(pictures);
var xWidth:Number = photoNode[i].attributes.xSize;
var yHeight:Number = photoNode[i].attributes.ySize;
var picFrame:MovieClip = holder.attachMovie("frame", "frame" + i, i);
picFrame.container.loadMovie(pictures[i]);
picFrame._x = i*(30);
picFrame._width = xWidth;
picFrame._height = yHeight;
//picFrame.container._width = xWidth;
//picFrame.container._height = yHeight;
//trace(picFrame.container._width);
//trace(picFrame.container);
}
//trace("loaded");
}
else{
trace("failed");
}
}
[MX04] HTML Tags Needs To Be Disabled In Dynamic Html Enabled Text Fields
Hi Buddies,
Am loading some dynamic text from an xml which has html tags inside dat text. I jus loading dat specified texts into a dynamic text fields where html is enabled and assisgned as a htmlText instead of normal text.
It works fine, but the thing is, i want to disable certain html tags to be rendered but it shud display as it is as a normal texts.
Is there any way to do dat
Dont Want To Render < HTML > Tags In HTML Enabled Dyna Text
Hi All,
Is there any way to display < HTML > tags in the HTML enabled dynamic text field with out actually rendering it ? one constraint is, I want to enable the HTML feature for that text field all the time. because, i want to render some other tags.
The problem is in my text field unable to display msgs having <> characters i.e. even if I say < hello > it is not displaying anything, because, it is treating it as HTML tag and trying to render it. Is there any work around to display this text as it is ??
Thank all in adv,
|