Avoiding Ghosting Behind Image
Hi, I've just started with Flash, and wondered how to avoid the ghosting effect that should be totally transparent behind "Dominic" in my work-in-progress - http://www.bigdeepblue.net/XP/. They're originally .pngs with transparency that I'm importing.
Thanks in advance, Jason.
SitePoint > Design Your Site > Flash and Actionscript
Posted on: Jun 5, 2003, 01:19
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Ghosting TEXT
ok...i have this flash file and broken keyboard now cuz i cant figure this out....
i have a flash file with an fs command going full screen....i also have an area that i have scrolling text..the text for some reason bleeds beyond the borders of the movie into the background...i put in some borders beyond the movie hoping that it would solve the problem however while im scrolling the text stays within the borders of the movie but when i stop dragging the text..it slowly starts to bleed through...pieces at a time start to show up beyond the borders of the movie....even through the borders that I put in to solve this problem...im super frustrated cuz i cant figure out why its doing this...
d.a
Gifs And Ghosting
has anyonce else gotten a slight ghosting around supposed transparent gifs in flash. and does anyone have a solution to it?
Ghosting/onion Skinning
I'm sure we've all seen this little number:
http://members.aol.com/gqwu/fight.swf
I revisited the scene just now and am wondering how to get that cool tracing/ghost technique that happens with the staff, nunchaku and the 'close up' fight with the boss.
A past instructor told me there was a script that allowed real-time 'onion skinning'...
Thanks to all-
Xante
Ghosting Behind Flash Movies OSX
Hi - has anybody else encountered this problem?
when I view my flash file (site) on my computer running OSX I see a ghosting of desktop windows etc appearing behind very faintly!
ove only really noticed with the big expance of bg colour in my site www.contrastmedia.co.uk
is this a plugin problem or something with OSX
thanks for your feedback
Quicktime Exporter Ghosting
Hi, my problem is with exporting video from Flash to Quicktime. To give an example, I am using Flash to add a snowy overlay to a movie I made, and every few keyframes of exported video, whatever was on that snow layer on that frame will 'stick' and persist for 24 frames until the next keyframe removes it.
I've tried so far:
- Caching on disk
- Changing the codec
- Adding more keyframes (doesn't seem to make a difference)
- Making every frame a keyframe
Nothing seems to get rid of the ghosting. What can I do to fix this?
16-bit Transparency Ghosting Problem - Nothing Fixing It
For the life of me I can't get transparency to be invisible. I've tried everything to no avail in the TechNote and posts. A ghostly semi-transparent white box is behind all of my buttons individually at 16-bit. My webpage has a background image that they are showing through on.
www.johnmcmillion.com/dev
Basically, I want my top nav buttons to show plain text, and the mouse over effects to kick in from an invisible squared out area around the text, otherwise it freaks out trying to kick in the mouse over on just the lines of text themselves.
Any thoughts?
John
Here is the TechNote article that I haven't been able to make any difference. http://www.macromedia.com/support/fl...aps.htm#issues
Flash Ghosting When Link Clicked
Hi all
I have a somewhat strange issue, which is only experienced thus far when viewing the back in IE6.
The page in question
Whenever you navigate away from this page, whether it be simply Refreshing the page, clicking on an HTML link or a link within the flash file, there is a duplicate of the flash that appears briefly on the page, slightly above its correct/current position.
Here is an example of it happening
Any ideas what is causing this, and what can be done to resolve it?
Many thanks
Fading Images But With Ghosting Effects
Hi,
I'm fairly new to Flash MX 2004. Been tinkering with it the past few months. Began my 1st try into making a slideshow recently.
I have this problem with motion tweening with Alpha. I use a set of 5 images and each image is motion tweened to fade to 100% Alpha at frame 20. When it reaches the 3rd & 4th image, while motion tweening in progress, I notice the 2nd image ghosting into the tween, then disappearing. What causes this? This effect does not effect image 1,2 and 5.
Any kind help is appreciated. Thanks
Few Quick Probs - Type Color And GIF Ghosting....Help Please
Hey guys....
I've got a site in progress and the client is complaining about a couple issues that I'm sorta stumped on....I'd like your opinions on them and see if you guys can think of any way around them.
http://www.gravity-interactive.com/imec/
1) Type Color - In an effort to get the type crisp enough for my client's liking we've gone with the flash mx _sans font set as multiline dynamic selectable text for our body copy....In addition I have it set to NOT embed any font outlines as that made the type look a little choppy.
THE PROBLEM: I would like links within the copy to be links and I'd like to shift the copy to another color where it's clickable/linkable. Is that possible? Currently any type I set to green shows as black online (see the services section).
2) GIF Ghosting - On the homepage, as you mouse over the horizontal navigation up top it calls an image of a colored block with some type in it.....
THE PROBLEM: on SOME systems the type appears somewhat ghosted..almost out of registration...on some screens it does not. Since the site is built to stretch to fit a page, my suspicion is that with certain screen resolutions the edges of the text might be landing midpixel causing some split pixel issues....but this is just a theory. What can be done to remedy this situation?
3) Type Inconsistencies - In the successes section, as you mouse over the boxes OR the links to the left, colored boxes appear and contain type.
THE PROBLEM: The type the client likes is on the top row, far right....but I've duplicated the type settings on all of them and for some reason every other text box appears condensed. Any Ideas?
4) When viewed on a MAC there is a black background..almost like the site is transparent? Ideas?
Also...what do you guys think of the site? (I know this isn't a site review section...but while you guys are helpin out a general opinion would be apprecated) It's unfinished so many links are inactive but the major content sections are pretty close. The nav on the left side in SERVICES is custom/built from scratch.
Thanks in advance!
Filter 'ghosting' On Movie Clip Bounding Box
I've got a strange problem I can't find an answer for.
I've just started using basic flash filters like dropshadow, etc on objects defined BOTH manually on the stage (created by hand in the ide with the filter applied via properties panel) and via AS3 code.
For some reason, it seems like some objects that i enable filters on wind up with a very slight *ghosted* (very low alpha) 'rectangle' with the dimensions of the movie clip bounds that contain the objects i apply the filter to.
for example, lets say i put a drop shadow on a static text text field. the drop shadow effect DOES get applied to the text like it should which is fine. however, applying the effect to the textfield creates a very low alpha white colored rect in the dimensions of the OVERALL bounding box of the actual textfield which is NOT ok. It's very noticeable over a darker background clip which looks very low budget
fyi, the same thing is happening on a movie clip that has an embedded background shape with drop shadow applied to it, so it's not just text fields. when the alpha of the movie clip is turned off (and or the visibility prop - forgot which one) at the beginning of my swf to hide the clip until i want to display it, an annoying 'ghosted' box in the dimensions of the movie clip is visible where the box is hidden before it comes into display.
if i disable the filters on either of the objects, the ghosting goes away! this has to be a known problem or something stupid i'm doing.
what is causing this? how do i disable the ghosting? the filters are great features but if i can't hide the ghosting boundaries, they are fairly useless. the ghosting makes otherwise nice effects look like a third grader did them
thanks. i really want to nip this in the bud.
Masking Animation Produce A Ghosting Type Of Deformity On Page,is This Natural?
I have noticed a bit on some sites as well as mine specially on white-ish areas, that if I have animation of symbols(graphics, movies, buttons) that have masking in them that it produces some form of ghosting where it is positioned on the flash stage, even when the animation isnt playing. I have noticed that on some very complex sites as well. Mostly noticeable on Flash sites that have large areas of gradient colours or white on their Flash stage.
Any way of minimising this?
Avoiding Obstacles
I want to make a little object go from point A to point B, figuring out by itself how to avoid obstacles along the way.
...Any thoughts on how to plan such a path through actionscripting?
Avoiding Escape
hello
iv created an application in flash 5 but i want to capture
the escape key in the flash player.
any suggestions...
Avoiding OnEnterFrame
So I decided to use a little function rather than tweening even simple fade-in actions.
code:
function fadeIn() {
if (this != true) {
if (this._alpha<100) {
this._alpha += 3;
} else {
var this:Boolean = true;
}
}
}
logo_mc._alpha = 0;
logo_mc.onEnterFrame = fadeIn;
but of course this still calls onEnterFrame, I write the boolean there so that it doesn't keep trying to change the alpha, but is there another way of doing it so that it doesn't call anything onFrame after its at full opactiy?
or doesn't it really matter too much (performence wise)?
Avoiding Key Repeat
I'm executing stuff on keystroke, and I have a little bit of an issue with, if the key is pressed and held, the statements execute over and over again, due to auto-repeat. I've got a workaround which works like this:
Code:
// Keystroke Input
var counter:Number == 0
var keyListener:Object = new Object();
keyListener.onKeyDown = function() {
_root.counter += 1;
if _root.counter == 1) {
// Do Stuff;
}
};
keyListener.onKeyUp = function() {
_root.counter = 0;
// Stop Doing Stuff
};
Key.addListener(keyListener);
So, when you press a key, the counter starts ticking up as the keystroke auto-repeats, but "Do Stuff" only happens when you first press it. When you release the key, the counter resets to zero.
It works, but I'm trying to work latency out of the thing, and I think this might be causing some of it. Anyone think of another way to handle it?
-EdM.
Mouse Avoiding
Very new to Flash and found this code online which looks interesting -
PHP Code:
onClipEvent(load){ homeX = this._x homeY = this._y magnet = 5000}onClipEvent(enterFrame){ x0 = this._x y0 = this._y x1 = _root._xmouse y1 = _root._ymouse distancex = x1-x0 distancey = y1-y0 distance = Math.sqrt((distancex * distancex) + (distancey * distancey)) powerx = this._x - (distancex / distance) * magnet / distance powery = this._y - (distancey / distance) * magnet / distance forcex = (forcex + (homex - x0) / 2) / 1.66 forcey = (forcey + (homey - y0) / 2) / 1.66 this._x = powerx + forcex this._y = powery + forcey}
I would be extremely grateful if someone could show me how to edit it so that the objects DON'T return to their original positions. I would like to be able to use the mouse to chase objects round but have them stop when the mouse is no longer 'chasing' them
Thanks very much.
Simon
Avoiding Copying
Hi there
I've got three movie clips and I want to load three different images. I don't want to do it for one then change the names over and over again because I'm tired of this. There must be some way I can set up a loop in actionscript to do it more quickly, but I don't know how. This, ideally, would work but of course it doesn't....
Code:
numbers = Array();
numbers[0] = "one";
numbers[1] = "two";
numbers[2] = "three";
for(i=0;i<3;i++)
{
_root.createEmptyMovieClip(numbers[i]+"ImgLoad_mc", -1);
movieclip = String(numbers[i])+String("ImgLoad_mc");
movieclipLoader = movieclip+String("Loader");
movieclipLoader = new MovieClipLoader();
movieclipLoader.loadClip("img_"+numbers[i].".gif", movieclip);
//
}
If anyone can open my eyes on how to do this it would be appreciated!
Thanks
MC Avoiding Cursor
How do I make an mc avoid a cursor?
I tried this.
on (RollOver) {
this._x+=1
}
something like that
Avoiding Pixelation With Fscommand
Here's what I have:
main_movie.swf (with fscommand and loadmovie command)
load_movie.swf (with embedded qt movie 320x240)
When main_movie.swf loads, it goes obviously full screen.
How do I keep the load_movie.swf file at it's initial size of 320x240?
Is there some command like: loadmovieNum("load_movie.swf")noscale (320x240)...? or something like that to not only maintain the correct aspect ratio, but maintain the correct size?
Help! I've searched the forums, and gotten no answers... It seems like it would be a fairly simple command built into either the loadmovie or the fscommand actionscripts...
Thanks,
Joe
Avoiding Overlapping Depths
I am making 10 x 10 tiles of duplicated movie clip:
for (i=1; i<11; i++) {
for (n=1; n<11; n++) {
duplicateMovieClip("_root.cube", "cube"+i+n, n*i*n*n*n);
eval("cube"+i+n)._x += i*10;
eval("cube"+i+n)._y += n*10;
}
}
And it works perfect, but i had to set depths (as you see) in very strange way. To avoid ovrelapping depths i had to put very strange depths in duplicated movie clip. There must be more elegant way of seting this depths!
Thanks
Refreshing Avoiding Cache?
Hey guys! How are u? , I´v just made a site but i was wondering how to make that, everytime it is refreshed (or everytimen someone enter iun it), it refreshes the swf from the server, cause my problem is, that the swf sticks on the cache and it not updating it....i need it badly pls!
Avoiding Functions And Classes
ive been using flash for years but began as a designer
ive taken well to the coding side but generaly use the same kind of code eveywher.
whats a good way to learn about functions and classes when your dyslexic?
they cant be too hard but some tutorials just scare me with miles of txt.
all i need is a good example to follow and no bull.
thanks anyone who knows!
Avoiding On Enter Frame Possible With This Example?
can anyone think of a better way to do this
I have an array of points
in the on enter frame of each clip i want to move I
move it along the array of points
I tried using a for loop but the problem is as more clips are places into the loop it takes longer to go through and the animation noticably slows down...I need all clips to move at a uniform speed until they reach their end point or are interacted with
can anyone think of a way to not use the ONeNTERfRAME?
Avoiding Scroll Bars...
Hi !
I want to insert a Flash object in my HTML page without displaying the
browser vertical scroller.
Actually, I use this script :
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title></title>
<style type="text/css">
<!--
body {
width: 100%;
height: 100%;
border: none;
margin: 0px;
padding: 0px;
}
-->
</style>
</head>
<body scroll="NO">
<object id="application" width="100%" height="100%" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" >
<param name="movie" value="file.swf">
<param name="SeamlessTabbing" value="false">
</object>
<script language="Javascript">
<!--
application.focus();
-->
</script>
</body>
</html>
But officially, <body scroll="NO"> is not a "legal" option, even if
supported by MIE. (that's what Dreamweaver said...)
Is there a better way to avoid the displaying of any
scroll bar in every browsers ?
I didn't found such option in the css options...
Regards,
Mathieu
Best Way Of Avoiding Popup Blockers?
hi,
i've got this site online: http://talesoftheinexpressible.co.uk/
on some machines (browsers) i seem to be getting blocked access to the forum ("feedback" button on the second page). now what's the best way to avoid this happening? i'm sure there must be a simple solution, as flash buttons that spawn new windows is a commodity these days.
if anyone could point me in the right direction it would be great.
i've used JS before, but that seems even less likely to work. in that movie i've just highlighted the text and inserted a hyperlink with a "_blank" target.
seems ok in firefox, but doesn't everything. IE i'm having trouble in.
thanks in advance!
peace.
FLV Importation -- Avoiding Embedding...
Hi,
I'm dragging my FLV directly to the stage. It then automatically launches the window pane series to make selections. Now, the media company has already prepped the FLV so that it will stream progressively and said I need not worry about that.
Here's the problem, the series of panes are automatically making me keep the 'embed video in swf and play in timeline' ...it's a default that cannot be disabled.
Is that OK? Do I just go from there? Or is this a no-no? If so, how do I avoid the window panes from popping up...they are automatic.
I just need to get this movie onto the stage so that I can work with the components, assign it a skin & publish.
Thanks!
Avoiding FLVPlayback Errors
I'm looking for a way to avoid getting the "1000: Unable to make connection to server or to find FLV on server" error. I have a fairly sophisticated FLV Player that loads and unloads videos quite a bit. I want to write some code that will make it load a default video if the desired video cannot be loaded. As it is right now, I get the error before any states are received. Will the NCManager return this error if the path is incorrect even before putting out any state events? Any help would be greatly appreciated!
Avoiding Flash Decompiler
Hi,
Someday I was wondering how easy was to decompile a flash file. For my surprise, it's very easy to pick somebody work and copy everything.
So, thinking in how to avoid this, I got an idea. What if I export my flash (swf) to Macromedia Director and publish it as a shockwave movie (dcr)?
As I know, its not possible to decompile (or, at least, it's not so easy) a shockwave movie.
What do you guys think? Is it a good tatic to avoid somebody to copy your work?
HELP PLEASE: Avoiding Mouse Objects
Hey i was wondering if anyone knew i a way to solve this. Something i need for a project im working on.
Basically i want an object to avoid/dodge the mouse. But i want the mc to have a fixed x and y to move back to once the mouse is away. I also don't want it to jump, i want it smooth like a follow mouse effect.
Can anyone direct me to a tutorial or a few that will help me
thanks
Avoiding Flash Decompiler
Hi,
Someday I was wondering how easy was to decompile a flash file. For my surprise, it's very easy to pick somebody work and copy everything.
So, thinking in how to avoid this, I got an idea. What if I export my flash (swf) to Macromedia Director and publish it as a shockwave movie (dcr)?
As I know, its not possible to decompile (or, at least, it's not so easy) a shockwave movie.
What do you guys think? Is it a good tatic to avoid somebody to copy your work?
Actionscripting 101 ... Avoiding The Timeline
help for an idiot -- actionscripting 101
I'm not very good at flash. PHP by trade so forgive the ignorance.
What I want to do is a basic slideshow with as much actionscripting as possible since I'm so bad at working w/ the stage. The images cannot be dynamically loaded.
The problem is I don't even know what's possible and am having trouble understanding... well almost everything!
I'm thinking, instead of loading the images into frames, I can load them into the library. (?) I can then create one movie clip on the stage to load images into and put the names of the images into an array. "next" button will add 1 to the index of that array, "previous" will subtract displaying the proper image.
Is that wrong?
*What about preloading? Can I preload all the images and still display only one?
I want to have about 3 swf slideshow files like this with one main movie where you can click and choose which slideshow you want to see. If I do that can I still name all the jpgs as 001.jpg, 002.jpg for each slideshow or will that cause a conflict since the 001.jpg in the mountain slideshow is different than the 001.jpg in the desert slideshow? in other words, are libraries always shared?
*I have completed this whole project and now found out I can't dynamically load all the jpgs. They need to be "in" the movie. I have tried to manipulate that code but... error... ! If anyone can help me manipulate the code below I would love it. The pre-loader thing concerns me since I don't have one on this...was planning on preloading with the main movie onclickevent as the other swfs were called.
Here's a piece of that code: (this works perfectly)
this.pathToPics = "mountains/";
this.pArray = "title.jpg", "001.jpg","002.jpg", "003.jpg", "004.jpg", "005.jpg", "006.jpg", "007.jpg", "008.jpg", "009.jpg", "010.jpg", "011.jpg", "012.jpg", "013.jpg", "014.jpg", "015.jpg", "016.jpg";
this.fadeSpeed = 20;
this.pIndex = 0;
loadMovie(this.pathToPics+this.pArray[0], _root.photo);
MovieClip.prototype.changePhoto = function(d) {
this.pIndex = (this.pIndex+d)%this.pArray.length;
if (this.pIndex<0) {
this.pIndex += this.pArray.length;
}
this.onEnterFrame = fadeOut;
};
MovieClip.prototype.fadeOut = function() {
if (this.photo._alpha>this.fadeSpeed) {
this.photo._alpha -= this.fadeSpeed;
} else {
this.loadPhoto();
}
};
MovieClip.prototype.loadPhoto = function() {
var p = _root.photo;
p._alpha = 0;
p.loadMovie(this.pathToPics+this.pArray[this.pIndex]);
this.onEnterFrame = loadMeter;
};
MovieClip.prototype.loadMeter = function() {
var i, l, t;
l = this.photo.getBytesLoaded();
t = this.photo.getBytesTotal();
if (t>0 && t == l) {
this.onEnterFrame = fadeIn;
} else {
trace(l/t);
}
};
MovieClip.prototype.fadeIn = function() {
if (this.photo._alpha<100-this.fadeSpeed) {
this.photo._alpha += this.fadeSpeed;
} else {
this.photo._alpha = 100;
this.onEnterFrame = null;
}
};
this.onKeyDown = function() {
if (Key.getCode() == Key.LEFT) {
this.changePhoto(-1);
} else if (Key.getCode() == Key.RIGHT) {
this.changePhoto(1);
}
};
Key.addListener(this);
Avoiding Cutoff Popup
Hi, I have a popup that appears when certain buttons are clicked, but I would like this box to move over if the popup will be cut off by the stage boundary.
my code currently looks like this:
PHP Code:
_root.myPopUp._width = 250;
if (myPopUp._width > Stage.width) {
xvalue = this._x-250;
yvalue = this._y-80;
} else {
xvalue = this._x+130;
yvalue = this.y-80;
}
_root.myPopUp._x = xvalue;
_root.myPopUp._y = yvalue;
};
this isn't working out at all. if someone knows a way of doing this, or has any suggestions for my current code - your help would be greatly appreciated!
thanks.
Cached Movies - Avoiding Preloaders
If a flash movie with a preloader loads and runs through - if the user then returns to the page with the movie on does he/she have to watch the movie preload again...
Presumably it is stored in their cache and the preload scene could be avoided....is there any way of using actionscript to skip the preload second time around..?
Avoiding Using _root (syntax Question)
Hi, I am trying to write some re-usable code... and I was wondering if it is possible to write this another way, kind of avoiding the use of "root". here is what I have.... (this is working, I am just trying to get it working without any root reference so i can nest it in another movie).
code:
function placeSquares() {
nkr_mc.duplicateMovieClip("box"+m, m);
_root["box"+m]._y = (random(240)-20);
_root["box"+m]._x = (random(520)-20);
m++;
if (m == mEnd) {
clearInterval(timerID);
trace("It is done, do other things here");
}
}
It's part of a script that duplicates movie clips placing them at random. This is called on an interval, so it's kind of a loop (this worked better for me than a "for" loop, but it's similar).
my problem is the two lines:
_root["box"+m]._y = (random(240)-20);
_root["box"+m]._x = (random(520)-20);
but it won't work just like: ["box"+m]._y
i think using the brackets assumes you have something in front of it? because normally there would be _root. but you just use _root and kill the "." so i can see why it does not work by itself wihtout it.
the only other way i can think, is if there's a way to dynamically call levels.... something like: _level(m) but of course that syntax is not correct. if anyone can offer advise on this I would appreciate it. thanks.
Avoiding IE Security Blocker With Active X
Im new to the flash and web design. I been having this nagging problem concerning the security of Active x. I notice that sites with flash content don't give me that "IE has resticted this file from showing active content". But when I test my page, it gives me that. I don't have a host site yet, will this problem go away when I upload it to a server?
Second...I use the EXPORT MOVIE instead of publish for my flash content. Being that I use dreamweaver to place the content in a table is this the best way to go?
Avoiding Double Line Breaks
When I import text into a dynamic text box from an external PHP file using the attached code, Flash always interprets the single line breaks as double line breaks. i.e. if it import the following text from a PHP file:
'Ronald Knox,
10 Malvern Road,
London.'
The Flash movie will interprets it as:
'Ronald Knox,
10 Malvern Road,
London.'
Is there an easy way of avoiding this?
Many thanks,
Leao
Code:
path = "http://www.stpatrickscommunity.org/admin/text/address.php";
lv = new LoadVars();
lv.onLoad = function(){
str = unescape(this);
str = str.split("=&onLoad=[type Function]").join("");
address.html = true;
address.htmlText = str;
};
lv.load(path);
Avoiding 'onLoad=[type Function]'
Hi,
I have a dynamic text box that retrieves text from a PHP file that in turn retrieves text from a mySQL database. Sometimes the PHP file may necessarily display no text if the mySQL database is empty. However, when the dynamic text box in Flash tries to retrieve text from an empty PHP file the dynamic text box displays onLoad=[type Function]. Is there a way of making the dynamic text box display nothing in such circumstances?
I have attached the actionscript the dynamic text box uses to retrieve its text and also the PHP code used to retrieve text from the mySQL database.
Many, many thanks,
leao
Actionscript
code: path = "http://www.stpatrickscommunity.org/admin/text/landline.php";
lv = new LoadVars();
lv.onLoad = function(){
str = unescape(this);
str = str.split("=&onLoad=[type Function]").join("");
landline.html = true;
landline.htmlText = str;
};
lv.load(path);
PHP
PHP Code:
<?php
header('Content-type: text/html; charset=utf-8');
mysql_connect("mysql.myhosting.com","stpatri_user","password") or die(mysql_error());
mysql_select_db("stpatri_table") or die(mysql_error());
$result = mysql_query("SELECT * FROM text")
or die(mysql_error());
$row = mysql_fetch_array( $result );
$str_encoded=urlencode($row['landline']);
echo "$str_encoded";
?>
Avoiding 'onLoad=[type Function]'
Hi,
My dynamic text boxes retrieve text from PHP files that in turn retrieves text from a mySQL database. Some times the PHP files may necessarily display no text. When my dynamic text boxes in Flash try to retrieve text from such empty PHP files the dynamic text boxes display onLoad=[type Function]. Is there a way of making the dynamic text boxes display nothing in such circumstances?
I have attached the code used to retrieve text into the dynamic text boxes below.
Many, many thanks,
leo
ActionScript Code:
path = "http://www.stpatrickscommunity.org/admin/text/address.php";
lv = new LoadVars();
lv.onLoad = function(){
str = unescape(this);
str = str.split("=&onLoad=[type Function]").join("");
str = str.split("
").join("<br>");
address.html = true;
address.htmlText = str;
};
lv.load(path);
Constraining/Avoiding Organic Shapes
Hello all,
I'm currently working on a 2D (top view) racing game and I'm currently stuck trying to figure out how to keep the motorbike inside the racing track.
I've read about hittest but I failed when I tried coding it into the game as I'm not too familiar with it so I've resorted to a constrain/avoid script. I've tried but it won't work because the shape of my track is pretty organic. Is there a way for me to constrain the motorbike to an organic shape???
Also, the script that I found, is applied to a mouse movement and not a movieclip like i want it to and I'm trying to figure out how to apply it to a movieclip. A file of the script I found is attached.
MovieClip Avoiding Mouse (with Boundary)?
Hi
I have a movieclip that I want to avoid the mouse.
here is the code i have attached to it:
Code:
MovieClip.prototype.avoidMouse = function(distance, accel, decel) {
if (!this.AvdMsCtrl) {
this.AvdMsCtrl = new Object();
this.AvdMsCtrl._xspeed = this.AvdMsCtrl._yspeed=0;
}
var xdiff = this._parent._xmouse-this._x;
var ydiff = this._parent._ymouse-this._y;
var dist = Math.sqrt(xdiff*xdiff+ydiff*ydiff);
if (dist<distance) {
var angle = Math.atan2(ydiff, xdiff);
this.AvdMsCtrl._xspeed += Math.cos(angle)*accel;
this.AvdMsCtrl._yspeed += Math.sin(angle)*accel;
} else {
this.AvdMsCtrl._xspeed *= decel;
this.AvdMsCtrl._yspeed *= decel;
}
this._x -= this.AvdMsCtrl._xspeed;
this._y -= this.AvdMsCtrl._yspeed;
};
mc_butter.onEnterFrame = function() {
this.avoidMouse(50, 2.5, .95);
};
1: How do I set a boundary for this...so that my movieclip doesn't fly around my whole stage...just a specific area?
2: Is the code I have very efficient?
3: also is there a way to make it bounce off the boundary?
Thanks alot
Avoiding Fuzzy Small Fonts
Is there a way to turn off antialiasing for fonts? When fonts are small, they are MUCH clearer without antialiasing. Specifically, I would like to use a 10 pt Verdana font, embedded (so that all users see exactly the same spacing of fonts) but NOT fuzzy. The only way I have found to avoid fuzzy fonts is _sans. Why can't I embed any font I want and specify antialiasing or not? Hopefully, it is possible?
Avoiding Repeated Variable Numbers
Hello all. The following is some code to have movie clips randomly loaded into the main movie. How would I go about making it so that once a certain number out of the range was selected, it would not be repeated. That is to say, if the movie clip mcExercise2 has been loaded, it will never happen again, it will select a different number because "2" has already been used.
Any input is most appreciated..
Attach Code
var nExerciseCount:Number = 0;
function randRange(min:Number, max:Number):Number {
var randomNum:Number = Math.floor(Math.random()*(max-min+1))+min;
return randomNum;
}
for (var i = 0; i<100; i++) {
}
function displayExercise():Void {
mcExercise.removeMovieClip();
this.attachMovie("mcC1Exercise"+randRange(1, 3), "mcExercise", this.getNextHighestDepth());
mcExercise._x = 410;
mcExercise._y = 270;
for(i=0; i<5; i++) { }
if(nExerciseCount <= 3) {
nExerciseCount++;
trace(nExerciseCount);
}
else {
mcExercise.removeMovieClip();
gotoAndPlay("C1A_End");
}
};
Constraining/Avoiding Organic Shapes
Hello all,
I'm currently working on a 2D (top view) racing game and I'm currently stuck trying to figure out how to keep the motorbike inside the racing track.
I've read about hittest but I failed when I tried coding it into the game as I'm not too familiar with it so I've resorted to a constrain/avoid script. I've tried but it won't work because the shape of my track is pretty organic. Is there a way for me to constrain the motorbike to an organic shape???
Also, the script that I found, is applied to a mouse movement and not a movieclip like i want it to and I'm trying to figure out how to apply it to a movieclip. A file of the script I found is attached.
EDIT
For those who've viewed this, I found a solution at actionscript.org
Actionscript Mouse-avoiding Spider
Hi everyone,
I've recently seen a great effect on 24-7 media which is the fly that runs away from your mouse. I was wondering how could I create something like that with a spider.
Does anyone have any ideas where to begin, or any examples I could look at?
Thanks. Adam.
Avoiding Overlap Break With Line Tool
Hello;
I am sure this question has been asked many times before this.
I am trying to draw hair with the line tool, japanimation style but I am having a problem with the lines breaking into two after they overlap another line and I run into the problem of not being able to bend what I originally intended to be one line. It turns to two after crossing the other. If someone could point me to a thread, a tutorial or just answer me that would be sweet.
Thanks.
|