This Is Driving Me Crazy.........
I've got a menu bar in a movie clip which reveals on an invisible button. No problem so far.
When the menu comes up the movie stops, so that the user can click on a button in the menu.
However I want to move the movie on (and hide the menu) if the mouse moves beyond a certain point. I've checked my x coords and if the mouse moves beyond 10 on the x axis I want the action to be gotoandplay at a label called close.
I've tried:- if (_root._xmouse > 10) { _root.gotoAndPlay ("close") }
and I've tried various combinations of _root, what am I doing wrong , it's doing my head in !!!!!!
FlashKit > Flash Help > Flash ActionScript
Posted on: 01-31-2002, 10:17 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Help.... Please It's Driving Me Crazy
I am so new to Flash. I have a class project that I in such need of help. I have a home page with four navigation buttons. Each button will go to a new scene and display an animation that I made in class. No problem so far. I got the buttons to go to each scene. The problem is when I open my animation file, I cannot find out the correct way to place the separate animation on each separate scene. I have tried copy frames, paste frames. I have tried to make each animation a mc. My guided paths go haywire. Can someone please... please help me. This project is due Thursday and I am so confused.
Thanks
Driving Me Crazy
Hello-
It's a mess, but trying to change a onClipEvent to gotoAndPlay instead of getURL. I'm using MX...
Action Scripting in Question below-
onClipEvent (mouseDown)
{
for (var j = 0; j < _parent.num_menu_items; j++)
{
if (_parent["item" + j].item_bg.hitTest (_parent._parent._xmouse, _parent._parent._ymouse, true))
{
getURL (_parent.urls[j],_parent.url_opening_style);
}
}
}
Thank you for any input. See attached file.
Ok.....this Is Driving Me Crazy
I have a 10 empty mc lined up horizontally, for loading thumbnail images, which in turn will scroll horizontally. I'm trying to load all 10 images dynamically using XML
My question is ,how do i tell XML to load the thumbnail images into each mc? Can someone pleas help or point in the right directtion?
Thanks for all help,
MIKRO
Driving Myself CRaZy?
Okay, I'm making a website where when a link is clicked I use a loadMovie command to load a SWF into a MC of the main website called "holder" (cuz it "holds" the MCs). So, for example, if someone clicks the "contact" link, then "contact.swf" is loaded into the MC called "holder"....
That being said, my problem is with the preloaders of the SWFs that go into the "holder" MC. While the main site's SWF is very small, some of the SWFS being loaded into the "holder" MC are not (one is 250kb, cuz it's design portfoilo work). I cannot get the loaded SWFs preloaders to work - they keep functioning as though they're reading the getBytesLoaded and getBytesTotal of the main website's SWF (so a SWF that's like 250 kb has a preloader that only works for the 15 kb of the main site - then it just sits there and waits on a blank screen until the loaded SWF is done loading)....
I've tried "this.getBytesLoaded" and "_root.getBytesLoaded" and "_root.holder.getByetsLoaded" - what am I doing wrong?!?....
This Is Driving Me Crazy
good afternoon everyone!
i have been working on and off with this file. it is links for a school district website. i have 3 of the 4 links working, but cant get the link entitled "technology services" to work properly. the text keeps popping up instead of sliding down... grrr... can someone take a look and tell me where i have made my mistake?
thanks a ga-zillion!
This Is Driving Me Crazy
Get this...
I have a movieclip in a project, that I want to change the colour of (dynamically).
Now... when run within my project.fla it doesnt work - but if I copy the frame with its actions and paste it into another file it works fine!!!!
this is even weirder.... if I delete ALL the frames and layers and ALL the library instances from my project.fla and repaste my frame with its actions it STILL doesnt work!!!! (the exact same frame and actions that works in other files)
these things are sent to test us - but this is doin' mi heed in!! :-)
Ive attached the fla (which works) if anybody could shed some light on this it would be MUCH appreciated
Help Me Please...driving Me Crazy
HELP!!
Flash version MX
Here is the problem. I've created a dynamic drop down menu that will be the navigation structure for a website. Everything works like a charm except for one major problem: everytime a link is pushed it pops open a new ("_blank") window.
It might be something simple.
Check out the source code. You'll need to be familiar with actionscripting to answer this question.
Thanks so much guys
NEEDS HELP!!
Driving Me Crazy
I have a movie clip that I can drag around the screen. When I let it go, it falls to the bottom. The problem I'm having is that it does not wait for me to let up on the mouse before the gravity pulls it down. Here is the code I am using:
onClipEvent(enterFrame) {
if(this._y < 620) {
this._y += 15;}
if(this._y > 600) {
this.gotoAndStop(2);
this._x += 5; }
if(this._y > 640) {
this._y = 640;}
if(this._x > 479){
this.gotoAndStop(1);}
if(this._x > 480){
this._x = 480;}
if(this._x < 0){
this._x = 0;}
}
onClipEvent(mouseDown) {
this.gotoAndStop(1);
if(this.hitTest(_root._xmouse, _root._ymouse)) {
this.startDrag(true);
}
}
onClipEvent(mouseUp) {
this.stopDrag();
}
I think I'm just putting something in the wrong order or something, but it is driving me insaine. If someone could help me out, I could put thier name in my movie, which will be on www.newgrounds.com...
This Is Driving Me Crazy
here a simple problem I have movieClip in the library, with a dynamic text field. I set the linkage of the movie clip and set the character options for fonts. I use this code and I can't get the text field to populate.
trace("name "+_global.video_array[0]); shows Bob Joyce in out put field which is correct, why doesn't work?
Code:
_root.attachMovie("Video_cover", "vCover", getNextHighestDepth());
_root.vCover._x = 264;
_root.vCover._y = 378;
trace("name "+_global.video_array[0]);
_root.vCover.v_text.text = _global.video_array[0]);
_root.vCover.v_text.autoSize = true;
Please Help Me This Is Driving Me Crazy
okay, I have been doing flash for a while now but one thing that i have not been able to get working for me is transitions beween movie clips. I know how to do fade between them but i would like to have motion instead. I need the whole movie clip to load out (with some sort of tweening) before the next clip loads in (with some sort of tweening).
example:
if you were to click on button one, there would be a preloader, some sort of motion and then the movie would stop.
Once you clicked on another button, the current movie would do some sort of motion loading out and then the next movie would load, with a preloader and some sort of motion.
I would like to do this with 5 to 7 buttons.
I just cant figure out how to make it work to that if you click on button 3 and button 1 is loaded, how button 1 will unload and load button 2 but not button 4?
I assume that this will have have something to do with the script on my buttons. but if anyone could help that would be awesome.
if you need an example of what i would like to do, look at the link below. I would just like to know how to do this.
thanks.
http://www.mattpondpa.com/v1/mppa.html
p.s. i love this band and recommend everyone buying their records. in no way do i intend to still anything from their site.
Driving Me Crazy.
For nearly a fortnight now I've been trying to get a contact form to work. I've tried PHP and ASP. Scripts that work fine on other sites and servers just won't work. Members on FK have given me a lot of help, and sent files that they use successfully but just don't work. The site runs fine otherwise. I've just emailed the hosting company asking them to recheck things at their end. Can anyone think of anything that could be wrong there? Or may be a work around? If I hosted the contact form on my site and used the PHP script there should that work? Anything?
It's Driving Me Crazy...
Hi there..
I got the following problem:
3 different swf files in 3 different frames on my website..
file 1: menu
AS on the first frame of menu.swf
Code:
mySender = new LocalConnection;
foto = new LocalConnection();
stop();
AS on a button in menu.swf
Code:
on (release) {
_root.foto.send("mynConnections", "mynAction", 1);
_root.mySender.send("myConnections", "myAction", 1);
_root.about.gotoAndPlay(2);
_root.works.gotoAndStop(1);
_root.news.gotoAndStop(1);
_root.links.gotoAndStop(1);
_root.contact.gotoAndStop(1);
gotoAndStop(3);
}
Receiver movie 01
on frame 1
Code:
_root.nummer = 1
On the second frame
Code:
onEnterFrame = function () {
_root.displayNumber = _root._currentframe;
};
myReceiver = new LocalConnection();
myReceiver.connect("myConnections");
myReceiver.myAction = function(doThis) {
if (doThis == 1) {
_root.nummer = 1;
play();
} else if (doThis == 2) {
_root.nummer = 2;
play();
} else if (doThis == 3) {
_root.nummer = 3;
play();
} else if (doThis == 4) {
_root.nummer = 4;
play();
} else if (doThis == 5) {
_root.nummer = 5;
play();
}
};
stop();
On the third frame
Code:
if (_root.nummer == 1) {
gotoAndPlay(5);
}
if (_root.nummer == 2) {
gotoAndPlay(20);
}
if (_root.nummer == 3) {
gotoAndPlay(30);
}
if (_root.nummer == 4) {
gotoAndPlay(40);
}
if (_root.nummer == 5) {
gotoAndPlay(50);
}
Receiver movie 02
on the first frame:
Code:
_root.naam = a
on the second frame:
Code:
onEnterFrame = function () {
_root.displayNumber = _root._currentframe;
};
myReceiver = new LocalConnection();
myReceiver.connect("mynConnections");
myReceiver.mynAction = function(doThis) {
if (doThis == 1) {
_root.naam = a;
play();
} else if (doThis == 2) {
_root.naam = b;
play();
} else if (doThis == 3) {
_root.naam = c;
play();
} else if (doThis == 4) {
_root.naam = d;
play();
} else if (doThis == 5) {
_root.naam = e;
play();
}
};
stop();
on the third frame
Code:
if (_root.naam == a) {
gotoAndPlay(4);
}
if (_root.naam == b) {
gotoAndPlay(9);
}
if (_root.naam == c) {
gotoAndPlay(14);
}
if (_root.naam == d) {
gotoAndPlay(19);
}
if (_root.naam == e) {
gotoAndPlay(24);
}
The both localconnections aren't working.. who can help me out...
I've tried for a few days but I can't solve the problem...
thnx!... J
Help This Is Driving Me Crazy
Ok here is what I have so far this is my first attempt at a flash site and I am stuck. http://www.truball.com/test.swf this will be the "opening" and then each time you click the buttons on top the movie will load just in the black portion in the middle. I just cannot figure out how to do this. If anyone can help me or point me in the right direction I would greatly appreciate it!!
This Is Driving Me Crazy
I downloaded a Flash template. Customized it and saved back to local directory in the same hierarchical folders it was set up in. It played just fine. www.riversilk.com/TypeTemplate/html/index.html
Then I go to copy and replace the index.html on site root and now only half the movie plays. www.riversilk.com
I updated the .swf and .fla img src links, manually even. I tried the obvious. Thing that drives me crazy is that they're reflecting the same file sources. Can't see anything different (except the updated link addresses) in the code. I've run out of ideas. Help.
Driving Me Crazy
Please help, this is driving me nuts.
I went to create a new website today with a content loader like i've done many a time.
I use a empty movie clip and load the external SWF's into it for my pages.
What happened today is when i test the movie it's looping the loaded SWF and i've dont it exactly the same way i've done all others. I even tried using the mx.control loader component and it does the same thing.
THIS IS NUTS!!!!
Anyone know what's going on?
Am i being a mellon or what?
Thanks,
Stu.
[F8] Please Help, This Is Driving Me Crazy
I have one movie clip loaded inside another which I am using as an interface. How do I make a button in the loaded clip change the frame of the interface? any help would be appreciated, ive been stuck on this for ages and im going nuts!
Please, please help me!
Thanks in advance.
[F8] Please Help-this Is Driving Me Crazy
I have one movie clip loaded inside another which I am using as an interface. How do I make a button in the loaded clip change the frame of the interface? any help would be appreciated, ive been stuck on this for ages and im going nuts!
Please, please help me!
Thanks in advance.
Please Help Me On This, Driving Me Crazy
We have the following problem with actionscript:
I have an fla (the size is 200 * 100), within it I have made a background of 1000 * 500, on the background in each corner there are 4 different movie clips eachone has the size of 200 * 100, also in the center of my fla I have 4 buttons.
What I want to do is by clicking for example button1, the screen (_x, _y) to slide and stop on the movieclip assigned to button1! once I press button2, it slides from button1 to button2, and so on! but I need this to be dynamic so that I can later on add on movieclips or change their positions.
I have allot of problems with the +x, -x, +y, -y ...
Please help me on this.
Driving Me Crazy--help
ok I have a logo fading in and then once it's loaded it starts a menus animation. My problem is I can get the menu working no problem but not the logos fade and I can't see why.
When I do get the logo working the menu doesn't look right. Don't know how to explain it but it looks like somethings went wrong with the images and hey presto, the menu looks weird compared to the other movies where the menu looks like it should, but of course the logo don't work in those movies.
Someone help before I go ****ing nuts please
http://www.rbell.net/__trial/flashtrial2.fla - logo fades in ok, menu looks weird
http://www.rbell.net/__trial/3rdgo.fla - logo doesn't fade in but the menu looks like it should
help
Driving Me Crazy
as many of you may or may not know, when you doubble click on a word in action script it will select the word, a tripple click selects the line and quad click will select all.
somehow I was able to break something so now when I doubble click it selects just the word first then the whole line a second later. I have restarted and gotten a new mouse, no dice
if anyone could shed some light on what I may have done to cause this, it would be much appreciated!
thanks!
ak
Preloaders Driving Me Crazy
I'm having some major problems with doing the final touches. A. The published HTML files won't even display the preloader. B. When I just load the .swf file, from the server - I see the preloader, but I don't know if it is really pre-loading. C. My main pre-loader seems to work. But, I have a pre-loader inside another .swf that my main movie loads into a blank MC. Flash ignores the preloader inside the .swf, inside the MC and just downloads the file before doing anything. I tried just loading that .swf file separately and it loads the whole thing before displaying anything.
Any Idea what is going on?
Thx
J.
Actionscript Is Driving Me Crazy
A simple example:
A new file, first frame has this script:
Ready = 0;
loadVariablesNum("script.php", 0);
The script is supposed to set the variable Ready to 1 to let the flash animation do something.
I create a second frame and add this script:
if (Ready ne 1) {
TRACE("wait");
gotoAndPlay (2);
}else {
TRACE("go 4");
gotoAndPlay(4);
}
TRACE("wtf");
An extra frame 4 has some stuff to do ONLY if Ready is set to 1. My problem is - please anyone explain this to me - the swf runs, prints out "wait" many many times, which is right, because Ready is not being set to 1 by my script yet and it's repeating frame 2 forever. But the freakin script ALSO prints out "wtf" and goes to frame 3 and 4 - why does this happen?
TIA
Form Driving Me Crazy Help Please
Ok, here is my dilemma!
I have a form I created for a site that works just fine when I am viewing the website on my local machine. As soon as I upload it to the server and test it, I get an error. For some reason when I place the form online it does not seem to communicate with the ASP script I am using to handle the form.
I am using the full URL to the path of the ASP script so I am not sure why this is happening.
The website can be viewed at www.markchevrolet.com
Clicking the link pre-approval with then call in an external SWF file using the load movie command.
On the forms SWF I have two layers one for functions and one for variables.
in the first frame of the variables layer I have this code that basically loads the variables for the form.
_root.formData = new LoadVars();
_root.formData.FirstName = "";
_root.formData.LastName = "";
_root.formData.streetAdd = "";
_root.formData.City = "";
_root.formData.State = "";
_root.formData.Zip = "";
_root.formData.homePhone = "";
_root.formData.visitoremail = "";
_root.formData.rsMode = "";
_root.formData.monthly = "";
_root.formData.addYears = "";
_root.formData.addMonth = "";
_root.formData.employer = "";
_root.formData.occupation = "";
_root.formData.workPhone = "";
_root.formData.income = "";
_root.formData.employYears = "";
_root.formData.employMonth = "";
_root.formData.friendName = "";
_root.formData.friendPhone = "";
_root.formData.message = "";
_root.formData.RecipientEmail = "rick@megamania.com";
_root.formData.merchantphone = "281-461-1110";
_root.replyData = new LoadVars();
_root.replyData.onLoad = myOnLoad;
globalStyleFormat.FMessageBoxTitleText = new TextFormat( "Arial Bold", 15, 0xffffff);
globalStyleFormat.applyChanges();
errBox.setButtonWidth(50);
on the first frame of the functions layer I have this code to handle the error checking and form processing.
_global.ErrMessage='';
_global.ErrAlert=false;
function ckName(){
if (_root.formData.FirstName == ""){
ErrMessage = ErrMessage + "Please Provide First Name" + chr(13) + chr(10) ;
return false;
}
else
return true;
}
function ckLName(){
if (_root.formData.LastName == ""){
ErrMessage = ErrMessage + "Please Provide Last Name" + chr(13) + chr(10);
return false;
}
else
return true;
}
function ckEmail(){
if(_root.formData.visitoremail == ""){
ErrMessage = ErrMessage + "Please Provide Email Address" + chr(13) + chr(10);
return false;
}
else{
if(_root.formData.visitoremail.indexOf(".",0)==-1 || _root.formData.visitoremail.indexOf("@",0)==-1){
ErrMessage = ErrMessage + "Your Email Address Is Not In Correct Form";
return false;
}
else
return true;
}
}
function myOnLoad(success){
errBox.setEnabled(true);
if(success){
errBox.setIcon("info");
errBox.setTitle("Thank You");
errBox.setMessage("We have received your information and a Mark Chevrolet Internet Specialist will contact you shortly. Thank You For Contacting Mark Chevrolet. We will respond shortly.");
errBox._visible=true;
clrData();
}
else{
errBox.setIcon("warning");
errBox.setTitle("System Error");
errBox.setMessage("There has been a system error submitting your email. Please re-submit. Thank you.");
errBox._visible=true;
}
}
function goPostal(){
ErrMessage='';
ErrAlert = false;
if(!ckName()){
ErrAlert = true;
}
if (!ckLName()){
ErrAlert = true;
}
if (!ckEmail()){
ErrAlert = true;
}
if(ErrAlert==true){
errBox.setMessage(ErrMessage);
errBox._visible=true;
return;
}
else{
errBox.setIcon("info");
errBox.setTitle("Sending Mail");
errBox.setMessage("Your Email Is Being Submitted");
errBox._visible=true;
errBox.setEnabled(false);
_root.formData.sendAndLoad("http://www.myserver.com/cgi-bin/sendmail.aspx", _root.replyData, "post");
return;
}
}
Can anyone tell me why it works when I view the page locally and not when it on the server???
Big Thanks
Rick
This Navigation Is Driving Me Crazy, Please Help
I asked this question over the weekend, but the only respone I got is using tell targets. The naviagtion is here:
http://www.code-media.com/home.htm
Obviously this is a very nicely designed site. I have seen this style of navigation before where a movie clip reacts to another. I cannot figure this out for the life of me. Can anyone provide a FLA or tutorial.
Thanks for any help.
This Dot Syntax Is Driving Me CRAZY
_root.buttons.top_button.top_text.stop();
I have a group called buttons - instance of buttons
I have a movie clip inside the group called buttons called top_button - instance of button_siteimade
I have a movie clip inside that button called top_text - instance of text_siteimade
I put the following code into the first frame of my movie. Why the hell does this movie keep playing? ( Please answer this as quick as possible because I feel like blowing my brains out at the moment.
Hittest Driving Me Crazy
somebody, anybody, help me!!! how do i get a simple line(converted to an mc) to stop another mc(moved with arrow key)from going in a deriction????
if that's to confusing here the file
Variable - Driving Me Crazy
Can anyone take a little looky at the attached fla for me, and tell me where I'm going wrong. I know this is likely to be me doing something stoopid or missing something obvious, I'm a newb at Flash, and have MX 2004.
This fla has been simplified from my original so I can first of all get my head around passing these 2 variables into a GetURL string! It doesn't actually do anything (of use), other than show me that I'm able to successfully see the 2x variables (captured in associated text boxes, using the trace()), after clicking the button.
My aim is to create a small login box, I hope for it to:
(1) capture username and password variables (input by user)
(2) then on 'Login' button, getURL including variables. (so http://var1:var2@domain.com). This bit isn't included in this fla, becauise I just want understand why I'm not passing the variable on at the moment.
I'd appreciate any help anyone one can give me
Thanks
Duplicated MC - Driving Me Crazy
I have an MC moving it's Y position a random X position - When it hits another MC I want the "score" dynamic text field to advance by 100 and remove the MC - I got this all working fine -
BUT I want many instances of the MC to be falling but can't get it work properly while the score still advances by 100 every time it hits - Can someone take a look at this ??
LoadMovie Driving Me Crazy
OK, I have been beating myself up on this one. It seems like it should be fairly simple, but here I am.
I have my main swf, it loads navigation into an empty MC. From the navigation I load an external swf into another empty MC in my main swf.(no problem there) Now I want the new navigation in that external swf to load another external swf back into an empty MC in my main movie.
Did that make any sense? Any help on this would be more than appreciated.
I am trying to us a on(release) along with loadMovie, and it is in flash mx.
Thanks in advance
Neebie Needs Help.. ITS DRIVING ME CRAZY
Hi there,
I have Flash mx Pro which doesn't have that useful window that assists you when witing actionscript. I'm not a pro and can't write actionscript from scratch.
What I want to do is.....
have buttons that when released go to a frame lable within that scene.
Easy eh???
not so.. am pulling my hair out.
Thanks in advance,
ez
It Seems Simple But Its Driving Me Crazy
I posted yesterday for help on a combobox and the exaple I was given didn't show how to go to diffrent scenes, I'm making a gallery and I have about 20 scenes and could someone please tell me what I need to put for the components actions to get it to go when the label is clicked.
LoadMovie Has Been Driving Me Crazy
I am trying to simply load my intro for my game from my website. The code i used was just this:
this.createEmptyMovieClip("logo_mc", 999);
loadMovie("http://www.allsfairgame.com/Intro.swf", logo_mc);
but whenever it plays it leaves out a piece of the clip and it gives me this message:
*** Security Sandbox Violation ***
SecurityDomain 'http://www.allsfairgame.com/Intro.swf' tried to access incompatible context 'file:///C|/Documents%20and%20Settings/Greg%20Klein/Desktop/AllsFairGame/TRY%20INTRO.swf'
Apparently im not playing in my own sandbox whatever that means. Any help on this would be greatly appreciated.
This Is Driving Me Crazy Won't Let Me Do Simple If(obj.x>0)
OK this is bizarre...
I do this:
if (voteSums.vt1.x !=0)... it works...
I do this:
if (voteSums.vt1.x > 0 )... it doesn't work!
What the crap, this makes no sense.
It says: TypeError: Error #1009: Cannot access a property or method of a null object reference.
<il> Tags DRIVING ME CRAZY Plz Help
hi i have created a site with flash that gets all data froma XML file
i am using bullet points in part of it but for some reason the bullets are displaying in black and not the same colour as the font in the text boxes i can not seem to change this any ideas
it does not help as the background of my site is black therefore i can not see the bullets
thanks in advance for any help
fla and xml files are uploaded to http://www.illit.net/test/problemsitexml.zip
the bullets are on the home MC
For Loop, Driving Me Crazy
Ok, so new to AS3, and trying to do something simple, buts its driving me nuts. I use to be able to use eval, but not anymore.
Here is my code.
var arr:Array=["t1_mc","t2_mc","t3_mc"];
for (var i in arr) {
trace(arr[i]);
arr[i].scaleX=arr[i].scaleY=.5;
}
Basically, i have 3 movie clips on the stage, t1_mc, t2_mc, etc... I want the for loop to scale the size down to 50%.
I can trace the output and i get t1_mc, but it wont work on the scale?
The other thing i tried, which i would prefer, is no array and to simply append "t" + i + "_mc" to everything, for example:
for (var i:Number=0; i<10; i++){
var setN:*= "t" + i + "_mc";
trace(setN);
setN.scaleX=setN.scaleY=1;
}
This traces fine, but will not work.
Any clue?
Thanks.
SetInterval Is Driving Me Crazy
I have created an animation that mimics a heart monitor. The animation runs too fast if I use the onEnterFrame command so I researched the setInterval command and now I cannot figure out why this isn't working!
ActionScript Code:
var count = 0;
var first_x = 0; // starting x position
var first_y = 120; // starting y position
var growth_x = 50; // line growth rate
_root.createEmptyMovieClip("line", 1); // line movieclip
monitorInterval = setInterval(Monitor, 10000);
pulseInterval = setInterval(Pulse, 10000);
function Pulse () {
line.moveTo(first_x, first_y);
second_x = first_x+20;
second_y = first_y-90;
line.lineTo(second_x, second_y);
third_x = first_x+40;
third_y = first_y-15;
line.lineTo(third_x, third_y);
fourth_x = first_x+50;
fourth_y = first_y-40;
line.lineTo(fourth_x, fourth_y);
fifth_x = first_x+70;
fifth_y = first_y;
line.lineTo(fifth_x, fifth_y);
first_x = first_x+70;
}
function Monitor () {
// horizontal line movement
line.lineStyle(2, 0x0000FF, 100);
line.moveTo(first_x , first_y);
line.lineTo(first_x+growth_x , first_y);
first_x = first_x+growth_x;
Pulse ();
}
onEnterFrame = function () {
Monitor ();
}
Chat Box Driving Me Crazy
Ok, I'm stuck!!!
This might seem small to others but it's driving me crazy. I am messing with Flashcomm server and the default sample_panel_presentation that came with it. I have taken the fla and edited it to show just the video window and the chat box.
What I want to accomplish is to have either a mask or reveal the text chat box and still keep its functionality. Whats happening is that if its moved from frame 1 to frame 30 the functionality disapears. You can see the slide bars, and when the cursor is moved over the text chat box it changes to a text cursor, but you lose the text box you type into as well as the submit button?
I have attached the FLA for anybody that wants to assist me in this. I am not understanding why that when I move it to frame 30 it breaks?
Any help would be great and of course this is for a project and I need assistance like last week.
File: www.storhost.com/uploads/me.zip
SetFocus Is Driving Me Crazy Please Help
Hi,
How the **** do you set the focus on a dynamicly created input field inside a dynamicly created MC????
I'm using mx2004pro btw...
ps: i can't use the Selection.setFocus("TF") here cause i don't have no 1st frame where to write that down...
Please help i'm stuck at this for days !!!!!!!!!!!!!!
Shifting Bug Driving Me Crazy
Hi all,
The bitmap pixel shifting bug in flash has kept me away from flash for years. Now I finally started using flash, with a lot of workarounds for this problem. The best thing to do is to have a 1px transparant border around the image and set the registration point to top left corner, so that it falls in a transparant area.
This is ok for images embedded into the swf. But when you load external jpg's into an MC, they still get shifted!
With flash player 7, the problem is finally gone. But I assume it's a bad thing to publish a website in 7 because nobody has it... (or am I wrong? are there statistics on this available?)
So for now I'm trying to publish in 6... I can easily move my container MC which loads the images 1px right and down, this makes the image to appear correctly. I say appear, because it's not 100% correct at all. The left and top border of the image gets 'smeared' out over two pixels. And the right and bottom row of pixels simply dissappears!
See below what I mean (screenshot of loaded image, zoomed in in photoshop to see it better)
I know I'm a perfectionist, but sometimes this really matters on smaller, detailed images because you suddenly loose a bunch of pixels.
Now all this is really really annoying, but still I can live with it.
What really drives me mad is that not only bitmaps are shifting, but simple vector drawn objects also shift!!! In fact, the whole flash movie seems to shift! This will not draw your attention at first, but if you use the workaround for the bitmap shifting, you clearly see all other non bitmap stuff on the stage shifting!
Below is an example. The red rectangle is vector based, drawn in flash. The white and grey pixels are part of a bitmap with the 1px transparant border. On the right you see how it looks like in editing mode (is how it should be), and on the left is the result in the flash player 6.
What is going on here! Why can't flash simply display everything right?
It's really the red rectangle that shifts, not the bitmap underneath it. I have it placed on integer pixel values and the size is also integer values.
The only solution for me is to publish in flash player 7, but I guess many people won't reach my site since they don't want to go and download the latest version of some software, they just wanne see the site.
I guess I will have to make a non fash site too, but then what's the use of the flash site...
Any suggestions are welcome!
Kind regards,
A frustrated flash user :-)
Txt.AutoSize Driving Me CRAZY
Alright. So I've got two text fields each in their own movie clips right next to each other. They are both right-justified and I want them to appear as if they're typing into place starting from the right side.
SO, when I apply autoSize="right" to the textfield on the right, the textfield disappears (I assume because since there's no text in it yet, it resizes to 0). I would assume however, that as text is "typed" into it, it woudl then expand to fit. However that is not the case. It remains invisible until I zoom in. I don't understand why, but for whatever reason that makes the text viewable again...
The reason I need to field to resize is that based on the length of that textfield I need the second textfield to align its right edge with the left edge of the first text field.
I have tried lots of different things and it's driving me crazy. I thought to set the autosize to "right" and then make the textfields invisible and load all the font (which I then assumed would resize the textfield to the right length) then switch the autosize back to null and then empty the text field and then bring back the alpha to 100, and then type out the text... But it doesn't resize! BAH!
When does autosize resize the text field? I thought it was when the texfield changed, but that is not the case... PLEASE!!!! Someone help me, I'm going nuts over here!
Here's a .fla
HTML In XML.....driving Me Crazy..please Help...
Hi guys....
Right I have been tryng to fornat text within a dynamic text field for a few days now and have found that the only way seems to be by having the text in a xml file, with html tags and loading it in to flash...fine....
I have managed to learn the basics of xml and understand these...
I have managed to load the xml into flash and display them....
I have also managed to format individual text fields containing the xml by simply using the properties panel....
however, I cant seem to get the html side to work....perhaps I'm not using the right html syntax or perhaps just not telling flash to accept it.
I have attched the two files (examples)....for example in the 3rd "persons" node in the "comment" I would like say....a list of names....using html...indented and with bullet points...I tried copying and pasting html from dreamweaver put flash didnt like it.
Can anyone show me what 'm doing wrong....or how to get flash to recognise html within a xml file.
Please, please, please....
thanks guys.
External Swf Driving Me Crazy :D
i have this code inside a class. and it loads the movie perfectly, but when i load another it does not replace the existing one, instead.. it loads on top of it
Code:
private function mouseClick(event:MouseEvent):void
{
var request:URLRequest = new URLRequest("home.swf");
var loader:Loader = new Loader();
loader.load(request);
loader.name = "myLoader";
loader.load(request);
//if(MovieClip(root).mainSite.myLoader != null)
// {
// MovieClip(root).mainSite.myLoader.parent.removeChild(MovieClip(root).mainSite.myLoader);
// }
MovieClip(root).mainSite.addChild(loader);
//trace(Global.getInstance().mainVar2);
trace(event.target.name);
this._currentButton = SimpleButton(event.target);
}
thanks in advance
TextFormat Is Driving Me Crazy
I'm trying to format the text for my preloaders on my page, but I can't seem to get TextFormat to work. I've been searching through forums and tutorials all day but can't seem to find where I went wrong. If anyone could tell me where I'm being an idiot, it would be highly appreciated! PLEASE help. Here is the code (note there are three preloaders):
stop();
var thumb_spacingX = 57;
var thumb_spacingY = 67;
var i = 0;
var rows = 3;
var cols = 4;
var g = 0;
var portfolio_xml = new XML();
portfolio_xml.ignoreWhite = true;
portfolio_xml.load("portfolio.xml");
portfolio_xml.onLoad = function() {
_root.gd1 = portfolio_xml.firstChild.firstChild.firstChild.chi ldNodes;
_root.gd2 = portfolio_xml.firstChild.firstChild.childNodes[1].childNodes;
_root.o1 = portfolio_xml.firstChild.childNodes[1].firstChild.childNodes;
_root.o2 = portfolio_xml.firstChild.childNodes[1].childNodes[1].childNodes;
_root.images = [gd1, gd2, o1, o2];
callThumbs();
};
function callThumbs() {
var clipLoader = new MovieClipLoader();
var preloader = new Object();
clipLoader.addListener(preloader);
for (var row = 0; row < rows; row++) {
for (var col = 0; col < cols; col++) {
var currentPicture = images[g][i].attributes.thumb;
if (currentPicture == undefined) {
menu_mc.removeMovieClip(i);
}
currentThumb_mc = menu_mc.createEmptyMovieClip(i, i);
currentThumb_mc._x = col * thumb_spacingX;
currentThumb_mc._y = row * thumb_spacingY;
clipLoader.loadClip(currentPicture, currentThumb_mc);
preloader.onLoadStart = function(target) {
target.createTextField("my_txt", target.getNextHighestDepth, 15, 15, 100, 20);
};
preloader.onLoadProgress = function(target, loadedBytes, totalBytes) {
target.my_txt.text = String(Math.floor((loadedBytes/totalBytes) * 100)) +" %";
my_text.selectable = false;
var myformat = new TextFormat();
myformat.font = "Arial";
myformat.bold = true;
myformat.align = "center";
my_text.setTextFormat(myformat);
};
preloader.onLoadComplete = function(target) {
new Tween(target, "_alpha", Strong.easeOut, 0, 100, .5, true);
target.my_txt.removeTextField();
target.onRelease = function() {
callFullImage(this._name);
};
target.onRollOver = function() {
this._alpha = 50;
};
target.onRollOut = function() {
this._alpha = 100;
};
};
i++;
}
}
};
function callFullImage(myNumber) {
myURL = images[g][myNumber].attributes.image;
myType = images[g][myNumber].attributes.theType;
myClient = images[g][myNumber].attributes.theClient;
myDescription = images[g][myNumber].attributes.theDescription;
var fullClipLoader = new MovieClipLoader();
var fullPreloader = new Object();
fullClipLoader.addListener(fullPreloader);
currentFull_mc = image_mc.createEmptyMovieClip(1, 1);
fullClipLoader.loadClip(myURL, currentFull_mc);
fullPreloader.onLoadStart = function(target) {
target.createTextField("my_txt", image_mc.getNextHighestDepth, 20, 20, 200, 20);
};
fullPreloader.onLoadProgress = function(target, loadedBytes, totalBytes) {
target.my_txt.text = String(Math.floor((loadedBytes/totalBytes) * 100)) + " %";
my_text.selectable = false;
var myformat = new TextFormat();
myformat.font = "Arial";
myformat.bold = true;
myformat.size = 14;
myformat.align = "center";
my_text.setTextFormat(myformat);
};
fullPreloader.onLoadComplete = function(target) {
new Tween(target, "_alpha", Strong.easeOut, 0, 100, .5, true);
target.my_txt.removeTextField();
type_txt.text = myType;
client_txt.text = myClient;
description_txt.text = myDescription;
target.onRelease = function() {
callLargeImage(myNumber);
};
target.onRollOver = function() {
this._alpha = 80;
};
target.onRollOut = function() {
this._alpha = 100;
};
};
};
function callLargeImage(myNumber) {
myURL = images[g][myNumber].attributes.large;
lheight = images[g][myNumber].attributes.h;
lwidth = images[g][myNumber].attributes.w;
_root.createEmptyMovieClip("largeImage_mc", _root.getNextHighestDepth());
var myDropFilter = new flash.filters.DropShadowFilter(4, 45, 0x000000, 0.7, 10, 10, 2, 10);
var myFilters:Array = largeImage_mc.filters;
myFilters.push(myDropFilter);
largeImage_mc.filters = myFilters;
var largeClipLoader = new MovieClipLoader();
var largePreloader = new Object();
largePreloader.onLoadInit = function(target) {
largeImage_mc._x = Stage.width/2 - largeImage_mc._width/2;
largeImage_mc._y = Stage.height/2 - largeImage_mc._height/2;
}
largeClipLoader.addListener(largePreloader);
largePreloader.onLoadStart = function(target) {
target.createTextField("my_txt", large_mc.getNextHighestDepth, 360, 240, 200, 20);
target.onRelease = function(){
this.removeMovieClip();
}
};
largePreloader.onLoadProgress = function(target, loadedBytes, totalBytes) {
target.my_txt.text = String(Math.floor((loadedBytes/totalBytes) * 100)) + " %";
my_text.selectable = false;
var myformat = new TextFormat();
myformat.font = "Arial";
myformat.size = 24;
myformat.bold = true;
myformat.align = "center";
my_text.setTextFormat(myformat);
};
largePreloader.onLoadComplete = function(target) {
new Tween(target, "_alpha", Strong.easeOut, 0, 100, .5, true);
target.my_txt.removeTextField();
};
largeClipLoader.loadClip(myURL, largeImage_mc);
};
SetFocus Is Driving Me Crazy Please Help
Hi,
How the **** do you set the focus on a dynamicly created input field inside a dynamicly created MC????
I'm using mx2004pro btw...
ps: i can't use the Selection.setFocus("TF") here cause i don't have no 1st frame where to write that down...
Please help i'm stuck at this for days !!!!!!!!!!!!!!
Shifting Bug Driving Me Crazy
Hi all,
The bitmap pixel shifting bug in flash has kept me away from flash for years. Now I finally started using flash, with a lot of workarounds for this problem. The best thing to do is to have a 1px transparant border around the image and set the registration point to top left corner, so that it falls in a transparant area.
This is ok for images embedded into the swf. But when you load external jpg's into an MC, they still get shifted!
With flash player 7, the problem is finally gone. But I assume it's a bad thing to publish a website in 7 because nobody has it... (or am I wrong? are there statistics on this available?)
So for now I'm trying to publish in 6... I can easily move my container MC which loads the images 1px right and down, this makes the image to appear correctly. I say appear, because it's not 100% correct at all. The left and top border of the image gets 'smeared' out over two pixels. And the right and bottom row of pixels simply dissappears!
See below what I mean (screenshot of loaded image, zoomed in in photoshop to see it better)
I know I'm a perfectionist, but sometimes this really matters on smaller, detailed images because you suddenly loose a bunch of pixels.
Now all this is really really annoying, but still I can live with it.
What really drives me mad is that not only bitmaps are shifting, but simple vector drawn objects also shift!!! In fact, the whole flash movie seems to shift! This will not draw your attention at first, but if you use the workaround for the bitmap shifting, you clearly see all other non bitmap stuff on the stage shifting!
Below is an example. The red rectangle is vector based, drawn in flash. The white and grey pixels are part of a bitmap with the 1px transparant border. On the right you see how it looks like in editing mode (is how it should be), and on the left is the result in the flash player 6.
What is going on here! Why can't flash simply display everything right?
It's really the red rectangle that shifts, not the bitmap underneath it. I have it placed on integer pixel values and the size is also integer values.
The only solution for me is to publish in flash player 7, but I guess many people won't reach my site since they don't want to go and download the latest version of some software, they just wanne see the site.
I guess I will have to make a non fash site too, but then what's the use of the flash site...
Any suggestions are welcome!
Kind regards,
A frustrated flash user :-)
Flash 9.0.115.0 Bug In IE7 Driving Me Crazy...
Hi all,
I am debugging a Flash application that calls lots of JavaScript using getURL(). These calls all stopped working in IE7 when Flash 9 r115 was released, and r124 does not fix the issue as Adobe seems to think it should have: http://kb.adobe.com/selfservice/view...nalId=kb403072.
The project was developed for Flash 7 so using the ExternalInterface class is not an option. Not to mention some of the JavaScript calls are targeted to a named iframe and it doesn't look like ExternalInterface allows targeting specific frames. Targeting the iframe is a key part of the application's design and probably can't be changed. I have found that the JavaScript calls that were targeted to the main browser window work if I remove the target parameter from getURL, which was formerly "_self". These calls have always worked on FF/IE6/IE7, up until Flash 9 r115, which broke them on IE7.
I have been looking around the internet for a couple days and have not had much luck finding anyone with a similar problem. Has anyone had this issue or have any suggestions? I'm desperate and close to telling the client that some of the app's functionality will not be possible with IE7.
Sounds Are Driving Me Crazy
Ok so I have a project that consists of a bunch of objects onscreen...the user selects an object and a page that describes the object appears. These descriptions come with voice over files that need to be played when each item is selected. I have one set of audio controls that remains static. (play, pause, mute, volume up, and volume down)
I want to use the same controls for each sound file that is playing. The controls work fine for one sound file but when I try to use multiple I come to a roadblock.
I cannot reuse my "Snd:Sound = new Sound" variable for other mp3's (at least I can't figure out how) which means my control buttons.
I will give my first child to the person who can explain a way to apply the same control functions to a bunch of different mp3's. I imagine it has something to do with arrays but I am too noobish with OOP to figure it out.
Code:
var Sc:SoundChannel = new SoundChannel();
var Vol:SoundTransform = new SoundTransform();
var VolInt:Number = 1;
var Snd:Sound = new Sound;
var soundMute:SoundMute = new SoundMute();
var playBtn:PlayBtn = new PlayBtn();
var pauseBtn:PauseBtn = new PauseBtn();
var volUp:VolUp = new VolUp();
var volDown:VolDown = new VolDown();
var IsPlaying:Boolean=true;
var SndPos:Number=0;
addChild(playBtn);
playBtn.x = 389.4;
playBtn.y = 580.1;
playBtn.width = 45.9;
playBtn.height = 45.9;
playBtn.buttonMode = true;
playBtn.addEventListener(MouseEvent.CLICK, playSnd);
function playSnd(events:Event):void {
if (!IsPlaying) {
Sc=Snd.play(SndPos);
IsPlaying=true;
}
}
addChild(pauseBtn);
pauseBtn.x = 438.1;
pauseBtn.y = 581.0;
pauseBtn.width = 40.3;
pauseBtn.height = 40.3;
pauseBtn.buttonMode = true;
pauseBtn.addEventListener(MouseEvent.CLICK, pauseSnd);
function pauseSnd(e:Event):void {
if (IsPlaying) {
SndPos=Sc.position;
Sc.stop();
IsPlaying=false;
}
}
addChild(soundMute);
soundMute.x = 322.1;
soundMute.y = 574.6;
soundMute.height = 38.5;
soundMute.width = 39.4;
soundMute.buttonMode = true;
soundMute.addEventListener(MouseEvent.CLICK, MuteSound);
function MuteSound(e:MouseEvent):void {
if (VolInt == 0) {
soundMute.gotoAndStop(1);
Vol.volume = 1;
Sc.soundTransform = Vol;
VolInt = 1;
} else {
soundMute.gotoAndStop(2);
Vol.volume = 0;
Sc.soundTransform = Vol;
VolInt = 0;
}
}
addChild(volUp);
volUp.x = 309.4;
volUp.y = 607.8;
volUp.width = 24.9;
volUp.height = 24.9;
volUp.buttonMode = true;
volUp.addEventListener(MouseEvent.CLICK, VolumeUp);
function VolumeUp(e:MouseEvent):void {
if (VolInt >= 1) {
} else {
Vol.volume += .2;
Sc.soundTransform = Vol;
VolInt += .2;
}
}
addChild(volDown);
volDown.x = 336.4;
volDown.y = 608.0;
volDown.width = 27.4;
volDown.height = 24.9;
volDown.buttonMode = true;
volDown.addEventListener(MouseEvent.CLICK, VolumeDown);
function VolumeDown(e:MouseEvent):void {
if (VolInt <= 0) {
} else {
VolInt -= .2;
Vol.volume -=.2;
Sc.soundTransform = Vol;
}
}
Changing Text (this Is Driving Me Crazy...)
Hello! I have a symbol (a button) in a lib called "Menuitem", which contains a dynamic textfield. The variable of the textfield is called "itemtext". I have an empty stage and want to create2 instances of "Menuitem":
So this is done in the first frame:
_root.attachMovie("Menuitem", "newitem1", 1);
_root.newitem1._x = 100;
_root.itemtext = "Item1";
_root.attachMovie("Menuitem", "newitem2", 2);
_root.newitem2._x = 200;
_root.itemtext = "Item2";
1st problem: the variable _root.itemtext becomes ambiguis. How can I set different textes to the different items?
2nd problem: I want to save this in Flash 5 (using MX). The example works in MX, but exported as Flash 5, I can see only one Menuitem! Argh.
Please help!
|