Still Can't Figure This Out?
i know i posted this yesterday, but i'm stumped.
when my custom window opens, there is a space on the right and the bottom where a scrollbar would be. I didn't want a scrollbar, so this is a good thing, but the movie does not go all the way to the right or to the bottom. my movie matches the frame size (800x500) and i've gone over the javascript again and again.
would someone look at the code??? i'm not sure if i'm exporting the html incorrectly when I publish or if there's something goofy about the javascript.
osiris http://www.invisible7.com
FlashKit > Flash Help > Flash MX
Posted on: 06-06-2002, 08:06 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Can't Figure This Out (can't Even Figure Out How To Describe It Lol)
I have a function that is getting the dimensions of a textfield so I know how large I will need to create it later on. Problem is, when loading big blocks of HTML w/ embedded images, the textfield may change size a few times before completely loading. If I trace out the "h" property in this function inside a loop, it looks like this:
1107
1107
1153
1208
.
.
.
until it gets to around 1350. I need a way to return that 1350, not the 1107, as my textfields are being sized to small. Any idea how to modify this function below so it returns the correct values? I've tried do/while, just a while loop, and onEnterFrame, but just can't figure out a way to get those values. Any help would be appreciated.
ActionScript Code:
private function getHtmlTextExtent(mcTest:MovieClip, strHtml:String):Object
{
var w:Number = 0;
var h:Number = 0;
var fw:Number = 0;
var fh:Number = 0;
var objExtent:Object;
_txtTemp = mcTest.createTextField("txtTemp", 100, 10, 1, 530, 400);
_txtTemp.embedFonts = true;
_txtTemp.multiline = true;
_txtTemp.wordWrap = true;
_txtTemp.antiAliasType = "advanced";
_txtTemp.selectable = false;
_txtTemp.html = true;
_txtTemp.htmlText = strHtml;
w = _txtTemp.textWidth;
h = _txtTemp.textHeight;
fw = _txtTemp._width;
fh = _txtTemp._height;
objExtent = {width:w, height:h, textFieldWidth:fw, textFieldHeight:fh};
_txtTemp.removeTextField();
return objExtent;
}
HELP Cant Figure This Out
I am building a site, and bare with me as I try to explain what it is I want to do.
1) There are 5 square buttons.
2) In front of the buttons there is a cross hair or bullseye
3) I want the crosshair to drag horizontally behind the mouse when moving the mouse across the screen
4) When moving the mouse across the screen, the buttons slide across horizontally depending on which way you move the mouse.
5) For an example: Ecko.com the first scene is exactly what I'm trying to do.( I also lam curious to how the buttons slow down when they come to a resting point.)
Please HELP!!! ASAP
Even YOU Can Figure This One Out...
Okay, simple script - not working.
It's a simple preloader that's preloading an external .swf. I want it to start playing the file when it is 25% loaded. But no luck. Here's my script (attatched to a movie clip):
onClipEvent (load) {
loadMovieNum ("sound.swf", 1);
}
onClipEvent (enterFrame) {
percentloaded = Math.floor(_level1.getBytesLoaded()/_level1.getBytesTotal()*100);
_root.percentdisplay = percentloaded+"%";
if (percentloaded >= 25 && !initialized) {
_level1.mysound();
initialized = true;
}
}
...But it still waits until fully downloaded to play! That the heck! Much love and thanks in advance for any help!
Can't Figure This One Out On My Own
Hi
If anyone has a clue idea suggestion, as to what I might have missed here please let me know.
Here's the problem:
I have FLASH 5
I put together a small swf menu to embed on HTML page. Menu buttons link to other HTML pages in another frame in the frameset. After putting all the necessary pages together and publishing and testing-retesting gazillion times everything runs fine. But I tried testing it on the other computer and only part of the swf works. And that doesn't always happen either. Some machines display it properly, some give me retarted version of my swf.
Is there something with my, SWF, HTML, or is the cache of the computers to blame.
Has anyone had the same problem before and maybe knows what I'm referring to?
Any advise will be considered an enormous help.
The similar problem I have with another swf of mine. After publishing it, it runs fine on all machines I've looked at except one, my boss's of course. He sees not even a half of the swf.
Thanks
Hopefully Someone Can Figure This Out... =)
ok...i am playing around with actionscript and trying to learn it...so i downloaded this source file...cuz it looked interesting... http://www.flashkit.com/movies/Inter...37/index.shtml
anyhoo...i thought it was nifty how when you go over the ? button it rolls the text up...so i wanted to try it on one of the balls...and for the life of me...i cant get it to work...can someone please try this and let me know if u get it....much appreciated...
Can Anyone Figure This Out?
I dunno if from just looking at this anyone can tell me why it isn't working........
onClipEvent(enterFrame){
cursor_Xdiff = 456.4 - _root.cursor._x
cursor_Ydiff = 69.7 - _root.cursor._y
zoom = 46.3 / _root.a
_root.map._x = _root.map._x + (zoom * cursor_Xdiff);
_root.map._y = _root.map._y + (zoom * cursor_Ydiff);
}
The code should move a map by the right amount governed by zoom, but it doesn't.
Can anyone point me in the right direction??
cheers,
George.
I Can't Figure It Out?
Level #0:
Variable _level0.$version = "WIN 5,0,30,0"
Movie Clip: Target="_level0.game.interface"
Variable _level0.game.interface.start = "yes"
Movie Clip: Target="_level0.game.time"
Variable _level0.game.time.reel1 = "yes"
Movie Clip: Target="_level0.game.spinaudiocontrol"
Variable _level0.game.spinaudiocontrol.tune = "2"
Movie Clip: Target="_level0.game.reel01"
Variable _level0.game.reel01.bone1 = "2"
Movie Clip: Target="_level0.game.reel05"
Variable _level0.game.reel05.bone2 = "2"
Movie Clip: Target="_level0.game.rndm"
Variable _level0.game.rndm.reels = "1"
Shape:
Button:
Movie Clip: Frame=85 Target="_level0.game.time"
Text: Value = "timer"
Movie Clip: Frame=89 Target="_level0.game.spintune" Label="SNDreel01"
Movie Clip: Frame=22 Target="_level0.game.spinaudiocontrol"
Text: Value = "ReelSpin Audio Control"
Shape: Mask
Shape:
Shape:
Shape: Mask
Movie Clip: Frame=45 Target="_level0.game.reel01" Label="01-05"
Movie Clip: Frame=1 Target="_level0.game.reel01.strip01"
Shape:
Movie Clip: Frame=1 Target=" _level0.game.reel01.strip01.boneflash1" Label="stop"
Movie Clip: Frame=53 Target="_level0.game.reel02" Label="02-05"
Shape:
Movie Clip: Frame=50 Target="_level0.game.reel03" Label="03-05"
Shape:
Movie Clip: Frame=50 Target="_level0.game.reel04" Label="04-05"
Shape:
Movie Clip: Frame=57 Target="_level0.game.reel05" Label="05-05"
Movie Clip: Frame=1 Target="_level0.game.reel05.strip05"
Shape:
Movie Clip: Frame=1 Target="_level0.game.reel05.strip05.boneflash2" Label="stop"
Movie Clip: Frame=17 Target="_level0.game.rndm"
Text: Value = "random"
Movie Clip: Frame=1 Target="_level0.game.instance2"
if<--------trace action
Target not found: Target="_root.game.reel01.strip01.boneflash1 && _root.game.reel05.strip05.boneflash2 " Base="_level0.game.time"
flash<---------another trace action
Can't Figure This Out
I am slowly consuming actionscripts, but I've ran into a very nicely designed site that I just can't understand (in terms of how they accomplished what they accomplished). Specifically, http://www.pakobrats.com/ and more specifically, the transition effect that happens when a menu item is chosen. @ first I thought this was just a "goto" w/ a few wipes to transition from one pic to another, but no. each menu item has its own "closing" association w/ a mouse over. So, if this is not some type of "on mouse event goto frame" what is it? Does anyone have any insight as to how this effect is accomplished? Am very curious.
I Can't Figure This Out...please Help
so...
i have 3 layers
layer 1 has 2 buttons
layer 2 has a guy walking from frames 1-5
layer 3 has a guy walking from frames 1-10
i want button 1 to do this:
play frames 1-5 then stop
i want button 2 to do this:
play frames 1-10 then stop
how do i do this without having button 2 stopping on the 5th frame? (because for button 1 i had it stop on frame 5)
(the answer can not involve moving the frames around)
i can't figure this out!!!
please help me...
Can't Figure This Out.....PLEASE HELP
4 hours left and if i don't figure this out i am toast!!! please help
is there any way to make this action save??
if you don't know what the action does it simple removes the top name out of a list and moves everyone elses up one
i need to know how to make it so the next time the program is ran it will show the new list!!!
on (release) {
if (Input="")
S=J;
J=So;
So=F;
F=Input;
}
}
Can't Figure It Out..plz Help
hi there,
can't figure it out..plz help
i am working on a navigation which will use the last button clicked
variable.( i know how to set it)
now my movie consists of 4 parts each part is targeted by there buttons.
now when the movie starts the intro plays(skip buttons takes the movie
to scene 2). i.e. intro is scene 1.
now problem start from here the scene 2 is divided in 4 parts. at start of sence2
4 buttons appear at right upper corner whcih will present there till end
currently movie is at stop with stop action.
now i want it happen like this if i press any button it should first
play the ending of current part of movie and if i press any button at start
because currently it is not playing any part of movie so it should go straight
to that part. u can take 4parts as 4 different movieclips or
divide scene2 in 4 parts with each part has some frames at its end
carring some animation which will only palyed when the other button will be clicked
plzzzz help
i have tried my best to explain u what my problem is
adnan
bye
I Can't Figure This Out... :(
can anyone help? i'm lost
this is my problem:
i have 2 layers
on layer 1 there is a button
on layer 2 there is an animation
there are 13 frames
there is a stop on frame 7 and 13
depending what frame the current animation is on, i want the button to do different things,
so the actionscript for the button would be something like:
on release
if on frame 7
go to and play frame 8
else play frame 2
how do you write that?
I Can't Figure It Out... Can Anyone Help?¿?
I cannot figure out how to do this...I have buttons that change a MC different colors
Code:
on (press) {
colorTarget = "guy";
input = "000000";
newcolor = new Color(colorTarget);
newcolor.setRGB(parseInt(input, 16));
}
this is the action on the buttons...now I am trying to put an action on a button that if 3 is pressed it will use if "that MC" is blue(for example) goto frame 5..but if 3 is pressed and the MC is green it goes to frame 6...can anyone help????
I Can't Figure This Out ->
OK. Here's the thing...
I made a Movie Clip called "PopMenu 1". Now in this movie clip there's a banner, 3 menues and a rectangle on the side.
Now's the problem... I put this code in in the news button:
On (release)
Go to ("News")
End On
Now at the News label I put a Movie clip called "News Play". This clip is the news window that slides in.
When I play my movie the News Window slides in right away, even before I click on the news button (meening the "News Play" Movie Clip plays since the start). I want to know why. Also when I click on the News button another News window slides in over the one already there. I don't understand why the Window slides in at the biggining before I click and ask it to. Plz help me ! Thx... L8r
I Can't Figure It Out
See.. I see these banners all the time, made in Flash 5 that are cooooooooooooooooool! Like the text bounces and swings etc... I can't figure it out, all I can figure out is how to make the text come in..
Can't Figure This Out.. Please Help..
Whenever I insert a shockwave file within a html table cell, it creates a white space below it and makes it look detached..
The only was I can disguise it is by using the background color for the cell similar to the shockwave movie background. Why does it happen so. Is it possible to remove that..
Can You Figure Out?
what principle the menu of this sites operates on:
http://netstudioz.com/english/flash/intro.html
what do you think that is? i tried a number of simple roll over goto scenes and frames and even sliding the clip into place by moving the x y positioning using the with action.
all of those didnt seem right.
i think the menu is launched based on the x y position of the mouse.
could someone tell me how to do this? i am really just two weeks into all of this stuff; thanks so much.
Can't Figure This Out
my site opens in a custom window, however, in Explorer the content does not go all the way to the right and bottom edges (where the scroll bars would be).
In Netscape this does not occur.
can't fiture out how to alter this.
site is http://www.invisible7.com
goto either "theater" or "video" to view the prob.
thanks for any help that you can provide.
osiris
osiris@invisible7.com
Cant Figure This Out
Im creating a flash site. All I have in the movie so far, is a movie clip on the main timeline. When I test the movie it doesnt play!! This has never happened to me before. All I did was drag the MC on to the stage and tested the movie and its a no show!! There are things going on in the clip, it works fine, Ive tried over and over and cant figure this out!! Its driving me insane. Any help?
Can Anyone Figure This Out?
I hate to do this, but I posted a question at actionscript.org, but no one has replied for quite some time. here is the link:
http://www.actionscript.org/forums/s...threadid=13642
download the .fla and see what you think....
thanks....
<< neMec >>
I Can't Figure It Out...
Question...
I'm creating a portfolio site for myself and I have my work on one movie clip called 'art'. Then on the main scene I placed 2 runners telling the 'art' clip to go + and - X cordinates. Then I have 2 buttons telling the runners when to play.... This part all works fine. I can scroll left and right with no problem. But now I want the 'art' to scrool across quickly to a certain picture on the movie clip after another button is placed. So instead of having to scroll through all images, you can just click on a button to go directly through all images before it quickly, and then stop on the image chosen. Help?
GL
Figure This One Out...
#### This thread is not to be taken seriously ####
According to Flash:
1/0= Infinity
(1/0) is a number
Infinity is a number
/*TRUTH: Infinity is NOT a number*/
This one's even better...
0/0=NaN
(0/0) is not a number.
NaN is a number
LOL (NaN is a number!!!)
btw NaN stands for "Not a Number"
Code:
trace("1/0="+1/0);
trace("(1/0) is not a number: "+isNaN(1/0));
trace("Infinity is not a number: "+isNaN(Infinity));
trace("0/0="+0/0);
trace("(0/0) is not a number: "+isNaN(0/0));
trace("NaN is a "+typeof (NaN));
I CANT FIGURE IT OUT
why is it that if yo go to my page... http://www.paddlenut.com/gallery.htm
my flash doesnt start up in the preload screen, in the swf file, scene "preloader" is above the Main scene.
is there a special code i need to put in my file?
Can Anyone Figure This Out?
Is there some trick to this? I use a redirect service for my url. When a client clicks on add bookmark, the default security settings within Windows IE6 SP1 don't allow a client to add the bookmark.
If you go to http://www.informationtechnologysolu...t/testmain.htm -
and click on the CSD - it does nothing but the original SWF-
http://www.informationtechnologysolu...t/testmain.swf
works fine. For some reason going through an html to get to my swf disables the button.
I use an http forwarding service - I do not have sufficient bandwidth for my own web sever.
The call in Flash I made was:
on (press) {
getURL
("javascript:window.external.AddFavorite('http: //home.attbi.com/~completesys
temsdesign/main.swf','Complete Systems Design')");
}
Thank you.
Can't Figure It Out...
Hey everyone. I need some help here.
I am kind of a begginer at these things but decided to experiment with making a movie to get more familiar with things. I was making a movie about my dads work, Jewelery. This is how I wanted the set-up:
1.The background fades in.
2.My dad's name fades in after background.
3.The "kinds of things he makes" fades in after name tag.
4.A long "banner" slowly moves across the screen showing jewelery.
5.After the "banner" leaves, the "kinds" fades out.
6.After the "kinds" fade out, the name tag zooms in while the background fades out into all black.
I have many problems with this. Such as that the name tag doesn't fade in, but instead pops up. The same problem with the "kinds". And at the end when my dads name zooms in, it kindof shakes into a large form. Theres a link near the bottem of this post to download a zip file with everything I have so far. If you can please look at it and maybe e-mail me or leave a messege here that would be great! Also, don't hesitate to make any changes to the file, it's just a copy . And if theres anything I can do to lower the work I did, or make it better, please share it with me Thanks everyone.
-Edgar De Loa
http://us.share.geocities.com/homie94063/Francisco.zip
I Just Cant Quite Figure It Out....
I am doing a website for my High School FBLA Chapter (Future Business Leaders of America). It is for a competition that is more conservative so I am not trying to go real flashy, just more simple and elegent. But, I have run into a block. If you view of the sections, they are blank. I just dont know what would be best to present the information. Any idea's? I would really LOVE any.
http://www.chasebrammer.com/fbla2/index2.htm
Trying To Figure Out A Way To Do This
I'm trying to figure out a way to create an expandable content page.
The flow would be like so:
Title of Content
Content for this item goes here. This content may
be long and be mulitple lines.
Title of Content 2
Content 2 for this item goes here. This content may
be long and be mulitple lines.
Title of Content 3
Content 3 for this item goes here. This content may
be long and be mulitple lines.
--------------------------------------
Think of this as an expanable Q&A page.
This may have many lines (questions).
When you click on the title (Question) the full content expands to display the full answer.
All questions are collapsed by default and expand to the answer when the corresponding question is clicked.
I also want to load the content via an xml or text file.
Any help on getting me started on this would be great help.
Thanks in advance.
Figure This One Out
ok figure this one out. I sure as heck can't. I'm currently working on a webiste which has a form in one of the MC's which users can type in information in some input fields and right away the calculations tell them the information they need.
Here's the weird part! I've created an MC with a base layer containing a simple background graphic and another layer on top with an input text field and have labeled the variable 'text'. I've laid down 12 instances of this MC with 8 of them in one column in my movie and 4 in another column. In my action script of the movie containing all these instances of my input field MCs, I've constructed an array containing the instance names of all my input MC's. The code all works, however.... Whenever you click in an input field, the cursor will start blinking like normal, but after a few times of it blinking every other intance of my input movie's cursor starts blinking too. But only if those instances are in the same column as the that was clicked in. Now at first I just thought well ok they must all be blinking because they're all instances of the same MC. But if you drag one of the instances away from the others, it won't blink with the rest. It's just when you have 2 or more on the same _x value.
I just can't explain it. No idea at all why this is happening. Can anyone else figure it out, or even have a theory of what could be happening? Any help is greatly appreciated. Please not I'm using Flash 5.
~ XSDamaj - Multimedia Developer
Can Anyone Figure This Out?
on (release) {
if (bfname eq "" or blname eq "" or bmessage eq "" or bemail eq "") {
stop();
} else {
if(_root.purchase.getState()) {
var iwouldliketo = "I would like to Purchase";
}else {
var iwouldliketo = "I would like to Rent/Lease";
}
if(_root.signmeupnews.getValue()) {
var signmeupnews = "Sign me up for your newsletter";
}else {
var signmeupnews = "Dont Sign me up for your newsletter";
}
var temparea = new String(_root.<b>area</b>.getSelectedItem().label);
var <b>areaofinterest</b> = temparea;
loadVariablesNum("buyers.php", 0, "POST");
gotoAndStop(2);
}
}
for "areaofinterest" no matter what I do it always seems to send a blank back to PHP..
If i put a trace(temparea) instead of assigning it to "areaofinterest" i get the right value when I test within flash.. but when I do it on the server it sends a blank.. what's the problem here?.. i just can't figure it out
Just to clarify
"area" is the name of my combo box which I'm using to get the selected item.
Thank you kindly in advance
I Can't Figure This Out...
Hi, I need help to do the following:
I have a movie clip named "selectbox" that has been masked and I intend to scroll. I've set up my up and down buttons to point to a movie clip called "scrolltrigger" which will provide continous scrolling. I've got all that covered, no problem, what I'm wondering is how I do this:
I want to attach to one frame, which I have labeled "scrollDown" in the scrolltrigger movie clip, the actions to do the following:
to check the height of the "selectbox" movie clip, and, if it's exceeded (and only if it has exceeded) say, 200pixels, allow it to be scrolled down.
I then want to attach to one frame, which I have labeled "scrollUp" in the scrolltrigger movie clip, the actions to do the same, except scroll up.
that I have been able to do, but this is where I run into a problem:
The "selectbox" movie clip can have a different height as it is a menu system with submenus and depending on what menus are open, it could be different height, so I need it to check in some sort of consistensy, so that when the person opens enough menus in my "selectbox" clip, it allows him to scroll to see them.
I also can't figure out how to get the movie to stop, and not scroll right off the screen and off into oblivion if you hold the scroll buttons down for a little while.
Thanks for any help, I really appreciate it, I have been searching and trying things for about a week now, with little luck...
See If You Can Figure This Out
Ok heres the problem:
I am making a space invaders game. I am at the stage where I need enemies to fall down the Y axis. I got that working but there is a problem. I want to set a maximum(or random) number of enemies allowed on the stage at once. How would I go about doing that?
Heres my code creating the enemies. What do I need to add to make it so only say 10 enemies are allowed on the stage. When one is hit, and removed another will fall and so on.
numEnemy=10;
for (i=2; i<=numEnemy; i++){
enemy1.duplicateMovieClip( "enemy"+i, i+100 );
}
Can Someone Figure This Out?
Hi...
Ok...I have a radar screen that has a bunch of blips on it that represent countries, and I have it so that when you press or rollover the countries there is a list of projects that drop down....
here's the problem...unfortunately because the countries are so close together (to be able to fit them all) , when the user rolls over , I think that the hit states are getting confused because they are crossing over each other, I think...anyway does anyone have a suggestion on how to alleviate this problem? My hit areas for the buttons are are very exact to cover the text...would I be better off having the project names appear in a separate window...don't know....
anyway...take a look
http://www.spacelighttime.com
Gah I Can Never Figure This Out
code: on (press){
attachMovie("ball", "ball"+1, 1)
_root.speed += .1
_root.speedz += .1
}
on(release){
_root.("ball"+1).gotoAndPlay(4)
}
gah it gives me error everytime
i cant figure out how to use attached or duplicated mcs im so dumb
I Cant Figure Why Its Doing This
ok i have music going in the background of my movie and it works all fine when i export it and play it. but i uploaded it to a website and now when it plays on the site, it doesnt play the music. is there some command i need to like include the mp3 with it or what?
I Cant Figure This Out And Its Due In A Day
I can't believe I am asking this, but why doesn't this button I made work? The button is in a mc and when I do the whole gotoandplay thing it doesnt work! It has always worked for me! I have attached a copy of the file below. Please email me at littleguy5490@yahoo.com. I need the first button (day 2) to goto the first frame after the index. I am grateful for whater you do!
PS: I think all I need is the thing that says "root", but I dont know the script
Can't Figure It Out
Dont know what's the problem, i have to SWF's, one main and the other is called main 2, all i want is when I click a button on the main swf it will go directly on the 3rd scene frame 56 of main 2...
this is what i used...
on (release) {
loadMovie("contents/intro.swf", "_root.mc");
tellTarget ("_root.mc") {
gotoAndPlay("scene 3", 56);
}
}
the problem is it keeps playing on the first scene on the main 2.swf..
thanks for the help...
I Can't Figure It Out
Hey guys!
I am working on a new project and I am running into some problems... However, I have no idea where the problem is and can't get past it.
I have included a zip file with all the files needed for this prob.
The problem:
In my program, there is a loop running constantly in a movie clip (called Checker2) that checks a file to see if the variable menuoption becomes anything other than "blank"
As soon as it does, it runs a set of actions that should do the following things:
mo = _root.menuoption; //saves the value of menuoption which is now "image"
_root.menuoption = "blank"; //resets menuoption to avoid looping
loadVariablesNum("menudata.txt", 0, "POST"); //changes the file, so it says "blank" again, to avoid looping
switch (mo) {
case "image" :
_global.count = _global.count+1; //a counter which now equals 1
_global.filename = _root.filetoload; //stores the name of the file (this value was loaded and is now "shopy.jpg"
_global.objects[_global.count] = "image"+_global.count;
_root.attachMovie("newimage",_global.objects[_global.count],_global.count);
loadMovie(_global.filename, _root[_global.objects[_global.count]].clip);
stop();
break;
}
}
"newimage" is a movieclip with actions to be performed on a movieclip instead of "newimage" called "clip"
If I put a box inside of the "clip" and put a instance of "newimage" on the stage to start, then the actions work.
However, the actions don't work on the image after it's loaded.
I hope this doesn't sound too confusing, it will help to look at the file I think.
Also, what is the best way to write to, or change a text file from flash?
Thanks!
Figure This One Out
Can anybody tell me or fix this? Why doesn't the last 2 tabs work like the first 4? The scripts are identical! I'm going nuts over this. HELP!
download zip file
Figure This One Out
Can someone out there take a look through this script and see if something's out of whack. I've been working on it for hours, troubleshooting, trying to find out what's wrong and I can't figure it out. I've retyped the code and still nothing. It belongs to a "next" movie clip, which has a photo gallery go to the next set of images. The "previous" movie clip works perfect, but I can't get this one figured out. Thanks for any help. I've also uploaded the .fla file if you want to take a look.
_root.myMovieClip.myMovieClipChild.onRelease=funct ion(){
if(_root.myMovieClip._currentframe>0 && _root.myMovieClip._currentframe<5){
_root.myMovieClip.gotoAndStop(5);
}
if(_root.myMovieClip._currentframe>4 && _root.myMovieClip._currentframe<10){
_root.myMovieClip.gotoAndStop(10);
}
if(_root.myMovieClip._currentframe>9 && _root.myMovieClip._currentframe<15){
_root.myMovieClip.gotoAndStop(15);
}
if(_root.myMovieClip._currentframe>14 && _root.myMovieClip._currentframe<20){
_root.myMovieClip.gotoAndPlay(1);
}
}
Can't Figure This Out...
The following is all located in the first frame of my main movie, not in a mc.
I'm pulling in .jpg's and descriptions via XML.
I would like to have this work on a time delay (as soon as the page loads) instead of using buttons as it is currently set up. Can anyone help. I'm not a regular Flash user...
thx --rich
slides_xml = new XML();
slides_xml.onLoad = startSlideShow;
slides_xml.load("slides.xml");
slides_xml.ignoreWhite = true;
//
// Show the first slide and intialize variables
function startSlideShow(success) {
if (success == true) {
rootNode = slides_xml.firstChild;
totalSlides = rootNode.childNodes.length;
firstSlideNode = rootNode.firstChild;
currentSlideNode = firstSlideNode;
currentIndex = 1;
updateSlide(firstSlideNode);
}
}
//
// Updates the current slide with new image and text
function updateSlide(newSlideNode) {
imagePath = newSlideNode.attributes.jpegURL;
slideText = newSlideNode.firstChild.nodeValue;
loadMovie(imagePath, targetClip);
}
//
// Event handler for 'Next slide' button
next_btn.onRelease = function() {
nextSlideNode = currentSlideNode.nextSibling;
if (nextSlideNode == null) {
break;
} else {
currentIndex++;
updateSlide(nextSlideNode);
currentSlideNode = nextSlideNode;
}
};
//
// Event handler for 'Previous slide' button
back_btn.onRelease = function() {
previousSlideNode = currentSlideNode.previousSibling;
if (previousSlideNode == null) {
break;
} else {
currentIndex--;
currentSlideNode = previousSlideNode;
updateSlide(previousSlideNode);
}
};
If You Can Figure This Out, You Are A God
I have this code on frame 1 of my movie:
__________________________________
Movieclip.Prototype.rotacion = function(DISTANCIA, RADIO, TAM, centro_x, centro_y) {
if (init != 1) {
x = RADIO;
y = 275;
z = 0;
}
init = 1;
direccion = (_root._xmouse>centro_x) ? -1 : 1;
velocidad = Math.abs(_root._xmouse-centro_x)*0.04;
axis = (_root._ymouse-centro_y)*0.01;
theta = theta+(direccion*velocidad);
y = Math.sin(theta*(Math.PI/-180))*RADIO*axis;
x = Math.cos(theta*(Math.PI/-180))*RADIO;
z = Math.sin(theta*(Math.PI/-180))*5.5*RADIO;
per = DISTANCIA/(DISTANCIA+z);
xp = x*per;
yp = y*per;
TAM_p = TAM*per*2;
this._x = centro_x+xp;
// this._y = centro_y-yp;
this._xscale = this._yscale=TAM_p*2;
this._alpha = this._xscale-160;
this.swapDepths(this._xscale*10);
};
Movieclip.prototype.movimiento = function(md, ym, arriba, abajo) {
yp = this._y;
if (yp<arriba) {
cambioy = Math.random(((md*2))+1)-(md/2);
} else if (yp>abajo) {
cambioy = Math.random(md)-(md*2);
} else {
cambioy = Math.random(((md*2))+1)-md;
}
yv = cambioy+yv;
if (yv>ym) {
yv = ym;
}
if (yv<(ym*-1)) {
yv = ym*-1;
}
this._y = yp+yv;
};
for (i=1; i<=6; i++) {
cerdito.duplicateMovieClip("cerdito"+i, i);
_root["cerdito"+i].theta = (360/6)*i;
}
_root.cerdito._visible = 0;
s = .80;
d = 0.9;
desplazamiento_x = 100;
desplazamiento_y = 100;
t = 1;
tf = 1.0;
stop();
__________________________________
I also have an empty movieclip on frame 1 with these actions attached to it:
__________________________________
onClipEvent (enterFrame) {
for (j=1; j<=6; j++) {
_root["cerdito"+j].rotacion(1200, 150, 100, 375, 275);
_root["cerdito"+j].movimiento(.5, 3, 100, 300);
}
}
___________________________________
I also have a movieclip symbol on this frame with these actions attached to it:
___________________________________
onClipEvent (enterFrame) {
c = getTimer()/100;
or1 = 40*Math.sin(.9*c);
or2 = -40*Math.sin(.9*c);
this.n.o1._rotation = or1;
this.n.o2._rotation = or2;
}
onClipEvent (enterFrame) {
if (_root.doYourThing == 1) {
this._y += (ypos-this._y)/7;
}
}
___________________________________
The second onClipEvent action for this last movieclip is used for something later in the movie.
--- My question is that all this works when I publish as Flash 5, but when I publish as Flash 6 it doesn't work, they all overlap each other instead of being spread out. What do I have to change to make it work with Flash 6? You can test out these scripts to see what I'm talking about. If you publish as Flash 5 you will get what I want. If you publish as Flash 6, you will see what I mean. How can I get this to work being published as Flash 6? What do I have to change? If anyone can help me figure this out... you are a Flash God!
-- Thanks for any help
Kyle
Okay - Try To Figure THIS One Out....
Here's the situation - it really makes no sense to me at all...
So I had this Flash file I was working on in MX. It had a whole bunch of large pictures in the library, and the FLA ended up being about 4MB, and the SWF was abou 500k. Since I was using this on the web, that was WAY too large, so I posted the big pics on a server. Then, I went in Photoshop and shrank all the pics down REALLY small (so they were like icons), and imported THOSE into the library of the FLA. I put these "icons" on the page, and just had the big pics load up off the server when the mouse was rolled over the respective icon, so as to get the file size down.
Now, since I didn't need those "big pictures" in the library anymore (cuz they were loading off a server), I deleted them from the library. My attempt at decreasing the size of the SFW worked beautifully, as I got it down to a 36k file, but for some reason my FLA is now 10 MB!!! I like to keep my source FLAs on a web server too, but I only have 20MB of space total, so I don't want to take half of it up with a FLA. But the whole thing doesn't make sense - why would my file have shot up to 10MB after I deleted all teh big pics from the library?!? Any ideas (or help as to what I can do to get the file size of the FLA down?)....
Incidentally, to see visually what I'm talking about that I did, go to http://www.PauliesPortfolio.com/ and click on the "paintings" link - that's the SWF that I shrank down, but the FLA is huge.....
Can't Figure This Out
i have a ball movie clip inside another dragball movie clip. the ball is one where you can drag around and throw, and you can also change the direction of the gravity. the ball is supposed to maintain the current x and y calues when it changes direction, but it is not doing that. any help is appreciated
i have been trying to figure this out for 2 days, and it's driving me insane. it will probably turn out to be one of those things where the answer is right there, but you just keep overlooking it, if you know what i mean. but yea, thanks for your help.
Still Trying To Figure This Out
I posted a portion of this code before but didn't get any responses. I thought I would try it again with all the code. I didn't want it to be too complicated for someone to check out, but I really need help. This is a portfolio section that shows posters. I have some buttons "BtnMC" that appear - 1 for every 5 items in my array. When I click on a "BtnMC" it goes to a 2nd clicked state and brings up 5 thumbnail images "tNailMC". If I click on a "tNailMC" that will bring up a large version of the image. The problem is that once I click on a "tNailMC" then click on another "BtnMC" then try "tNailMC" again, the larger images don't come up anymore. I hope someone can help, I have no idea what to do.
Code:
stop();
// Thumbnail set-up and loading
for (k=1; k<=posterArray.length; k++) {
_root.attachMovie("tNailMC", "tNailMC_"+k, 0-k);
with (eval("tNailMC_"+k)) {
tiny1.holderMC.loadMovie("posters/posterTs/"+_root.posterArray[k-1].tnail, "", 2);
tiny1s.holderMC.loadMovie("posters/posterTs/"+_root.posterArray[k-1].tnail, "", 2);
_x = -500;
_y = 230;
}
}
// tNail buttons
_root.onEnterFrame = function() {
for (k=1; k<=posterArray.length; k++) {
with (eval("tNailMC_"+k)) {
trace ("k = "+k);
tnailWidth = getProperty(tiny1.holderMC, _width);
tiny1.holderMC._x = tnailWidth/2-tnailWidth;
tiny1s.holderMC._x = tnailWidth/2-tnailWidth;
t1.tButton.onRelease = function() {
trace ("tButton onRelease ");
p = parseInt(this._parent._parent._name.substr(8, 2));
trace ("p = " + p);
_root.createEmptyMovieClip("bigPoster", 5000)
_root.bigPoster.loadMovie("posters/"+ _root.posterArray[p-1].image, "", 2);
_root.attachMovie("shadowMC", "shadowMC", 4999)
_root.onEnterFrame = function () {
posterWidth = getProperty(_root.bigPoster, _width);
posterHeight = getProperty(_root.bigPoster, _height);
_root.bigPoster._x = 457 - posterWidth/2;
_root.bigPoster._y = 210 - posterHeight/2;
_root.shadowMC._x = 467 - posterWidth/2;
_root.shadowMC._y = 220 - posterHeight/2;
_root.shadowMC._width = posterWidth;
_root.shadowMC._height = posterHeight;
}
}
}
}
};
// Number buttons created
for (h=1; h<=Math.round((posterArray.length/5)+.4); h++) {
_root.attachMovie("BtnMC", "Btn"+h, h+1000);
eval("Btn"+h).noText = h;
with (eval("Btn"+h)) {
_x = h*20-10;
_y = 240;
}
// Number buttons state A set-up
eval("Btn"+h).BtnA.onRelease = function() {
i = parseInt(this._parent._name.substr(3, 2));
eval("Btn"+i).gotoAndStop(2);
if (currTNailInit) {
for (j=0; j<currTNailArray.length; j++) {
eval(currTNailArray[j])._x = -500;
}
}
// 5 tNails moved into position from BtnA
with (eval("tNailMC_"+(i*5-4))) {
_x = 40;
currTNailArray[0] = "tNailMC_"+(i*5-4);
_root.currTNailInit = true;
gotoAndPlay(1);
}
with (eval("tNailMC_"+(i*5-3))) {
_x = 90;
currTNailArray[1] = "tNailMC_"+(i*5-3);
gotoAndPlay(1);
}
with (eval("tNailMC_"+(i*5-2))) {
_x = 140;
currTNailArray[2] = "tNailMC_"+(i*5-2);
gotoAndPlay(1);
}
with (eval("tNailMC_"+(i*5-1))) {
_x = 190;
currTNailArray[3] = "tNailMC_"+(i*5-1);
gotoAndPlay(1);
}
with (eval("tNailMC_"+(i*5))) {
_x = 240;
currTNailArray[4] = "tNailMC_"+(i*5);
gotoAndPlay(1);
}
}
// Number buttons state B set-up
eval("Btn"+h).BtnB.onRelease = function() {
Bi = parseInt(this._parent._name.substr(3, 2));
eval("Btn"+Bi).gotoAndStop(2);
if (currTNailInit) {
for (j=0; j<currTNailArray.length; j++) {
eval(currTNailArray[j])._x = -500;
}
}
// 5 tNails moved into position from BtnB
with (eval("tNailMC_"+(Bi*5-4))) {
_x = 40;
currTNailArray[0] = "tNailMC_"+(Bi*5-4);
_root.currTNailInit = true;
gotoAndPlay(1);
}
with (eval("tNailMC_"+(Bi*5-3))) {
_x = 90;
currTNailArray[1] = "tNailMC_"+(Bi*5-3);
gotoAndPlay(1);
}
with (eval("tNailMC_"+(Bi*5-2))) {
_x = 140;
currTNailArray[2] = "tNailMC_"+(Bi*5-2);
gotoAndPlay(1);
}
with (eval("tNailMC_"+(Bi*5-1))) {
_x = 190;
currTNailArray[3] = "tNailMC_"+(Bi*5-1);
gotoAndPlay(1);
}
with (eval("tNailMC_"+(Bi*5))) {
_x = 240;
currTNailArray[4] = "tNailMC_"+(Bi*5);
gotoAndPlay(1);
}
}
}
Please Help Me To Figure It Out...
Please help! I can't get it work...
_root.onEnterFrame = function () {
if (_root.mc1.callm1 == true) {
myText.text = "call 1";
}
else if (_root.mc2.callm2 == true)
myText.text = "call 2";
else {
myText.text = "not yet";
}
}
There are 2mcs on the stage ( mc1 and mc2 ) each contains following action:
mc1 on frame(15):
this.onenterframe = function() {
callm1 = true ;
}
mc2 on frame(30):
this.onenterframe = function() {
callm2 = true ;
}
Flash read only function related to mc1, the one related to mc2, isn't executed...
If anyone could explain me why it doesn't work in that way and suggest some better solution that would be great!
the whole example in .fla
Please Help Me To Figure This Out
I have a movieclip(clip_01) in the timeline. Inside this movieclip I have 2 buttons + an animation to minimize one more movieclip( clip_02) which is inside clip 01.Inside clip_02 I have 2 set of pictures whit back an next buttons.The first set of pictures is pic 01,02 and 03, the second set of pictures is pic 04, 05 and 06. Everything works well except for this, when I minimize the window from the second set of pictures it goes to the first set of pictures. How can I figure this out?. Probably I am not very clear wiht my problem that's why I attach the file here so please take a look at the file and help my to resolve this.
Thanks.
Can Anyone Figure This Out?
i found this excellent script afew years back on Flashkit.
Anyhow it goes beyond me on how to modify it.The problem i am having is that i need to change the dimensions of this file from what they are currently in this attached FLA to new dimension:
760 w by 500 H
When i do this the thing stops working.If anyone would be able to fix this for me and mail me the FLA i would greatly appreciate it!!!!Just cant get my head in around this one.
Also another thing that would of course look better is to change the spacing of the 4 button-names.There used to be 6 total and now when i removed two the carousel effect kind of gets ruined as their is a space now...if this gap could be removed that would be fantastic.
Thanks very much and hopefully someone can help me out on this one asap.
Cheers!
chris
ps.If you could kindly email corrected FLA to chris.champagne@vistakuva.fi
Try To Figure This One Out, Anybody?
Hi there, just got my site done, well sort of and luploaded it to my server etc. However, I am getting an odd bug. In IE my site navigates a heck of a lot slower than in Safari browser. Also, the biggest problem is that in my portfolio section the "Launch" and "screenshots" buttons only work on a select few in IE, but ALL work in Safari. I have cleared my cache in both browsers and restarted numerous times. I even tried it on my roomates PC and got the same problems with IE there.
Any advice to getting my site to move smoother to would be appreciated. I have all swf's used in the sites creation at 30 fps and the largest swf file is only like 20 k.
AHHHHHH, I'm going nuts, someone please help me.
You can view my live site at: http:www.craigmstudio.com
&
On the "launch" and "screenshots" buttons is the following code:
on (release) {
address = "http://www.craigmstudio.com/dvd_stills.html";
target_winName = "Late Night DVD";
width = 800;
height = 600;
toolbar = 0;
location = 0;
directories = 0;
status = 0;
menubar = 0;
scrollbars = 1;
resizable = 0;
openWinCentre(address, target_winName, width, height, toolbar, location, directories, status, menubar, scrollbars, resizable);
}
--------------
Thanks ahead of time...
Can Figure This One Out?
Here is the deal. I put this site www.mgtrainer.com and the scrollbars dont seem to function on load. Now when I test it locally everything works fine. I intially created it in Flash MX and have since migrated over to 2k4. However if I press a button a second time to refresh the section, the scrollbars function. Does anybody out there have a clue for me?
-Help!
|