Am I Flushing At The Correct Place?
Hello,
I have searched the boards and haven't found the exact help I need, so I'm hoping this group can help.
I have an input text field that a user will put information into that needs to be called later on in another swf that they will eventually navigate to. I'm apending the input info to the end of a url. I'm using shared objects to accomplish this. Unfortunately it doesn't pass the SO the first time I run this. But, the second time I run the movie it works perfectly. Could this be a problem with flushing? Is there a certain time you should flush? I've tried putting in the normal code, and I've also tried attaching it to a button and neithr will get the movie to work on the first time. I'm using MX04 if that makes a difference.
Thanks, Starley
FlashKit > Flash Help > Flash ActionScript
Posted on: 02-23-2004, 04:08 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Keeping Movie Clips In Their Correct Place
I’m trying to create a flash activity for dyslexic students. I have two boxes (movie clips ) on the stage. At the top of the stage I have 12 words converted into buttons and then to movie clips. I know how to drag the words around the screen but my difficulty is trying to get the correct words into their respective boxesand staying there. I would like the incorrect words to return to their original position. Help would be much appreciated as I’m trying to do this for a college assignment.
Flushing Variables, Please Help. Thank You.
In a movie I call a variable, TextOne, from a text file. I have an input text field that allows you to change TextOne. Using ASP, the changed information changes the text file where the Variable is stored. On Mac, when I recall the variable, it changes the text. On a PC, TextOne is changed in the text file (the ASP works fine), but the variable doesn't change in the Flash movie. I know why, because it's stored in the cache of the browser. So on a PC you iether have to empty the cache or restart the browser for it to work.
Would you know of a way to flush the browsers memory using FSCommand and javascript, or is there another way I can recall the variable so it successfully changes.
For info: When you press on the Change button, I have 3 frames that loop until the ASP sends a variable that says the change has been successful, in that case I have a loadVariables frame, then it goes back to the original frame to show the changes.
Once again on Mac this works fine. On IE 6 in win 2000, it doesn't. It doesn't work on IE 5.5 iether.
Thanks for any help.
TD
Flushing A MovieClip
Quick flash question.
I'm usin the normal tell target script to control a movie clips behaviour on the main timeline. The action is contained in a button within a movieclip.
That's easy - problem is I want to flush the previous movieclip from the main timeline. You can see this in the swf. The infobox for 1948 will load but the previous infobox for 1946 is still there. And this will continue to happen with all further movieclips unless I can implement a function to flush all other movieclips except for the one I've just called from its relevant button.
removeMovieclip doesn't seem to work or maybe I'm usin the wrong parameters - any ideas?
http://www.punchbear.com/content_area.fla
http://www.punchbear.com/content_area.swf
Reloading/flushing Variables
Hello,
I am wondering how one would flush variables in a movie. I have a scene where I import data, set them into variables and then display them in dynamic text. I then have a button that changes it to a different set of import data. So I am trying to have the output text seamlessly change its values with the click of a button.
I can get it to work if i separate out the frames. Meaning I have frame 1 load the variable, and frame two display the data. The button loads frame 1 with a different value and then frame 2 picks up the new value again. The problem is that when I click the button, there is that 1 frame gap where the text field isn't displayed. Is there a way to do this in code?
If I can elaborate more or clarify more, please don't hesitate to ask. Thank you for your time.
Steve
Flushing XML Data From Object
Actionscript 2.0 in Flash CS3
I downloaded a simple xml based photo gallery, but I want to categorize the content. Basically the data gets pushed into the object, and when i click a new category button I want it to begin showing the photos only in that category (which is a separate XML file).
The problem I am having is that when i click a new category it doesn't replace the XML data of the object, it appends to it. So it continues to show the original category and then shows the new category after it gets done and then eventually goes back to the original. For example, it starts playing CatOne01.jpg from CatOne.xml, CatOne02, 03 - 10... etc... at the end it goes back to CatOne01
If you click on category 2, it loads CatTwo.xml (I watched it all load up in firebug)and it finishes playing through CatOne CatOne10.jpg and then plays CatTwo01.jpg-CatTwo10.jpg and goes back to CatOne01. I need to find a way to clear out the data before it pushes the new data from the new XML file. I tried flush (as shown below) and nothing changes, i tried delete XML, and that just makes it go blank onclick. All I need is for the values from the first xml to be flushed out before the new values are pushed in each time the user clicks the category buttons, and the new category's images immediately begin playing.
Any suggestions?
Code:
on (release) {
gotoAndStop(1);
_root.techtype.flush();
_root.caps.flush();
_root.photos.flush();
var feed:XML = new XML();
feed.ignoreWhite = true;
feed.onLoad = function(){
var nodes:Array = this.firstChild.childNodes;
for(var i=0;i<nodes.length;i++)
{
_root.techtype.push(nodes[i].attributes.id);
_root.caps.push(nodes[i].attributes.desc);
_root.photos.push(nodes[i].attributes.url);
}
_root.mcl.loadClip(photos[0], _root.gallery.photo);
_root.textBar.t.text = caps[0];
_root.buttons.gotoAndStop(techtype[0]);
}
feed.load("images/CatOne.xml");
}
and
Code:
var photos:Array = new Array();
var caps:Array = new Array();
var techtype:Array = new Array();
var current:Number = 0;
this.createEmptyMovieClip("gallery", -99999);
this.gallery.createEmptyMovieClip("bmdc", 1);
this.gallery.createEmptyMovieClip("photo", 2);
var bmd:BitmapData = new BitmapData(500, 375,true,0x000000);
this.gallery.bmdc.createEmptyMovieClip("preload", 1);
this.gallery.bmdc.attachBitmap(bmd, 2);
var mcl:MovieClipLoader = new MovieClipLoader();
var mclL:Object = new Object();
mclL.onLoadComplete = Delegate.create(this, tranny);
mcl.addListener(mclL);
function loadPhoto():Void
{
trace("loading photo...");
bmd.draw(this.gallery.photo);
this.gallery.photo._alpha = 0;
if(current == photos.length-1) current = 0;
else current++;
textbar._rotation = rr;
textBar.t.text = caps[current];
mcl.loadClip(photos[current], this.gallery.photo);
_root.buttons.gotoAndStop(techtype[current]);
}
function preload():Void
{
if(current == photos.length-1) var num = 0;
else var num = current+1;
this.gallery.bmdc.preload.loadMovie(photos[num]);
}
function tranny():Void
{
trace("starting transition...");
var f:Fuse = new Fuse();
f.push([{target:this.gallery.photo, alpha:100, time:4},
{target:textBar, delay:0.5, start_x:-518, x:cx, time:0.5, ease:"easeOutExpo"},
{target:textBar.arrow, x:ca, time:0.5, ease:"easeOutQuad", delay:0.5}]);
f.push({func:preload, scope:this});
f.push({target:textBar,delay:5, x:-518, time:1, ease:"easeOutExpo", func:loadPhoto, scope:this});
f.start();
}
function cx():Number
{
var te:Number = textBar.t.textWidth;
var nx:Number = -518 + te + 60;
return nx;
}
function ca():Number
{
return textBar.t._x - cx()+27;
}
function rr():Number
{
if(Math.random() < 0.5) return Math.round(Math.random()*15);
else return Math.round(-Math.random()*15);
}
Flushing A Script When Changing Scenes
I have used a script to produce a looping effect for a static image. The animation is triggered by a mouseover so as you approach one side or the other the image moves that way...stops when the mouse is in the middle of the screen. The script automatically duplicates the image on the right or left side depending on where the mouse is positioned. The problem is when I go to another scene the duplicating effect seems to hang on and doesn't get flushed by changing scenes. I have tried unload movie and whole lot of other things to try and get rid of the issue when switching scenes but nothing seems to work...any help would be appreciated.
How To Disable Flushing SharedObject On Close?
Hi all!!
My prob is very simple..
How to disable flushing SharedObject on winodow close??
I wrote a little app and i want to flush my SO only at some button event...
but.. everytime i close the swf, flash automatically flush my SO.. i dont want it!!
please.. someone..
10x!
Flushing Cached/Stored Streams
Hi,
I have a setup where I have 2 FMS, configured in Edge - Origin
Configuration. I have all the applications on the Origin Server. I have
the edge server configured to route all the requests coming to it to
the Origin server and cache the media in a directory.
When I play the video from a client requesting the Edge server, it is
fetching the video from the origin FMS and saving the media locally in
the cache directory.
The problem occurs when I want to remove or update the media on the
Origin server. i have a script which removes or incase of update put a
new file on the origin server and also clean the cache directory for
the said file. The issue is the file is accessed by large number of
clients and is stored in the buffer of the media server and its still
showing me the same file in the FMS console under streams that the file
is chached and its size. The users can still see the same file which I
have removed.
Could you please suggest a solution for this problem.
Thanks.
Paste In Place Between Movie Clips Is Not In Place Re The Stage
Hi,
I realize that pasting in place between movie clips is referening the registration point in each separate movie clip and that is why they don't align to the stage properly. So is there any way to turn this off?
Can I make my shapes align to the document stage size no matter what movie clip I'm in? Also, can the paste in place be made to paste in place always relative to the stage?
Thanks,
Stan
Place, Rotate And Check If The Place Is Free
hi,
I want develope a mini game like:
www.medienanfall.de/mix.swf
most important thing is in this game to place the elements in a free space so I have to check if the place is free or full. another problem is if I found a free place for the card I have the possibilty to rotate the card but only if the places on left,right,top or bottom are free. I believe this is the most diffulcult thing in my application.
I hope I could explain it with my terrible english.
I am looking for some tuts or inspirations. could somebody tell me
where I can find somthing similar?
How To Zoom In And Change From Place To Place
Hello, im fairly new to flash MX 2004 and i am currently working on animations.
Feel free to explain it to me in Actionscript or any other way. Here is my question:
For example. A man is walking in a town. This man then reaches the end of the stage (in your fla. work place), what is a way to show the new backround? make a new keyframe right after with a new background? or is there an easier way.
Another thing, how can i have like im a camera type view, and move around showing diffrent things in the backround (while moving left lets say)
Last thing.. zooming in, how can i do it with a picture backround from the internet?
thanks
Sending A Shape From Place To Place
How would i send a shape or movie clip from its current position into a specified place in another movie clip somewhere?
basically i want to make it so that if you click a circle, it will disappear and get sent into a movie clip at this destination: _root.skillsanditems.slot1
any ideas?
How To Load Data From One Place To Other Place
Hello Friends
Can any one help me how to move Some files Such as .JPEG,.MP3,.Swf Files from one directpry to the other directory by Renaming
Throug Flash as a Front end
Plz let me know soon
Can Anyone Correct This .fla For Me?
I used the flashkit VR sample script to as my base for mouse-triggered movement of an image. But now everytime the mouse reaches an image-border, the image jumps back to the center of the image. What can I do about this? I want the movement to gently bounce in the opposite direction once an image border has been reached. Can anyone correct my flash_VR.fla and mail it to lausbaum@mac.com? I uploaded it to http://nikoflash.ontheweb.nl - I would be very very very thankful to anyone willing to help!
Thanx!!!
Is This Correct ?
Hello everybody
I just made a preloader at Scene 1, ofcourse i got other scenes, scene 2 scnene 3 etc.etc.
i want the repload movie go play scene 2 if EVERYTHING is loaded, including scene 2 scene 3 scene 3 etc.
Is this correct if i put on the beginnin or last frame of my preloading animation, scene 1 :
if frame is loaded, scene 3 frame xxx
go to and play scene 2 label/frame xx
thnx.
What's The Correct Way To Name This...
I need to call something like this...
Code:
_level100.member4._alpha = 100;
However, the "4" in member is the result from an array element so when I do something like this...
Code:
_level100."member" + _root.memkid[d]._alpha = 100;
I get an error: "Expected a field name after '.' operator."
So what is the proper naming convention to make this work. Thanks for any help here.
This Can Be Done... Correct?
I'm going out of my mind trying to rememmber how to fade in dynamic text. I have a swf that gets loaded into my master swf file.
the loaded swf file (lets call it "loaded.swf")cosists of 15 frames total on its root timeline. It has 4 layers (1 being solely for actions). on one of the layers I have placed a MC instance onto frame 2 (frame 1 has a small graphic tween). This MC instance holds a dynamic text field with an instance name of "loadedInfo". This container MC consists of only 1 frame total.My actions layer in this MC ahs the following code:
//-------------------<load CSS>-------------------\
var cssStyles:TextField.StyleSheet = new TextField.StyleSheet ();
cssStyles.load ("styles/styles.css");
cssStyles.onLoad = function (success) {
if (success) {
loadedInfo.styleSheet = cssStyles;
_level0.myLV.load("vars/problemText.txt");
} else {
loadedInfo.text = "There has been an error loading the requested information.";
}
}
//-------------------</load CSS>-------------------\
_level0.myLV.load("vars/problemText.txt");
Back on the parent timeline of loaded.swf i have the container MC (which hold my dynamic text field) do a motion tween with alpa values at 0% going to 100%.
*** PROBLEM *** I cannot seem to get this to work. I know i hhave read this somewhere before, but cant seem to find the help resources for similar problems people have resolved. Any help on this would be a huge pain reliver for this headache of a stump I have hit. Thanks.
Is There A More Correct OOP Way To Do It?
i have 2 classes (Ball & Level) and several instances of each class.
if i need a Ball instance 3 to call level_4. i use this messy code on Ball.as:
Code:
// myLevel is a Number <= number of level instances here 4;
//levelArrayAdd(); is a function on the level_4 instance
var levelHolder:Level = findMyLevelClass(myLevel);
levelHolder.levelArrayAdd(this);
and the function looks like this:
Code:
private function findMyLevelClass(leve:Number):Level {
var findL = levelFinder(leve);
Level(findL);
var levelHolder:Level= _root[findL];
return levelHolder;
}
private function levelFinder(levelIn:Number):String {
var lfind = ("level_"+levelIn);
return lfind;
}
this works, but it seems messy, is there a more correct OOP way to do it?
Is This Correct?
This is to make an "active state" for my buttons
invA_but._visible=false;
invB_but._visible=false;
invC_but._visible=false;
invD_but._visible=false;
invE_but._visible=false;
invF_but._visible=false;
a_but.onRelease=function(){
invA_but._visible=true;
invB_but._visible=false;
invB_but._visible=false;
invD_but._visible=false;
invE_but._visible=false;
invF_but._visible=false;
}
b_but.onRelease=function(){
invA_but._visible=false;
invB_but._visible=true;
invC_but._visible=false;
invD_but._visible=false;
invE_but._visible=false;
invF_but._visible=false;
}
c_but.onRelease=function(){
invA_but._visible=false;
invB_but._visible=false;
invC_but._visible=true
invD_but._visible=false;
invE_but._visible=false;
invF_but._visible=false;
}
d_but.onRelease=function(){
invA_but._visible=false;
invB_but._visible=false;
invC_but._visible=false;
invD_but._visible=true;
invE_but._visible=false;
invF_but._visible=false;
}
e_but.onRelease=function(){
invA_but._visible=false;
invB_but._visible=false;
invC_but._visible=false;
invD_but._visible=false;
invE_but._visible=true;
invF_but._visible=false;
}
f_but.onRelease=function(){
invA_but._visible=false;
invB_but._visible=false;
invC_but._visible=false;
invD_but._visible=false;
invE_but._visible=false;
invF_but._visible=true
}
How To Correct?
I am trying to create an interactive flash quiz using Adobe Flash CS3, however when i try to link the buttons to my dynamic text, i can't. It tells me that there is something wrong with my code. Can someone please tell me what it is wrong with my following coding?
stop();
on(release){
_root.answer1 = "Wrong Answer ";
}
Is This Correct?
I wrote:
Code:
for (i=1; i<=4; i++) {
eval("photo"+i).imgHolder.loadMovie(eval("img"+i), this);
}
I want:
photo1.imgHolder.loadMovie(img1,this);
is eval() the correct thing to use? It's working, but is it the most efficient? Thanks.
Please Correct Me
Hi
All
I llok through the forum and found script to move MC with elastic effect
but also want to scale that so i modify the script.
ActionScript Code:
function moveClip(mc,physics0,physics1, xvar, yvar, xscalevar, yscalevar){
xspeed=yspeed=0;
xscaleSpeed=yscaleSpeed=0;
mc.onEnterFrame = function(){
xspeed = ((xvar-mc._x)*physics0)+(xspeed*physics1);
yspeed = ((yvar-mc._y)*physics0)+(yspeed*physics1);
xscaleSpeed = ((xscalevar-mc._width)*physics0)+(xscaleSpeed*physics1);
yscaleSpeed = ((yscalevar-mc._height)*physics0)+(yscaleSpeed*physics1);
// add the speed to the current position of the object
mc._x += xspeed;
mc._y += yspeed;
mc._width += xscaleSpeed;
mc._height += yscaleSpeed;
if(Math.abs(xspeed && xscaleSpeed)<=0.2 && Math.abs(yspeed && yscaleSpeed)<=0.2){delete mc.onEnterFrame;
mc._x=xvar;
mc._y=yvar;
mc._width=xscalevar;
mc._height=yscalevar;
}
}}
But for some reason it works on first click and don't work on second
I mean if i have two button and each of them is told to move same clip to move and scale from on position to other then on first click it works fines but on second click on other button it just jump to mention position without any moving or elastic effect
please correct above script
Thanks
Correct Syntax For 'and'?
hello boardsters...
i have a preloader which is checking to see if an external txt file is loaded in, by checking for a variable named &eof at the end of it- but it also needs to check if a certain frame in the file is loaded.
so, my code so far says:
if (eof == 1) {
gotoAndPlay ("loaded");
}
how do i phrase it correctly? i want to say, "if eof is loaded, AND frame 20 is loaded, go to..." but i'm pretty sure i can't just stick and 'and' in...
a little help anyone?
cheers m'dears
louise
Btn In MC Not Doing The Correct Action
when i place a MC which has a Btn action inside it into one of my scenes and play it and then try to click on it it does not go to the correct location it just starts over that scene and stops (i have a stop action in the scene)
the Btn action is
on (press) {
gotoAndPlay ("Ackee", 1);
}
could the problem be that i can not put a Btn action in a MC and then try to access it.
help me..
Blessings...
Is My Preloader Correct
Can anyone tell me if this is right?
In my preloader the first frame of the first layer is blank. the actionscript looks like this (bLoaded and bTotal are 2 textboxes that say how many bytes are loaded:
var Loadd = getBytesLoaded();
var Total = getBytesTotal();
bLoaded = loadd;
btotal = total;
if (loadd=total) {
gotoAndPlay ("Main", 1);
}
;
the second frame is blank too and it looks like this:
gotoAndPlay(1);
the first frame of the second layer is a keyframe. it and the second frame have the loading movie with the textboxes. is that correct?
And the second question is why isnt my preloader loading. Since my file was small it thought the reason i never saw it was cause its only 2 frames long and it loaded fast, but now to test it out it added a 1 mgb sound file to the 3ed frame of the acutal site but the preloader still doesnt load and it just stops before the 3ed frame to load it. And in the scene box the Preloader scene is before the "Main" scene. if you need me to send you it to furture clarify i can. CAN ANYONE HELP?
Not Sure If Script Is Correct?
Hi Guys,
Can anyone see any error with this script:
Code:
if (_root.Go ne "") {
if (_root.Success eq "Yes") {
gotoAndStop (1);
_root.Go = "";
Status = "Success Welcome to are Website";
_root.gotoAndStop("SomeRedirectFrame";
}
if (_root.Success eq "No") {
gotoAndStop(1);
_root.Go = "";
Status = "Please Login Again - we where unable to find your UserName";
_root.gotoAndStop(1);
}
}
// Only for last frame of Loop
else {
gotoAndPlay(2);
}
Correct Way To Use LoadVars ?
Is this coding incorrect? Do you HAVE to load variables into a seperate LoadVars object? Will it cause errors to load data into the same LoadVars object that called the load? such as this..
Code:
myLoadVars = new LoadVars();
myLoadVars.load("http://whatever.asp");
myLoadVars.onLoad = function() {
do whatever;
}
Is there anything wrong with this code?
Correct Syntax ?
Thanks for reading this!
I have an MC on the main timeline named "dance" and another named "dance_control". When "dance_control" is activated it *should* tell "dance" to jump five frames forward from its current keyframe.
Whats wrong with my control script?
_root.dance.gotoAndPlay("_currentframe++5");
Thanks!
Correct This Script
Ive got this script to make moving text
Code:
onClipEvent(load) {
_root.scrollBox = " this text is scrolling"; // put your text here, leave spaces at the beginning
}
onClipEvent(enterFrame) {
firstChar = _root.scrollBox.substr(0, 1);
_root.scrollBox += firstChar;
_root.scrollBox = _root.scrollBox.substr(1, _root.scrollBox.length);
}
I want to make the text move slowly... but how? the longer the text is, the faster it goes.
Correct Script?
Hi (Flash 5 question)
I'm trying to ask the timeline in my flash movie to go to a specific frame when you press a button which is inside a graphic which is inside a movie clip within the main movie.
Genevieve Paris was kind enough to direct me to using _root or _level0
to designate the main movie's timeline.
This is the script I've attached to the button:
on (press) {
_root.gotoAndPlay("space", "start");
}
"space" is the name of the scene I want to move to on the main timeline and "start" is the label I've attached to the 1st frame
of that scene.
When I test the movie and press the button, the mouse over is acknowledged but nothing else happens.
Can anyone point me right, and Genevieve if you're reading this,
sorry I couldn't just run with your excellent help!
Signed
Mr. Inovermyhead
Correct Syntax
I'm trying to make this code dynamic.
this.myImageVar = _level0.myMC.myArray3[x];
I want to make the name of the array dynamic so I can reuse the code for other arrays.
Like so:
this.myImageVar = _level0.myMC.myArray + myArrayNum + [x];
What would be the correct format for this?
Thanks in advance
Help Me Correct My Site :-)
Hello i have done a homepage and there are still some small isues that i cant fix myself.
please download the .fla and additional files here:
http:/www.tv-glad.dk/Tv-Glad_homepage.zip
the ZIP file contain all the files :-)
here are the things that i cant fix myself.
first of all the buttons with speak on them repeats when pressed. i only want the buttons to speak once while mouseover......
Some og the dynamic texts in the Information sektion does not load correct
see Expl the Danish and the german does not show all the text.
in the Program sektion the same problem occurs under "esbjerg"
cant see the hole program. there is also a link on one of the pictures here.
should open a html page in a new window at a sertain size and start to straeam some Quicktime movie :-)
The Guestbook and mail sektion i really dont know how to do. hope you had an idear.....
if you like to look at my work and give me some tips. then feel free to download it. ill be gone for a week...but when i get back i'll look at all you work.
you can mail me the result or we arrange for you to upload to my server.
jimmy@tv-glad.dk
The page is for metally disabled people :-)
Thanks ....hope this is a challenge for some of you :-)
Mirrorman
Like To Help Correct My Site :-) ?
Hello
anyone that like to correct my site ????
you can download the whole site here:
http://www.tv-glad.dk/Tv-Glad_homepage.zip
aprox. 6.5 Mb.
there are small thing that i cant get to work, please help.
under:
info i want the print ****tion to print the dynamic text.
and i want to see the whole text. under Danish, German, Spanish, and Italien
for some reason only the english text is in its hole?????
The news sektion in the left dosent work??? why ???
i want to have a guestbook intergrated and i want the formmail to work.
please help, download the site and mail me if you have any sugestions.
you will be credited for you work.
if you like to just see or test the site then use this link:
http://www.tv-glad.dk/testsite4.swf
Hope to hear from you soon.
mail me at jimmy@tv-glad.dk
ThanX Mirrorman
What Is The Correct Syntax?
Hello,
I have a movie clip on a timeline and when the clip finishes playing I want it to point to a specific clip on the main timeline to start playing again.....what is the correct syntax please?
Many thanks
Correct Timeinterval
I want to make a game that test the players reaction time and show the best results in a highscorelist. Problem is that if the users computers is running slow for some reason they will get a much better time then they earn. How can prevent those users from playing or is there any other way around?
Fades Not Correct..
people,
now i have a script that fades loaded images on a rollover movement, but if you first load the image and then wait a few seconds, he fades in after 3 seconds
my FLA makes it more clear....
please have a look at it maybe someone can fix this ?
thnx already!
Correct Me If Im Wrong
i have this menu navigation.
its a big site and i need 930 buttons. whats the easiest way to make them.
ive made one and used duplicate to make another 10.
seems a bit like hard work. is there an easier way. ?
If Statements Correct?
hey,
i'll just briefly explain wat i'm trying to do:
i'm making an interactive map, where i hav a MC named 'map' and i wish to change the position of the MC with buttons (which is workin at this stage), i am tryin to restrict the movement of the MC within certain boundaries. but as i hav other buttons which scale the MC and therefore change parameters, i need a new set of rules for each scale factor. i am using actionscript 1
this is the code for the 'move right' button, for one of the scale factors (which is working):
{if (/map:scale_target = "100"){
if (/map:x_target>"-350") {
/map:x_target = getProperty("/map", _x)-_level0:movespeed;
} else if (/map:x_target<="-350") {
/map:x_target = "-350";
}
this was my attempt at including all scale factors:
if (/map:scale_target = "27"){
/map:x_target = "200";
/map:y_target = "275";
}
{if (/map:scale_target = "40"){
if (/map:x_target>"value") {
/map:x_target = getProperty("/map", _x)-_level0:movespeed;
} else if (/map:x_target<="value") {
/map:x_target = "value";
}
}
}
{if (/map:scale_target = "60"){
if (/map:x_target>"value") {
/map:x_target = getProperty("/map", _x)-_level0:movespeed;
} else if (/map:x_target<="value") {
/map:x_target = "value";
}
}
}
{if (/map:scale_target = "80"){
if (/map:x_target>"value") {
/map:x_target = getProperty("/map", _x)-_level0:movespeed;
} else if (/map:x_target<="value") {
/map:x_target = "value";
}
}
}
{if (/map:scale_target = "100"){
if (/map:x_target>"-350") {
/map:x_target = getProperty("/map", _x)-_level0:movespeed;
} else if (/map:x_target<="-350") {
/map:x_target = "-350";
}
}
}
if (/map:scale_target = "150"){
if (/map:x_target>"value") {
/map:x_target = getProperty("/map", _x)-_level0:movespeed;
} else if (/map:x_target<="value") {
/map:x_target = "value";
}
}
{if (/map:scale_target = "300"){
if (/map:x_target>"value") {
/map:x_target = getProperty("/map", _x)-_level0:movespeed;
} else if (/map:x_target<="value") {
/map:x_target = "value";
}
}
}
wenever i run this, and press the button in question, the scale factor is set to the bottom statement, and it is run from there.
i am a beginner in actionscript so i dont know if i hav made a silly mistake or something. please help?
thanks
Correct Syntax?
hi, i was wondering if there is anything wrong with the code below. i hav tried every little change to correct it, but it still wont work. i am using actionscript 1
please help!
on (release, releaseOutside) {
/map:scale_target = "150";
/banner:bottom6._visible = true;
/banner:bottom7._visible = false;
if (/map:x_target>="1257") {
/map:x_target == "1257";
}
if (/map:x_target<="-598") {
/map:x_target == "-598";
}
}
AS - Correct / Incorrect?
How can I create a Swf where you drag a several MC's, place them in the correct order and then they press a button which then tells you if they are in tne correct order?
Really stuck with this......anyone?
Gabriel
Set Correct Variable For ASP
I create an external textfile data.txt that i load
&productID0=1&image0=Master.jpg&productID1=2&image 1=Revolution.jpg&count=2&
images = new Loadvars();
images.load('data.txt');
images.onLoad = function() {
for (i=0; i loadMovie(images['image'+i], "_root.mc"+[+i]);
}
};
I have two Movieclips called mc0 and mc1. Both they load an picture. What I want is when you click on the picture it opens an url
on (release) {
getURL("http://domain/Main.asp?ProductID="+ProductID[i], "_Blank");
}
It now gives
http://domain/Main.asp?ProductID=
It has to be
http://domain/Main.asp?ProductID=1 for the first picture and http://domain/Main.asp?ProductID=2 for the second picture
Please help me out
Correct Me If Im Wrong
hmmm, i just
wanted to know if there is somthing wrong
with my script:
code:
if(instancenameofmovieclip._currentframe == 32){
variable -= anothervariable;
}
cause, i dont think it works!
oh yeah is it possible to do this:
variable = "hello"
then the dynamic text would show "hello"
when refered to that variable?
thnx a bunch!
Please Correct My Code
Hi
i"m using flash mx
i need that, at the end of one movie clip will automaticly load second movie clip and go at specific key frame (at the end of second movie clip)
i did this but it's not working, please help me.
in the end of first movie clip (last keyframe) i wrote this:
stop();
_root.gotoend = true
trace(_root.gotoend);
_root.loadMovie("stol1.swf","movies");
//movies it is a loader for movie clips
NOW in the beginning of second movie clip i wrote this:
if (_root.gotoend)// if it's true it will go to the last frame
{
trace("true");
gotoAndStop(_totalframes);
}
that's all, but it's not working, please tell me what to write and where.
thanks you very much.
Correct Format
Hello all.
what is considered the correct way to format something like this:
code:
button_background._y = getProperty(duplicateButton, _y)-rowCount-button_space;
My concern is the 2 minus vars at the end.
3P
|