Stuck On Tell Target
i've just read the tell target tutorial and it seems fairly simple. But i'm trying to get it to work in flash mx, is there any way to do it? I've found the tell target button in flash mx but the action script it produces seems different from the one that appears on flash 5. Is that suppose to happen? thx for your help
KirupaForum > Flash > Flash 8 (and earlier) > Flash MX
Posted on: 11-17-2002, 06:06 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Drag And Drop Target Stuck To Mouse - Help- See Swf.
Hi, i´ve been going through some tutorials and samples of "drag and drop" flash movies and I always come apon the same bug. The drop target gets "stuck" to the mouse, and when I click the target it just drops down and doesn´t return to its orig. position. This mostly happens when the target in the "lower order" is droped behind a target that is "in front of it" Now I have used the
Code:
this.swapDepths(_root.getNextHighestDepth());
to fix the "order" problem but still the problem some times happens. - You can see the problem in the fla/swf if you drag on of the "lower order targets" under the "front targets".
Does any one know if there is a way to fix this...?
Drag And Drop Target Stuck To Mouse - Help- See Swf.
Hi, i´ve been going through some tutorials and samples of "drag and drop" flash movies and I always come apon the same bug. The drop target gets "stuck" to the mouse, and when I click the target it just drops down and doesn´t return to its orig. position. This mostly happens when the target in the "lower order" is droped behind a target that is "in front of it" Now I have used the
Code:
this.swapDepths(_root.getNextHighestDepth());
to fix the "order" problem but still the problem some times happens. - You can see the problem in the fla/swf if you drag on of the "lower order targets" under the "front targets".
Does any one know if there is a way to fix this...?
Load Jpegs In MC Stuck Stuck Stuck
ok i'm sure this is in another thread if someone wants to point me in the right direction i'd appreciate it.
question is.
i have a button that will load a jpeg into a mc. did that.
how do i get the jpeg to center and resize to my mc? mc is 300 x 480......
the site is for an art porfolio and this button/action will be repeated throughout the site
new to FLASH MX & actionscripting and it's driving me over the edge..................
[EDIT/CyanBlue]
Moved to the Flash MX ActionScript forum
Please state what your working environment is and
please post in the right forum
[/EDIT]
I'm Stuck, Probably Simple...but Stuck
alright i'm making an entire site in flash.
i have my main timeline that i have label on, that i'm trying to get my button to go to.
here's the deal:
main timeline -> movielcip -> movieclip (button inside this clip)
on the button inside this movieclip i have all my actionscripting (rollover, rollover and on release)
now on release i have: gotoAndPlay("_level0", "news");
news is my frame label on my main timeline, also frame 101.
but when i click on this button it does nothing, just sits there. hmmm.....
thanks.
Newbie Movement Question - Move Number Of Pixels NOT To Target Or Even PRECISE TARGET
Like a lot of people im using the code below to move a movie clip my question is this - how do i move the clip exactly a set number of pixels from its current position (lets say 20 pixels) rather than setting a target?
(what im using now)
onClipEvent (enterFrame) {
if (_root.go==1 && root._x<300) {
_x = _x+2;
}
}
ive tried lots of things but there must be a simply answer - someone please help.. thanks.
My second question is how do i move something to a specific x target ie not use <300 or such like - ive tried != and stuff like that but to no avail..
1st question more important right now though - thanks!
Apply Glow Filter On Target MC While Dragging An Object And Rolling Over The Target
I can get my filter to apply to a movie clip if i simply rollover or roll out of it. When the mouse rolls out, the filter is set to undefined. The problem I am having is that I want the object that is in effect the hit area to glow (have a filter applied) when the draggable object is being dragged over it.
This would make is easier for the user to visually identify that where they are currently hovering over, whilst dragging, is the area that they should drop the object.
Part of my code looks like this
Code:
this.onRollOver = function () {
if(_global.isDragging == 1){
this.filters = glowFilterArray;
}
}
this.onRollOut = function () {
_global.isDragging = 0;
this.filters = undefined;
}
_global.isDragging is set to 1 at the onPress stage, when startDrag occurs.
_global.isDraggin is set to 0 onRelease of the draggable object.
Are there any ideas for a solution?
Action On Button, Tell Target, Error=target Not Found
Hello, beings of helpfulness!
I am working at a non-profit and trying to make a website from a Flash template with minimal, but some Flash experience. The template has multiple timelines (main page, content pages, and buttons). This part I am still learning. On the home page, I have an image (mc) that loads, with an instance name of "girls." Menu buttons take the viewer to corresponding content pages, which is when I want the image on the main page to dissapear to make room for the content. When the viewer selects the home page again, I want the image to appear again. At first I put in the following action (except for the home page), alpha=0. It worked! And now it doesn't! I did play with the button timelines some. I tried taking the actionscript out and putting it in again, to no avail.
The action in my button is
on (release) {
tellTarget ("_root.girls") {
_alpha=0;
gotoAndPlay(11);
}
}
And the error I now get is: Target not found: Target="_root.girls" Base="_level0.instance58.instance543"
Any ideas? I'm quite stuck. Thanks so much for any help, or suggestions to do this another way.
I've attached the swf, but the compressed fla was too big. I can email it to anyone willing to fix what is probably very simple, except to the newbie with little but increasing experience!
I'm using Flash MX.
LoadMovie In A Target Without Inherit Of Target Properties?
hi,
I load a SWF-FILE in a target MovieClip with loadMovie(). After that I want to read the _width and _height of loaded MovieClip (from the SWF-FILE), but I only get the properties of the target MovieClip.
loadMovie ("test.swf", "dummySwf");
trace("height:"+dummySwf._height+"width:"+dummySwf ._width);
//put out the properties from target, not from new clip :-((
any idea?
thanks
Target A Specific Frame In And Instance Using Tell Target
is it possible to target a specific frame in and instance using tell target? I can get the effect i want by using goto frame, however i want to use this mc or .swf in a movie, and i don't want goto frame to affect the whole movie, just the mc.
Target JS Button To Target Frame Swf At Different Html...how?
this is my 2nd post regarding this problem, i'm seeking for many input nad perhaps the example soource file/code...
kind like a loading specific frame of swf from a html hiperlink?!? can it be done?
- say we have a 3 frame swf, located at index1.html
- then i have a button(gif/jpeg htmlpage not flash), located at index2.html
- what i wanna do is when i click the button(JS) on index2.html, it will open the index1.html then start play the swf at frame 2 NOT 1(beginning)
how can we do that?
Target Not Found: Target="_root.info1"
Okay my problem arises when I load an external swf to a target on my main movie. now the the external swf works great on its own, it has a few MC's which are called via a simple button script - on release -> tell target -> go to and play .... the target is "_root.info1" . However When the file is loaded into my main movie I get the error message ' Target not found: Target="_root.info1" ' obviously it is trying to find the target in the main movie and not in the external swf. Well I just dont know how to fix it, any ideas ?
Thanks
Easy Q: Target Not Found: Target="downtrigger"
I have an MC thats called 'slider' that will slide around the main stage. When different buttons are pressed it will slide in to place and each place will have a dynamic text field that will scroll the appropriate text. When I test the movie the text is viewable but when I click the scroll arrows I get the following error:
Target not found: Target="downtrigger" Base="_level0.slider"
What I would like to know is where I place the
'_level0.slider' on my tell target script, which is as follows:
on (press) {
tellTarget ("downtrigger") {
gotoAndPlay(2);
}
}
on (release, releaseOutside) {
tellTarget ("downtrigger") {
gotoAndStop(1);
}
}
If anyone is interested in looking at the .fla let me know and I can email it. Much appreciated, by the way I have around 2 weeks to get this project finished!
If Target Is Between 1 And X Begion Tell Target... HELP
I have some actionscript in a button that works successfully when a MC has reached a certain frame but doesn't take into account if the MC is already playing, so I want it to say, in actionscript language:
If (/overview:_currentframe is between 1 and 50)
Begin Tell Target.... etc.
How is this done?
Target Not Found: Target="undefined" Base="_level0.hero"
For some reason whenever my hero mc jumps i get this
Target not found: Target="undefined" Base="_level0.hero"
the code for the jump is:
code:
onClipEvent (load) {
vel_y = 0;
jumping = true;
speed = 5;
}
onClipEvent (enterFrame) {
if (Key.isDown(Key.SPACE) && !jumping) {
vel_y = 35;
jumping = true;
}
}
onClipEvent (enterFrame) {
fall = true;
if (this.hitTest(_root.floor)) {
fall = false;
vel_y = 0;
grav = 0;
}
if (fall) {
grav += vel;
vel += 1;
if (grav>=10) {
grav = 10;
}
this._y += grav;
}
}
onClipEvent (enterFrame) {
if (jumping == true)
this.gotoAndStop(2);
}
onClipEvent (enterFrame) {
if (fall == true && vel_y<=5)
this.gotoAndStop(3);
}
onClipEvent (enterFrame) {
if (fall == false)
this.gotoAndStop(1);
}
Any idea how i can clean this up or help w/ the target identifier?
thnx in advance
How Do I Rid Of This Error: Target Not Found: Target="OverworldTheme" Base="_level0"
I was making a main menu and I had looping music on it. I tried to make the music stop after I click the play button so I used the following code:
PHP Code:
on (release) {
tellTarget ("OverworldTheme") {
stopAllSounds();
}
}
on (release) {
gotoAndPlay(2);
}
And while I play the video and press the button, the following error comes up:
Target not found: Target="OverworldTheme" Base="_level0"
Any advice on how I could fix this?
Um......................stuck
Hello
i am very new to flash and i have just heared about Actionscripting. goodness gracious me! staright over my head!
i was just playing around and seeing what i could do, so i tried to insert a date/time using a dynamic text box.
i know that i have to set the text box with the variable 'now_display'. i also know that i have to add:
onClipEvent (enterFrame) {
now = new Date()
now_display = now.toString()
}
to an instance of the movie. but i don't understand how. i right mouse click on the text box to select 'Action' but i can't have an 'onClipEvent' unless the text box has been converted to a movie clip, but when i do that, the option to add the variable 'now_display' disappears.
Also, i don't know how to add: now = new Date()
now_display = now.toString()
}
what do i select to add it? i can't find an action where i can add that text without little extra symbol (e.g. ; or /* etc)
please help!!!
adam
Help I'm Stuck
can somebody check out this site http://www.lane.com/index2.asp
once the site has loaded you will see a vertical scrolling picture bar, scrolls vertically according to mouse location.
Can someone tell me where i can find an in depth tutorial on this effect.
Many thanks
Phil
I'm Stuck You Try......
Okay my clients site http://www.cityclublife.com has a form to fill out so people fill it out and hit submit. a html page then pops up and tells the visitor that their info has been sent only it dosn't send it to my clients e-mail address.
I've done this many times for many clients but can't seem to get this one to work.
HELP PLEASE
HELP I'm Stuck
I have a menu with 3 links to other external flash files, each containing 3 different sections/frame labels.
this is the layout:
I have an index.html (with embedded index.swf) and portfolio.html (with embedded portfolio.swf)
I want the menu in the index.swf - which consists of three links (2d |3d |flash) to correspond to the 3 different sections/labels inside the portfolio.swf (2d, 3d, and flash)
how can I make this work with actionscript? PLEASE HELP!
PS: I don't need the loadmovie script, only what I described above. thanks a million.
[Edited by samige on 08-27-2001 at 04:31 AM]
STUCK...............................please Help
Hi,
Can anyone help with this...?
If I have a button located within in a movie clip, is there a way i can add a goto action whose target frame is in the MAIN TIMELINE rather than in the movie clip's timeline?
also, is there any way of adding a line of actionscript to a number of different buttons at once without having to go thru and type it out over and over?
many thanks in advance,
J
Im Stuck... Need Some Help Here...
ok
i got 2 .wav's i want to play in sequence.
i put each .wav within a movieclip
i play the first movieclip wit no prob but the second one just wont play.
it seems that within first movieclip every action i add or every sound i place AFTER frame 3 just wont work.
so what i need help wit is:
how do i make the second movieclip play right after the first movieclip has stopped?
(im hoping someone that knows actionscript or somethin would help me wit this)
thx
I'm Stuck
hy everyone,
i am making a web site and i need a hand.
i have a very width picture and i want to use the mouse to make the pictures moves left or rigth depends where the mouse goes.
* the picture is inside a strip.
thank you.
I'am Still Stuck
someone can suggest how can i make this:
how can i move the picture like this
http://www.center-of-the-world.com
the picture is in the wellcome page.
100000 thank u if someone can help me
Help I Am Stuck
I magine if you please;
I have a main stage that has 6 buttons on it , these link to a window mc that has win "max" and win "min"which obviously change the state of the window.My problem is one particular window opens external swf files within it.I am using an instance of my window mc called gallery which works fine. When the window loads it has
win="blank";
oldWin="blank";
startLoad="false";
movie="showreel1.swf";
stop();
This sets the varibles and loads up the swf and showreel 1 works.What i need to know is what action would i have to put on the button to load up a different swf?
i tried this
on (press) {
(content.gotoAndStop("hide"));
}
on (release) {
gotoAndPlay (1);
win = "blank";
oldWin = "blank";
startLoad = false;
movie = "showreel2.swf";
stop ();
}
the on press works but the rest will not i thought it would be a case of ressetting the variables at the beginning of the gallerymc but things are getting to heavy for the brain and therefore i am stuck!!
please help
Help I Am Stuck
I magine if you please;
I have a main stage that has 6 buttons on it , these link to a window mc that has win "max" and win "min"which obviously change the state of the window.My problem is one particular window opens external swf files within it.I am using an instance of my window mc called gallery which works fine. When the window loads it has
win="blank";
oldWin="blank";
startLoad="false";
movie="showreel1.swf";
stop();
This sets the varibles and loads up the swf and showreel 1 works.What i need to know is what action would i have to put on the button to load up a different swf?
i tried this
on (press) {
(content.gotoAndStop("hide"));
}
on (release) {
gotoAndPlay (1);
win = "blank";
oldWin = "blank";
startLoad = false;
movie = "showreel2.swf";
stop ();
}
the on press works but the rest will not i thought it would be a case of ressetting the variables at the beginning of the gallerymc but things are getting to heavy for the brain and therefore i am stuck!!
please help
Stuck
i'm making a new site.. how do u do the dragging into one spot then somthing will load. Like this http://www.theory7.com/splash1024.html
with the floopys
[Edited by RedAbode on 05-16-2002 at 06:46 PM]
Any One How To Do This I'M STUCK
Hello!!
I have a flash presentation (projector) that is to be used by travelling sales people.
They need to be able to launch the presentaion on their laptop before the meet their customer and fill in their name. then when they start the presentation, at certain points the customers name will be displayed.
Is this possible? Any one know what the actionscript would be?
I presume it will be using dynamic text although i'm not sure!
any help would be great!!!!
Thanx in advance :O)
Please Help I'M STUCK
Hello!!
I have a flash presentation (projector) that is to be used by travelling sales people.
They need to be able to launch the presentaion on their laptop before the meet their customer and fill in their name. then when they start the presentation, at certain points the customers name will be displayed.
Is this possible? Any one know what the actionscript would be?
I presume it will be using dynamic text although i'm not sure!
any help would be great!!!!
Thanx in advance :O)
Help I'm Stuck
I have a button that is nested in a movie clip which is set on the main stage, this button is supposed to load another movie clip on to the main satage as well, but I can't get it to work, I have tried attachmovie, loadmovie, emptymovieclip, and nothing seems to work.
Help me please...
Something I Always Get Stuck On....
I keep running into this same problem and I always think I know the answer, but it turns out I don't. And I know it's something simple I'm missing.
Basically I want to know how to tell Flash to check if two are things are true before it's allowed to move on.
I thought I could do this by putting two if statements within each other, like:
if (something here is true) {
if (this is true too) {
gotoandPlay(whatever)
}
}
But apparently that doesn't do it. What am I missing?
Please Help Me(I'm Stuck)
No need to tell you what I tried doing because I know it's not working. Here is what I want to do:
I have an image that I turned into a button on "scene1". I want this button to link to "scene2" on release.
How do I get that done?
Thanks very much for your help.
Please Help Me (I'm Stuck)
Thank you very much for you help.
Here is the problem,I have a scene that has several animated symbols and the scene is looped. HOW DO I STOP A SYMBOL FROM LOOPING WHILETHE OTHERS ARE LOOPING? I want every other symbol to loop apart from this one.
You Help Is Very Much Appreciated.
Cornelius
I Am Stuck
Hi alllll
i don't know how to resolve this. i don't write script coz i don't know how. if u tell me the easy and fast way to learn it, i would be thankful!
---------------------------------------------------------
I have this script i would like to add links to it,
they are four buttons, but i can't add that script link the buttons with the url ..how can i do that?
Michelle
here is the script:
fscommand("allowscale",false);
fscommand("trapallkeys",true);
// dichiariamo i valori di acc e smorzamento dei movieclip(s) che
// comporranno il nostro menu
MovieClip.prototype.acc = 3.9
MovieClip.prototype.smorz = 1.22
// ACTION FOR THE BUTTON
MovieClip.prototype.DoSomething = function(theClip){
trace("nome: " + theClip._name)
trace("valore: " + theClip.mov.txt)
// here you can add your script for the button action...
}
// label sui bottoni
nomi = new Array("E-Cards","Media","Fan Club","NEWS");
loghi = new Array("cubo","triangolo","ottagono","sfera");
max = 3
// creo il menu
for(i=1;i<=max;i++){
duplicateMovieClip("_root.menu0","menu"+i,i)
myMenu = _root["menu"+i]
myMenu.mov.txt = nomi[i]
myMenu.attachMovie(loghi[i],"logo" + i,(5000+i))
myLogo = eval("_root.menu" + i + ".logo" + i)
myLogo._x = -76
newColor = new getColor(myMenu);
}
_root.menu0.attachMovie("cubo","cubo",(7000+1))
_root.menu0.cubo._x = -76
// coloro i menu in modo differente
function getColor(what){
inizio += (255/nomi.length)/3
colore = new Color(eval(what))
alex = new Object();
alex = colore.getTransform();
alex.rb += inizio
alex.gb += inizio
alex.bb += inizio
colore.setTransform(alex)
}
Please Help Me (I'm Stuck)
How do I make a graphic or an movie clip play only once within the scene while the rest of the animation is looping?
I tried putting a [stop] action in the layer containing the clip but the entire scene stops and fail to loop.
Also I put a [stop] action within the movie clip object but this had no effect. I scene was still looping with everything in it.
When I save the object as an image, it doesn't allow action scripting within that oject, only in the layer.
Please Help Me!
Thank You Very Much!!
Cornelius
Really Stuck
I am trying to put in the code for a gearshift effect where ppl can navigate the site by changing into diff gears in which ever order., by dragging the gearshift . themselves. i tried all kinds of code from examples ive seen but nothing works..
http://users.bigpond.com/cmeany/LAMBOFLASH3.fla
is where my thing is at right now and it's been like that for a week ((((
Need help please.
Please, Please Help Me, Im Stuck
Well I have this fan page I have been working on, saddly I am stuck on the Lyrics page. I want the flash page to have the titles of the songs on one side, and in the other side when you click on the song name for the song lyrics to appear there. Please help me out as I am on the last stages of desperation. Yes I am a newby.
Thank you for anyone that reads this, or helps me out.
I'm Stuck
I am using Flash MX.
----------------------
I created an input text field in the middle of the stage.
...and this is where i need help.
How would a user type something in (their name), and when they pressed enter, their name would appear in the next frame??
In a nutshell, i would like to know how to go to the next frame when the enter key is pressed, and how to get their name shown.
whew! any help is appreciated.
I Am Seriously Stuck
Please Help. Below is my code. As is it will search the arrays (which are much larger) and return the first item that matches exactly the input (name). I am trying to get this to search to search even if the input is only a couple letters and return all results.
i can answer any other questions: chosenson@excite.com
**************code******************code********** *******code******************
Scene 1
actions for frame 1
muni = ["AGAWAM","ALFRED","AMESBURY","ARLINGTON","ATTLEBOR O","AUBURN SEWER DISTRICT",
"AUGUSTA WATER DISTRICT","AVON","BANGOR","BAR HARBOR"];
state = [ "MA ","ME ","MA ","MA ","MA ","ME ","ME ","CT ","ME ","ME"];
locate = ["HANGING FILE ",
"HANGING FILE ","HANGING FILE ","HANGING FILE ","HANGING FILE ",
"HANGING FILE ","HANGING FILE ","HANGING FILE ","RED ROPE ",
"HANGING FILE "];
actions for frame 1
stop();
actions for buton
on (release) {
i = 0;
while (name != muni && i != muni.length){
if(name == muni ){
}
i++;
}
_root.createTextField("file_loc",100,330,130,300,3 00);
file_loc.multiline = true;
file_loc.wordWrap = true;
file_loc.border = false;
myformat = new TextFormat();
myformat.color = 0x010283;
myformat.bullet = false;
myformat.size = 18;
if(muni == null){
file_loc.text = "The file *"+ name+"* appears to not be located on the premises. Please check your spelling to try again. Thank You."
}
else{
file_loc.text = "You have searched for "+ muni +", "+state +". It is a "+locate +".";
}
file_loc.setTextFormat(myformat);
}
**************code******************code********** *******co
I Am Stuck
I need help on this one people. I have a swf that is showing several buttons as it moves through the timeline. After so many frames, I have a loadmovie script in a frame. (This is giving the end user the ability to click on a button if they like, or wait and go into (The overview) another swf.) My problem is when I click on a button to goto a different swf...It will kick off the overview section. how can I stop the timeline from continuing in my first movie? I did try the unload movie script but no luck. Thanks!
Please Help I Am Really Stuck On This Just Need A Bit More Help
I started a thread earlier couldnt find it but I am really trying to get this script to work have learnt a lot of actionscript but I cant get it working.
I am adapting a tutorial on this site for circles collisions which was written in flash 4 and I am using mx also I am wanting to import it into another movieclip so that I can get it bouncing off the mc walls.
The tutorial is
http://www.flashkit.com/tutorials/Ac...u-74/index.php
I am not expecting for someone just to give the answer I am working to learn this stuff so I can pass on the help in the future.
I have changed the paths to dot notation and changed some of the code which is fla 4 to newer code = Mathramdom.
There is a bit of code here and a help of a lot of explanation which I have written but please spare some of your brain power 4 me!!
// ----------------------------------------------
// start move
// ----------------------------------------------
my_radius = (getProperty("", _width)/2);
// 'n' is always 'name' of circle.
my_x = getProperty("", _x);
my_y = getProperty("", _y);
my_n = getProperty("", _name);
if (Number(ymov) == Number("")) {
// *********************************
// ----------------------------------------------
// first run through code,
// this will initialize circle
// ----------------------------------------------
// *********************************
// pick a distance:
ymov = Number(Math.random(_level0.content.speed))+1;
xmov = Number(Math.random(_level0.content.speed))+1;
//
// pick a direction:
ysign = (Math.random()*2)-1;
if (Number(ysign) == 0) {
ysign = 1;
}
xsign = (Math.random()*2)-1;
if (Number(xsign) == 0) {
xsign = 1;
}
// adjust x and y movement
xmov = xmov*xsign;
ymov = ymov*ysign;
// ----------------------------------------------
}
// *********************************
// ----------------------------------------------
// check edges
// ----------------------------------------------
if (Number(my_x)<=Number(Number(my_radius)+Number(_le vel0.content.speed))) {
xmov = xmov*-1;
my_x = Number(my_radius)+Number(_level0.content.speed);
}
if (Number(my_y)<=Number(Number(my_radius)+Number(_le vel0.content.speed))) {
ymov = ymov*-1;
my_y = Number(my_radius)+Number(_level0.content.speed);
}
if (Number(my_x)>=Number(_level0.content.movie_width-my_radius-_level0.content.speed)) {
xmov = xmov*-1;
my_x = _level0.movie_width-my_radius-_level0.content.speed;
}
if (Number(my_y)>=Number(_level0.content.movie_height -my_radius-_level0.content.speed)) {
ymov = ymov*-1;
my_y = _level0.content.movie_height-my_radius-_level0.content.speed;
}
// ----------------------------------------------
// check for collision
// ----------------------------------------------
n = 1;
// start checking for collisions
while (Number(n)<=Number(_level0.content.total_circles)) {
// don't check myself
if (n ne my_n) {
n_x = getProperty(",," add n,_x);
n_y = getProperty("../" add n,_y);
n_radius = (getProperty ("../" add n, _width) / 2);
delta_x = (Number(my_x)+Number(xmov))-(n_x);
delta_y = (Number(my_y)+Number(ymov))-(n_y);
if (Number((Number(delta_x*delta_x)+Number(delta_y*de lta_y)))<Number(((Number(my_radius)+Number(n_radiu s))*(Number(my_radius)+Number(n_radius))))) {
// ----------------------------------------------
// handle collisions
// ----------------------------------------------
// I collided with circle 'n'.
nx = eval("_parent" add n add ":xmov");
ny = eval("_parent" add n add ":ymov");
// swap travel values with it.
tempx = xmov;
xmov = nx;
set("_parent" add n add ":xmov", tempx);
tempy = ymov;
ymov = ny;
set("_parent" add n add ":ymov", tempy);
set("_parent" add n add ":collision", my_n);
} else {
}
}
n = Number(n)+1;
}
// ----------------------------------------------
// move me
// ----------------------------------------------
setProperty("", _x, Number(my_x)+Number(xmov));
setProperty("", _y, Number(my_y)+Number(ymov));
// ----------------------------------------------
What possible things could I be doing wrong in this code?
As I have said before please give me a hand I will be very greatful for any help given
thanx
stef
Stuck In The Mud, Help
Say I have 3 symbols, each containing text.
1: profile
2: skills
3: contact
Each of the above symbols are placed on seperate frames, 1 to 3.
Placed above and spanning all three frames is a movieclip called 'transition'. This movieclip is 20 frames long.
What I'm trying to do is, when someone clicks on, lets say the skills button the 'transition' movieclip is activated. On the 10th frame I want it to say "_rootgotoAndStop(2);"
So I'm guessing that I have to pass a variable from the button on the _root timeline, to inside the 'transition' movieclip.
How is this done?
Help I'm Stuck
Hi everyone,
i am developing a flash game in Flash MX. The game uses 10 classes of objects, 2033 lines of code. Up until now I was able to work normally, but since today morning every change I have made in the script causes Flash to crash (even slight changes like changing "+" into "-" somewhere in the script).
Did anybody happen to encounter a problem like this one before?
Here I Got Stuck,,plz Help
i was trying to get a mp3 file from database for some time now i tried this but couldnt figure out whats wrong in this
code:
_________________________________________________
onClipEvent (load) {
var mySound = new Sound(this);
mySound.loadSound ("http://dotworld/grief/temp/flash/getsound.php", false);
//loadVariables("http://dotworld/grief/temp/flash/getsound.php", this);
}
onClipEvent (data) {
trace(mp3file);
mySound.start();
}
___________________________________________
i am able to see the output when loadvarables is active bt sounds not playing ,,could anyone complete this
thanx
Help... I'm Stuck
I'm learning flash as i go, to be able to build a site for my resume in flash... *hopefully that would impress employers*
Anyways, my problem is being stuck on making the buttons work! I don't seem to be able to find a good tutorial where it shows how to setup the button to change the display "text" area when released. Should I use separate SWFs, or is it something that i have to do on the main timeline? either way, I have no clue how to approch this problem, nor how to implement the solution.
here is the site: http://www.mikeaqel.com/
All comments are welcomed.
Still Stuck
Okay, now I'll explain in detail about what I'm trying to say so you can understand what I'm saying, (not that the previous help didn't help, thank you to those people that have already helped me out).
So, I'm trying to make it so when I use the hitTest command it moves the background image in a 'y' direction, so that it scrolls. What I mean is that when you hit the MC it background moves up or down, (also with the MC that hit the hitTest MC). But when it hits the 'y' line or 577 it stops scrolling and you continue moving with the base MC (car). Also when you want to move it back I need help with how to make a MC that isn't there before you use the first hitTest to move it up, but when you want to go back down it is there to move the background image up. So you can contiously move the background image up and down infinite times, while also moving the car MC with the background.
My current code is below:
Car:
Code:
onClipEvent (load) {
_root.car.laser._visible=false;
laserCounter=1;
}
onClipEvent (enterFrame) {
_root.speed = speed;
if (Key.isDown(Key.UP)) {
speed += 1;
}
if (Key.isDown(Key.DOWN)) {
speed -= 1;
}
if (Math.abs(speed)>20) {
speed *= .7;
}
if (Key.isDown(Key.LEFT)) {
_rotation -= 15;
}
if (Key.isDown(Key.RIGHT)) {
_rotation += 15;
}
speed *= .75;
x = Math.sin(_rotation*(Math.PI/180))*speed;
y = Math.cos(_rotation*(Math.PI/180))*speed*-1;
if (!_root.boundary.hitTest(_x+x, _y+y, true)) {
_x += x;
_y += y;
} else {
speed *= -.6;
}
if (Key.isDown(Key.SPACE)) {
laserCounter++;
_root.car.laser.duplicateMovieClip( "laser"+laserCounter, laserCounter );
_root["laser"+laserCounter]._visible=true;
}
}
mainGround:
Code:
onClipEvent (load) {
scrollStart=false;
groundStarty = this._y;
}
onClipEvent (enterFrame) {
if (_root.area1a.scrollStart==true){
this._y+=10;
_root.car._y+=10;
}
if (_root.car._y >= 575.0){
scrollStart=false;
}
}
area1a:
Code:
onClipEvent(enterFrame) {
if (_root.car.hitTest(_x+x, _y+y, true)) {
scrollStart=false;
}
}
I have also attached the .fla (zipped) file with this post, if you would like to see what I mean if you don't understand this post.
Also, if you would like to help me even more, you dont have to but, could you help me fix up the laser hitting boundary MC and stopping it from going any futher and also the frame rate on it is differnt from the rest of the flash, (not included to decrease file size).
Stuck On If - Else
If - Else help ???
I have a quiz where the user can choose more than one answer for six questions.
If they get the choice correct...a blinking "correct" mc appears over the correct answer(s). I have this working fine...
If they choose wrong however, a "wrong" mc appears over the selected wrong answer box, and if they fail to click a correct answer, a blinking "checkmark" mc appears over that box...
a lot of coding I know but it has to be done this way...
can someone help with the rest of this scripting...???
thnx...
I'm Really Stuck, Can I Get Some Help?
i need some help with my preloader... heres a link to the zip file that has the fla and xml file need to run.
http://www.lucidnight.com/Menuop.zip
here's alink to my other post that has a little more info.
http://www.flashkit.com/board/showth...hreadid=471088
if anyone can look at the file and see what i did wrong that would be great. thanx
A Little Bit Stuck
I am trying to figure out how to make my preloader work, I have never made one before but have looked at a few tutorials and think I get the swing of it. But I just wanna check to see if this will work.
In my movie there are two scene's 1)Preloader 2)Main. In the preloader scene I have made an 8 frame animation that I want to be my preloader. I want my preloader to work by checking two variables (bytes & bytes_loaded) against each other so that when the movie is loaded it plays the second scene. The code I think will work is as follows
SCENE1 FRAME1
var bytes = _root.getBytesTotal();
var bytes_loaded = _root.getBytesLoaded();
if (bytes_loaded == bytes) {
_root.gotoAndPlay("Main");
} else {
_root.gotoAndPlay("Preloader");
}
Is this script correct? I can't test it right now because im am not at home otherwise I would be asking why it doesn't work (if it doesn't of course)
Cheers
|