I Hate Flash Video...
im using the flv player component and set the content path in the params panel to a video..it plays fine. I then have an array of videos and a list to choose from..when you click on the list it chooses a video from the array, however its not setting the content path correctly..it keeps using the one that I sent in the params panel..If I remove the contentPath from the params panel it says unable to contact flv on server or something like that...heres my code.. PHP Code:
stop();var numButtons:Number = 7;import com.mosesSupposes.fuse.*;ZigoEngine.simpleSetup(Shortcuts,PennerEasing);tcDisplay.autoSize = true;var vidList:Array = new Array("intro.flv","responsibility.flv","postvention.flv","prevention.flv","intervention.flv","maintaining.flv","credits.flv");for (var i = 1; i <= numButtons; i++) { this["link" + i].id = i; this["link" + i].onRollOver = function() { this.txt.colorTo(0x4D80B7,0.3,"easeOutExpo"); }; this["link" + i].onRollOut = function() { this.txt.colorTo(0xFFFFFF,1.5,"easeOutExpo"); }; this["link" + i].onRelease = function() { loadVid(this.id); }}function loadVid(itemID) { vidPlayer.stop(); vidPlayer.contentPath = vidList[(itemdID - 1)]; vidPlayer.play();}
if I trace out vidList[(itemdID - 1)] in the loadVid function, its tracing the correct path name, its just not setting it...any ideas?
KirupaForum > Flash > Flash 8 (and earlier)
Posted on: 12-14-2007, 02:03 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Ok I Hate Flash Help
ok i put my website online
and it works fine on my computer when i preview it in preview mode in flash mx, but than when i put it into html and upload it to my server it doesnt want to load the scenes
www.djzyx.com
you cant click on news/music/contact
SOMEONE HELP!
thanks
I Hate Flash MX. Help Please
I have been using Flash since about 99 and got on fine. I have now upgraded to Flash MX and I can't get anything to work. It's hell.
After spending all day trying to get a simple movie together I need a loading script. A REALLY REALLY simple one. I want it to just say loading and a percentage. I had loads I could use before, but they don't seem to work in MX.
Please someone point me in direction of a simple, REALLY SIMPLE, loader. With REALLY SIMPLE script that I can understand. I am tearing my hair out.
This Is Why I Hate Flash
I can get Flash to do amazing things, but trying to do ridiculously simple things like targeting & evaluating variables, or controlling A SIMPLE MOVIE kill me.
All I'm trying to do is get a MC (named "dork" placed on the root) to stop and start.
on Frame 1 of the root:
Code:
stench = getProperty(dork,_currentframe);
Frame 5:
Code:
gotoAndPlay(1);
a stop button on the root:
Code:
on (press) {
//dork.gotoAndStop(eval(_root.stench)); // doesn't work
dork.gotoAndStop(_root.stench); // doesn't work
//dork.gotoAndStop(10); // works
trace (_root.stench); // works
}
I Now Hate Flash Even More
Could designers remember that not everyone can see flash files? My computer was raided by a mob of spyware/virii/trojan horses that infected half of all *.dll I had and now I can't see flash files. The worst thing is, I can't see the websites either.
Yeah, I know I have to re-format my computer and stuff but for Christ's sake, can we keep it to a minimum? I want to know stuff too
Asp And Flash Hate Each Other
All I need to do is import one variable into flash(5) from asp (mySQL database). if frame one
loadVariablesNum ("marquee-bar.asp", 0);
gotoAndPlay (2);
in frame 3:
if (marquee == ""){
gotoAndPlay (2);
}else{
gotoAndPlay (4);
}
and in frame 4:
if (marquee != ""){
_root.marquee.value = marquee
}
stop()
note: I name an MC with the instance name "marquee" and a dynamic text field in it named value
Ok, my database system is a little complicated, but it biols down to this:
marquee = "No information today."
response.write "&marquee=" & Server.URLEncode(marquee) & "&done=true"
in the flash file _root.marquee.value gets set to "
I've scowered the net, and this seems to be a reasonable method... what an I doing wrong?
Case: Of I Hate Flash Sometimes When .....
I'm writing a simple little switch statement, should take five minutes when Flash decides to be a pain in the ass and kick out unexpected errors
Heres the code.......
===========================================
switch(month){
case 01:
month = "Jan";
break;
case 02:
month = "Feb";
break;
case 03:
month = "Mar";
break;
case 04:
month = "Apr";
break;
case 05:
month = "May";
break;
case 06:
month = "June";
break;
case 07:
month = "July";
break;
case 08:
month = "Aug";
break;
case 09:
month = "Sep";
break;
case 10:
month = "Oct";
break;
case 11:
month = "Nov";
break;
case 12:
month = "Dec";
break;
}
================================================== ===
and heres the error message ....
Symbol=loginmc, Layer=actions, Frame=5: Line 24: 'case' statements must be terminated with a ':'
case 08:
Well it looks like a : to me!!!
So around case 08 theres an error so I've removed it 09 is also wrong ... 01 to 07 are fine! I copied and pasted all of the case statements and altered the number and month so if one works all should work!!!
Thanks for reading this ... any ideas???
Am I only allowed to use seven case statements ??
If you didn't laff you'd be crying buckets.
I Hate The New Flash Program
I just got flash mx 2004, and I started building my site as normal. I have it all planned out, which button does what, where it goes, and so on. However, when I tested my flash just to make sure everything was in order, the output popped up with errors for all of my buttons. I've been reading a flash mx book to try and figure this problem out, but there is nothing in here about button navigation within a flash. Please download this file and see what I'm talking about, if you think you can help.
If There Is One Thing I Hate About Flash....
It's the actionscript....
I'm not extremely horrible until it comes to using actionscript....
I have a video, i think when I uploaded it to a site it was about 1.13MB....
I decided using a preloader for it would be best....
So I used a tutorial and made a preloader, got the code...
But my problem is, the preloader is in scene 5 (a lot of messups, so I removed the scene and then inserted a new scene to start over new....)
How do I get the preloader to load and then play scene 1?
Thanks in advance....
Why Does Flash Hate Me? (error)
So i have this movie clip. And in this clip theres 2 buttons that are visible at 2 diffrent times. Anyway, the first button, you click and has this code:
tellTarget("/news"){
gotoAndPlay(2);
}
the 2nd button has this code:
tellTarget("/news"){
gotoAndStop(1);
}
HOWEVER, when i click the first button everything goes perfect. Now when i click the 2nd button i get this error message:
Target not found: Target="/news" Base="?"
What is going on?
I'm Starting To Hate Flash MX
I do EVERYTHING on the tutorial to fade text and the stupid crap won't fade. It just appears! I did EVERYTHING! What do I do?! Please help!
I Hate Flash Sometimes, But Need Someones Help
Heres the files:1,2
Problem is i want one movie to play then, load another when its finished playing, but the code ive used isnt working, any ideas?
p.s my site is nearly finished, so i wont be bothering you much longer!!
I Hate Text In Flash
Hey,
Don't get me wrong I love flash. It is doing everything I want beautifully, but ever since actionscript 2.0 has been around I loath using text in flash.
I had the same problem as I am having in the first versions of AS2 but Im making this in AS3!
Ok so apart from struggling with the randomostiy of flash text rendering I finally got it acting how I wanted (just by flipping every switch till it worked).
So I need some HTML text because I want to include hyperlinks and text colour changes WITH text that has been loaded externally. Currently I have the problem that the hitbox around the hyperlinked text is far below the actual visual line of text.
The only work around I can think of is by creating some script that makes an invisible button over the exact text, but this is going to be a nightmare to do! The main source of the problem I suspect lies within the font itself as it is a custom font I made but probably did not compile properly. I do not know if other people have similar problems as this but its damn annoying as everything else works brilliantly.
EDIT: I just tried this with a non-embeded Aerial font and I have the same problem.
Thanks for reading/helping,
Dan
Please Don't Hate Me (Flash And HTML)
What kind of HTML code do I use to make a .swf show up on a website?
I've been making these things, giving them to people for sites, but I've never done it on my own. Eeeeep.
10 Things I Hate About You, Flash
"10 Things I Hate About You, Flash"
Rants and ramblings of a front-end developer
I hate how you give me the freedom to express my visions.
I hate how you work on every browser, on every platform.
I hate how you are not bogged down by a dinosaur-paced standards committee. F-you.
I hate how you push the boundaries of the web: video, games, and all.
I hate how you have grown, from motion-tweens to paper visions.
I hate your FLEXibility. Get out! Leave my boring desktop alone!
I hate that your code works. I want my bugs back. Now.
I hate how you have invaded 98.9% of browsers worldwide. F-off.
I hate how you can work with databases, XML, and how you can be a full-blown CMS.
but most of all, I hate the fact that I can never truly hate you, because in all the chaotic, unorganized, everybody-for-himself culture prevalent in the web today, you, dear Flash, still works...
...just like you say you would.
</end of rant>
I Hate Music In Flash
i am, yet again, having trouble with my music player in flash. I have a mp3 player thats loads the songs from a txt file. when i play the music by it self in a standalone swf. it plays fine (except i cant loop the music/another problem) but when i play it within the swf i m loading it in it cant seem to find the file to play.
fla is downloadable at www.lincolneather.com/DrewAndo/AS.zip
thanks for your help
i have gone thru kenny beelw too.
Flash Security, I Hate It
Ok, my plan was to make a half way dynamic menu that uses the loadVariables() function to get it's variables from a text doc. Example-
ActionScript Code:
loadVariables("loadVar.txt", _root)
button1.onRelease=function(){
getURL(button1URL, "_self")
}
The text document contains button 1's label, and it's URL, button1URL.
This works great, until you get it into a browser, then the security alert comes up and won't work until you list the site as trusted. I don't understand why it blocks a simple getURL(). Is there a way to get past it?
[F8] Does Anyone Else Hate Using MySQL Databases With Flash?
It always seems like theres so much information to be lost in translation if you get really involved with it.
I'm doing a project that uses it like every two seconds.. Every piece of information is taken from a database basically... It just seems like theres so much room for error with the whole SendAndLoad method...
Whats the easiest way to mess with a database?
Ooo I Hate FLASH, Button Problem
This is the problem:
I have a button.
In the button, over state contains move clip (movieclip1). In the movie clip is TextBox (mytext)
How can I access to mytext and change its value.
I tried (from root) moviclip1.mytext="something" but it's not working.
The idea is to animate custom text when button is in over state. It seems to me that button somehow in combination with movie clip (inside the button) causing that mytext variable is invisible (can't change its value).
I believe I could work around this problem: create movieclip1, place button in this clip, then place another movieclip2 in this clip that will do text animation, and from button execute movieclip2, BUT... why above exemple does not work?
Will we ever get rid of this crappy software?
ARG I HATE FLASH MX *belts Head On Table*
Hi!
I have a question for the geniuses of the flash world.
I import a graphic(JPG) into FlashMX
and i fix the quality to 100(max)
and the import is perfect...exactly like the original
but when i convert it into a symbol (button),time button has a "crink" in it...
can anyone explain why? and a solution PLEASE...hopefull before my computer becomes a garden ornament
Thanks in advance
SF
I Hate The Way Flash Just Seems To Distroy Math Formulas
ok You all know the formula y = mx+b, flash seems to hate it
To run this code you will need a black bacground and a MC with the AS export name of ng.
ActionScript Code:
_global.Slopes = [];function mapEngine() { firstTurraneX = Math.random()*100; firstTurraneY = 250; moveTo(0, 250); do { slY = firstTurraneY; slX = firstTurraneX; firstTurraneX = firstTurraneX+250-Math.random()*200; ifNumber = Math.random()*50; if (ifNumber>25) { firstTurraneY += Math.random()*100; } else { firstTurraneY -= Math.random()*100; } lineStyle(1, 0xFFFFFF); lineTo(firstTurraneX, firstTurraneY); slKey = (-firstTurraneY+slY)/(-firstTurraneX+slX); combo = {slope:slKey, xBig:firstTurraneX, xSmall:slX, bSetter:slY}; Slopes.push(combo); } while (firstTurraneX<500);}var test = mapEngine();Slopes.reverse;na = attachMovie("ng", "k", 100);na._y = 250;_global.i = 0;_global.B = 250onEnterFrame = function () { na._x++; M = Slopes[i].slope; gX = Slopes[i].xBig; lX = Slopes[i].xSmall; na._y = M*na._x+B; if ((na._x>gX)) { i++ B = na._y trace(B); }};
as you can see it jump arround more than a mexican bean, so any help would Gravely help me
Thanks In Advace
Hi-Nu
I Hate The Way Flash Just Seems To Distroy Math Formulas
ok You all know the formula y = mx+b, flash seems to hate it
To run this code you will need a black bacground and a MC with the AS export name of ng.
ActionScript Code:
_global.Slopes = [];function mapEngine() { firstTurraneX = Math.random()*100; firstTurraneY = 250; moveTo(0, 250); do { slY = firstTurraneY; slX = firstTurraneX; firstTurraneX = firstTurraneX+250-Math.random()*200; ifNumber = Math.random()*50; if (ifNumber>25) { firstTurraneY += Math.random()*100; } else { firstTurraneY -= Math.random()*100; } lineStyle(1, 0xFFFFFF); lineTo(firstTurraneX, firstTurraneY); slKey = (-firstTurraneY+slY)/(-firstTurraneX+slX); combo = {slope:slKey, xBig:firstTurraneX, xSmall:slX, bSetter:slY}; Slopes.push(combo); } while (firstTurraneX<500);}var test = mapEngine();Slopes.reverse;na = attachMovie("ng", "k", 100);na._y = 250;_global.i = 0;_global.B = 250onEnterFrame = function () { na._x++; M = Slopes[i].slope; gX = Slopes[i].xBig; lX = Slopes[i].xSmall; na._y = M*na._x+B; if ((na._x>gX)) { i++ B = na._y trace(B); }};
as you can see it jump arround more than a mexican bean, so any help would Gravely help me
Thanks In Advace
Hi-Nu
I Hate Fonts - All Font Variations Not Showing In Flash Menu
Hi folks
This same subject has infuriated me for ages, but ive managed to 'muddle' through.
In our company all the visual designers use Macs and pepper the designs with font light dark italic you name it they use it if they can. Whilst all the authors/coders/developers are on PC.
However when importing the the font onto my PC for flash development some strange things happen and always have.
I am no expert on fonts never have been, never profess to be and never want to be - so please excuse my ignorance.
1 the fonts dont show in flash - can anyone tell me why this is
e.g. i have installed DIN light, dark and regular yet in flash only DIN displays yet it asks for the others
2 when i check in the windows fonts the DIN fonts imported although showing up as true type have one of two file icons
(i) like an italic green O
(ii) two T's overlaid one blue one green
Could this be the route of my problem.
Can i resolve this in flash and how as it is driving me up the wall.
And no clever answers about Macs and PCs please both have their uses.
Thanks
J
Flash Player "please Don't Hate Me"
Ok I know it has been asked 100 times on this forum but I cannot find it (I know search is fixed, but you just ever had one of thos days where you can't figure out whether are um...oh yeah my problem)
Anyway can some one please just point me to where I can have it built into the code to load the flash 8 player if the user doesn't have it..many thanks
"please don't hate me I really need a hug today" :oops:
Don't Hate Me Because I'm...
a newbie!
Hello,
I'm very new to Flash and getting no-where fast. If anyone can suggest the best place to start and maybe some detailed tutorials, I'd appreciate it. I've found several tutorials but they seem to think I know what I'm doing!
Anyway, in the meantime, I'm using the 'Swifty' font to try to create a man walking across the stage. My question is, do I convert the font to a symbol before adding any effects?
Thanks...
I Hate This
I can't figure this stuff out can someone help me?
I have a button with the action
on (release)
{Trigger1a = true}
and on the layer that button is on, I have:
var trigger1a = false;
and on a movie clip in the bottom right corner I have the actions:
onClipEvent (enterFrame) {
if (_parent.trigger1a and this._y > 368) {
this._y -= 20;
this._x -= 20;}
So, this all makes the MC move to a certain spot when you click the botton. but how would I make it so that when you click the button again, it makes the MC move back to its original position??
I'm really new to this Action Scripting stuff (like 2 days new) and everything I think should work never does.
Your Going To Hate Me But..
yes another scrollpane border question..
I've looked through every post on this subject.
I've tried all of the combinations of code out there but no none of them seem to work.. i cant get the border to go away AT ALL.. Below are all of the code that i tried (one at a time of course) i've inserted them into the first frame of the layer or the keyframe where the scrollpane starts. ANY ideas? i cant figure it out.. im using flash v8 actionscript v2.0 (my scrollpane doesnt work with A.S. 1.0.)
UIObject.borderStyle = "none";
ScrollPane.setStyle("borderStyle", "none");
mx.containers.ScrollPane.setStyle("borderStyle", "none");
_global.style.ScrollPane.setStyle("borderStyle", "none");
this.scrollPane_mc.setStyle("borderStyle", "none");
this.scrollPane_mc.boundingBox_mc._visible = false;
myColor = new Color(scrollPaneInstanceName.boundingBox_mc);
myColor.setRGB(0x999999);
Why Does My App Hate Me
I've got a .fla wich works perfectly however if i attempt to copy and paste the exact code and stage objects into a fresh .fla it doesn't work at all.....am i hallucinating or is this a known flash issue?I'm losing my mind ...i should have stuck to php but now i'm hooked on flash...well anyway hopefully somebody can clear this problem up for me.
Why Does PC IE / PC FF / Mac FF Hate My Pop-up?
I see a lot of pop-up code questions in here -- most of the answers point to the Kirupa article and the pop-up code generator (VERY COOL TUTORIALS/UTILITIES!).
I'm having an odd problem, though, where calling a function provided by a vendor (for a pop-up window) fails in every browser except Mac Safari.
This is the on(release) function I'm writing:
Code:
on(release) {
getURL("javascript:return(ET());");
}
And this is the Javascript pop-up window function (provided by an external vendor) that is being called:
Code:
function ET () {
window.open('http://www.somewebsite.com/et/emailThis?clickMap=create'+commonLoc+'&summary='+escape(getClickSummary())+'&image='+escape(getClickImage()),'click',popWin);
return false;
}
The variables in that function ARE getting passed properly from elsewhere in the Javascript. HTML buttons tied to the function pop the window properly from PC IE, PC Firefox, and Mac Firefox. However, the Flash version of the function call doesn't work in anything but Mac Safari.
Any suggestions?
Thanks,
IronChefMorimoto
P.S. - Before anyone asks, NO -- we can't have the vendor change the code. We're locked into it.
I Hate To Ask This...
Ok, here's the situation. I've been trying for MONTHS to figure out how to build a website completely using flash, and after many failed attempts I decided to go to a free template instead and just customise that.
And I found a really great one! The template works like this:
There is a main SWF file, and a folder containing some .txt files. You go into the .txt files and edit where necessary, and they are loaded into the .swf file, and you have yourself a pretty little website!
There is one killer of a problem though: While the site works perfectly while accessed locally on my computer, when I upload it onto my server it seems that the .txt files are forgotten completely, and the site comes up completely blank. The weird part is, the .swf file loads the first text file (containing the names for menus in the navigation bar), but fails to recognise the other files.
This is what I mean
I know I shouldnt have, but I converted the .swf file into a .fla file using *FLA, and now have access to it. Is there any way that Flash could look through the actionscript and tell me where problems are? Or, only in desparation, would anyone be kind enough to have a look at it for me and see if they can figure anything out?
Thanks alot,
James
Hi, I'm Mc2 And I Hate Mc1.
hi you all. for the 3rd time, i'm posting here about this question. some people tried to help asnwering about switching between frames.
But the thing is, mc2 is not in the same .fla file of mc1. it is loaded through "_root.contents.loadMovie..."
The image below is very clear. mc1 loads mc2 but won't get out of the screen. plus, mc2 doesn't know how to get out of the screen. we have a conflict between MCs here.
would anyone please help mc2?
thanks.
Hate Me For Asking
Okay, searched the forums but just a I cant find a quick answer to this 2 part-er...
1) Can anyone recommend a "kirupa-style site" with an active forum that deals with JavaScript?
2) I have a question specific to AOLs popup controls and how it would affect site design that uses JS popup windows.
Thanks
I Hate AS3
Normally I steer clear of AS3 but I've just started playing around with Air and of course AS2 is incompatible - great!
Basically I'm stuck trying to get a click action triggering a function. I want the function to run when an instance of an MC is clicked.
The MC is 'ins_1' wich is buried 2 levels deep within other MCs, the path from the top is:
ins_container.ins_slide.ins_1
I have all my actionscript at the top level but I'm happy to more it to ins_slide if need-be.
I have tried this:
Actionscript Code:
ins_container.ins_slide.ins_1.addEventListener(MouseEvent.MOUSE_DOWN, item1_CLICK);
function item1_CLICK(e:MouseEvent):void {
ins_bug.htmlText += "1 clicked, ";
}
Does anyone have any ideas?
Thank you,
I Hate AS2. Please Help
Hello, i´m trying to do a simple menu in as2. In as1 it takes me 5 minutes...but in as2, my head it´s about explode!!!
I have the next class:
class MiMenu extends MovieClip {
var identidad:Number;
var nombre:String = null;
//constructor
function MiMenu(name:String,id:Number){
nombre=name;
id=identidad;
//this.init()
//aunque puede estar vacío
}
function onLoad():Void{
_root.pulsado = 0;
}
function onRollOver():Void {
if (_root.pulsado != identidad) {
this.gotoAndPlay(5);
}
}
function onRollOut():Void {
if (_root.pulsado != identidad) {
this.gotoAndPlay(15);
}
}
}
and the flash reports me this error message:
ActionScript 2.0 class scripts may only define class or interface constructs.
What i´m doing wrong? please help me to understand this s..t!!!
Instances..hate Mx
Alright, i just want a simple rollout effect on my button but the code that im using just wont work. The code on the button that im using is...
on (rollOut) {
ButtonAnimation.gotoAndPlay(2);
}
ButtonAnimation is the MC that on frame 2 has a fade effect which i want to use for my rollout on my button. Am i missing something in there?
Here's the FLA, any help would be greatly appreciated..
http://www.angelfire.com/al2/PhoenixAD/website.fla
I Hate Math
I hawe a problem with a game.
The ammo is shoting in the wrong direction, and i dont get the math part.....
I Hate Buttons
ok heres the issue
i just switched over from flash 5 and the methods for creating a button seem the same except one little catch to have the text roll over you have to be directly over the text
i tried setting a transparent vector layer over the text but then it simply does not work at all
the only solution i can see is to only bitmap images but that would increase the load time considerably but i cant seem to make it work with vectors
ant sugestions or should i go bact to flash 5 and forget about mx
Aaaargh HATE = Is Not The Same As == :)
I am the NEWBIE!
just used the last 2 hours trying to figure out why my game wasn't working... and then i found out that the problems was in the code
if (var = #)
which should be
if (var == #)
Check it folks! Its an easy source to failures!
I Hate Variables ;-))
I have an anoying probl.
Movie 1 ->> loads variables from an external asp.net script
Then uses these variables in this movie. When this movie is finished
it starts another movie and there is an option that starts the first movie again.
My problem is that flash dont reload those variables when it starts the movie again. It just uses the old variables over again.....
It works fine on my machine if i run the movie just in flashplayer, but when putting the swf into an html document, it just uses the first loaded variables nomather what i do........
This is a quiz movie, and the problem is that the asp.net script sends randomized questions to flash, but why wount it reload when restarting ???????
Sorry for my bad english i'm Norweigian ;-)
Thanks in advance
Caution
I Hate Components Help
i have had it up to here with components
i have been trying to customise a guestbook and i cant get rid or work out how to get compoments to customise. i wanna make this file easily customiseable but i cant get rid or skin some of the commonents. can someone please sort me out or put me on the right track.
A flash designer on the edge...dont push me...
Omg I Hate Saving
Ok, I have like 8 Functions that all have to do with saving. I cannot find what I am doing wrong so I will put every line of action script related to it on here. It wont save and the checker doesnt work.
Here is Frame 1:
Code:
stop();
//Save Variables
var SaveSpot:Number;
//New Game Variables
var savingPlace:Number;
var quality:Number;
var money:Number = 100;
SaveSpot1.quality = new Number();
SaveSpot2.quality = new Number();
SaveSpot3.quality = new Number();
//Game Variables (SaveSpot1.location etc)
SaveSpot1.Player = new Object();
SaveSpot1.area = new Number();
SaveSpot1.Player.health = new Number();
SaveSpot1.Player.maxhealth = new Number();
SaveSpot1.timem = new Number();
SaveSpot1.timeh = new Number();
SaveSpot1.playTime = new Number();
SaveSpot1.Player.money = new Number();
SaveSpot1.Player.offense = new Number();
SaveSpot1.Player.defense = new Number();
SaveSpot1.Player.intelligence = new Number();
SaveSpot1.Fights = new Object();
SaveSpot1.Fights.nRound = new Number();
SaveSpot1.Fights.wins = new Number();
SaveSpot1.Fights.loses = new Number();
SaveSpot2.Player = new Object();
SaveSpot2.area = new Number();
SaveSpot2.Player.health = new Number();
SaveSpot2.Player.maxhealth = new Number();
SaveSpot2.time = new Number();
SaveSpot2.playTime = new Number();
SaveSpot2.Player.money = new Number();
SaveSpot2.Player.offense = new Number();
SaveSpot2.Player.defense = new Number();
SaveSpot2.Player.intelligence = new Number();
SaveSpot2.Fights = new Object();
SaveSpot2.Fights.nRound = new Number();
SaveSpot2.Fights.wins = new Number();
SaveSpot2.Fights.loses = new Number();
SaveSpot3.Player = new Object();
SaveSpot3.area = new Number();
SaveSpot3.Player.health = new Number();
SaveSpot3.Player.maxhealth = new Number();
SaveSpot3.time = new Number();
SaveSpot3.playTime = new Number();
SaveSpot3.Player.money = new Number();
SaveSpot3.Player.offense = new Number();
SaveSpot3.Player.defense = new Number();
SaveSpot3.Player.intelligence = new Number();
SaveSpot3.Fights = new Object();
SaveSpot3.Fights.nRound = new Number();
SaveSpot3.Fights.wins = new Number();
SaveSpot3.Fights.loses = new Number();
//Objetcs
var InfoUser:Object = new Object();
var SaveSpot1:Object = new Object();
var SaveSpot2:Object = new Object();
var SaveSpot3:Object = new Object();
//Standard Arrays
InfoUser.qualityA = new Array();
InfoUser.qualityA[0] = "---Error---";
InfoUser.qualityA[1] = "High/Best";
InfoUser.qualityA[2] = "Medium";
InfoUser.qualityA[3] = "Low";
InfoUser.areas = new Array();
Info.User.areas[0] = "Error in Game";
Info.User.areas[2] = "Your House";
Info.User.areas[1] = "Outside";
Info.User.areas[3] = "Sam's House";
Info.User.areas[4] = "Jake's House";
//Shared Object
GameData1_so.data.getLocal("gamedata1");
GameData2_so.data.getLocal("gamedata2");
GameData3_so.data.getLocal("gamedata3");
GameData1_so.data.SaveSpot1 = new Object();
GameData2_so.data.SaveSpot2 = new Object();
GameData3_so.data.SaveSpot3 = new Object();
GameData1_so.data.SaveSpot1.Fights = new Object();
GameData2_so.data.SaveSpot2.Fights = new Object();
GameData3_so.data.SaveSpot3.Fights = new Object();
GameData1_so.data.SaveSpot1.health = SaveSpot1.Player.health;
GameData1_so.data.SaveSpot1.maxhealth = SaveSpot1.Player.maxhealth;
GameData1_so.data.SaveSpot1.time = SaveSpot1.time;
GameData1_so.data.SaveSpot1.playTime = SaveSpot1.playTime;
GameData1_so.data.SaveSpot1.money = SaveSpot1.Player.money;
GameData1_so.data.SaveSpot1.offense = SaveSpot1.Player.offense;
GameData1_so.data.SaveSpot1.defense = SaveSpot1.Player.defense;
GameData1_so.data.SaveSpot1.intelligence = SaveSpot1.Player.intelligence;
GameData1_so.data.SaveSpot1.nRound = SaveSpot1.Fights.nRound;
GameData1_so.data.SaveSpot1.wins = SaveSpot1.Fights.wins;
GameData1_so.data.SaveSpot1.loses = SaveSpot1.Fights.loses;
GameData2_so.data.SaveSpot2.health = SaveSpot2.Player.health;
GameData2_so.data.SaveSpot2.maxhealth = SaveSpot2.Player.maxhealth;
GameData2_so.data.SaveSpot2.time = SaveSpot2.time;
GameData2_so.data.SaveSpot2.playTime = SaveSpot2.playTime;
GameData2_so.data.SaveSpot2.money = SaveSpot2.Player.money;
GameData2_so.data.SaveSpot2.offense = SaveSpot2.Player.offense;
GameData2_so.data.SaveSpot2.defense = SaveSpot2.Player.defense;
GameData2_so.data.SaveSpot2.intelligence = SaveSpot2.Player.intelligence;
GameData2_so.data.SaveSpot2.nRound = SaveSpot2.Fights.nRound;
GameData2_so.data.SaveSpot2.wins = SaveSpot2.Fights.wins;
GameData2_so.data.SaveSpot2.loses = SaveSpot2.Fights.loses;
GameData3_so.data.SaveSpot3.health = SaveSpot3.Player.health;
GameData3_so.data.SaveSpot3.maxhealth = SaveSpot3.Player.maxhealth;
GameData3_so.data.SaveSpot3.time = SaveSpot3.time;
GameData3_so.data.SaveSpot3.playTime = SaveSpot3.playTime;
GameData3_so.data.SaveSpot3.money = SaveSpot3.Player.money;
GameData3_so.data.SaveSpot3.offense = SaveSpot3.Player.offense;
GameData3_so.data.SaveSpot3.defense = SaveSpot3.Player.defense;
GameData3_so.data.SaveSpot3.intelligence = SaveSpot3.Player.intelligence;
GameData3_so.data.SaveSpot3.nRound = SaveSpot3.Fights.nRound;
GameData3_so.data.SaveSpot3.wins = SaveSpot3.Fights.wins;
GameData3_so.data.SaveSpot3.loses = SaveSpot3.Fights.loses;
//Functions
function Save(SaveSpot){
if (SaveSpot == 1){
_root.Save1();
}if (SaveSpot == 2){
_root.Save2();
}if (SaveSpot == 3){
_root.Save3();
}
}
function SaveCheck(SaveSpot){
if (SaveSpot == 1){
_root.SaveCheck1();
}if (SaveSpot == 2){
_root.SaveCheck2();
}if (SaveSpot == 3){
_root.SaveCheck3();
}
}
function Save1(){
GameData1_so.flush();
GameData1_so.data.SaveSpot1.health.flush();
GameData1_so.data.SaveSpot1.maxhealth.flush();
GameData1_so.data.SaveSpot1.time.flush();
GameData1_so.data.SaveSpot1.playTime.flush();
GameData1_so.data.SaveSpot1.money.flush();
GameData1_so.data.SaveSpot1.offense.flush();
GameData1_so.data.SaveSpot1.defense.flush();
GameData1_so.data.SaveSpot1.intelligence.flush();
GameData1_so.data.SaveSpot1.nRound.flush();
GameData1_so.data.SaveSpot1.wins.flush();
GameData1_so.data.SaveSpot1.loses.flush();
_root.SaveCheck(1);
}
function Save2(){
GameData2_so.flush();
GameData2_so.data.SaveSpot2.health.flush();
GameData2_so.data.SaveSpot2.maxhealth.flush();
GameData2_so.data.SaveSpot2.time.flush();
GameData2_so.data.SaveSpot2.playTime.flush();
GameData2_so.data.SaveSpot2.money.flush();
GameData2_so.data.SaveSpot2.offense.flush();
GameData2_so.data.SaveSpot2.defense.flush();
GameData2_so.data.SaveSpot2.intelligence.flush();
GameData2_so.data.SaveSpot2.nRound.flush();
GameData2_so.data.SaveSpot2.wins.flush();
GameData2_so.data.SaveSpot2.loses.flush();
_root.SaveCheck(2);
}
function Save3(){
GameData3_so.flush();
GameData3_so.data.SaveSpot3.health.flush();
GameData3_so.data.SaveSpot3.maxhealth.flush();
GameData3_so.data.SaveSpot3.time.flush();
GameData3_so.data.SaveSpot3.playTime.flush();
GameData3_so.data.SaveSpot3.money.flush();
GameData3_so.data.SaveSpot3.offense.flush();
GameData3_so.data.SaveSpot3.defense.flush();
GameData3_so.data.SaveSpot3.intelligence.flush();
GameData3_so.data.SaveSpot3.nRound.flush();
GameData3_so.data.SaveSpot3.wins.flush();
GameData3_so.data.SaveSpot3.loses.flush();
_root.SaveCheck(3);
}
function SaveCheck1(){
if (GameData1_so.data.SaveSpot1.health != undefined){
if (GameData1_so.data.SaveSpot1.mazhealth != undefined){
if (GameData1_so.data.SaveSpot1.time != undefined){
if (GameData1_so.data.SaveSpot1.playTime != undefined){
if (GameData1_so.data.SaveSpot1.money != undefined){
if (GameData1_so.data.SaveSpot1.offense != undefined){
if (GameData1_so.data.SaveSpot1.defense != undefined){
if (GameData1_so.data.SaveSpot1.intelligence != undefined){
if (GameData1_so.data.SaveSpot1.nRound != undefined){
if (GameData1_so.data.SaveSpot1.wins != undefined){
if (GameData1_so.data.SaveSpot1.loses != undefined){
gotoAndStop ("SaveComplete");
status_txt.text = "Done";
}
}
}
}
}
}
}
}
}
}
}else {
status_txt.text = "Saving...";
}
}
function SaveCheck2(){
if (GameData2_so.data.SaveSpot2.health != undefined){
if (GameData2_so.data.SaveSpot2.mazhealth != undefined){
if (GameData2_so.data.SaveSpot2.time != undefined){
if (GameData2_so.data.SaveSpot2.playTime != undefined){
if (GameData2_so.data.SaveSpot2.money != undefined){
if (GameData2_so.data.SaveSpot2.offense != undefined){
if (GameData2_so.data.SaveSpot2.defense != undefined){
if (GameData2_so.data.SaveSpot2.intelligence != undefined){
if (GameData2_so.data.SaveSpot2.nRound != undefined){
if (GameData2_so.data.SaveSpot2.wins != undefined){
if (GameData2_so.data.SaveSpot2.loses != undefined){
gotoAndStop ("SaveComplete");
}
}
}
}
}
}
}
}
}
}
}
}
function SaveCheck3(){
if (GameData3_so.data.SaveSpot3.health != undefined){
if (GameData3_so.data.SaveSpot3.mazhealth != undefined){
if (GameData3_so.data.SaveSpot3.time != undefined){
if (GameData3_so.data.SaveSpot3.playTime != undefined){
if (GameData3_so.data.SaveSpot3.money != undefined){
if (GameData3_so.data.SaveSpot3.offense != undefined){
if (GameData3_so.data.SaveSpot3.defense != undefined){
if (GameData3_so.data.SaveSpot3.intelligence != undefined){
if (GameData3_so.data.SaveSpot3.nRound != undefined){
if (GameData3_so.data.SaveSpot3.wins != undefined){
if (GameData3_so.data.SaveSpot3.loses != undefined){
gotoAndStop ("SaveComplete");
}
}
}
}
}
}
}
}
}
}
}
}
(Continued)
Oh Why Do .FLA Files Hate Me...
Ok, Im working on a website for myself, and I move around alot, so I worked on something at my moms computer for awhile, I then saved it as a .fla, took that, and emailed it to myself, I got to my dads house, downloaded it, and then tried to open it, but I get a "Failed to open document" error. Should I just reinstall flash? Or is there some kind of protection thing in fla's that causes this?
Don't Hate Me, I Need HitTest Help
Hello,
I know there a vast world of tutorials for learning hitTest, but none of them are actually helping my situation. Everytime i implement one it does'nt work! Basically i want to get code together which i can put into an MC which is static (does'nt move), where when my moving user controlled MC hit's it, my user controlled MC stops moving in that direction. Because there are a few ways a hitTest can be implemented i have no idea what to use for my boundary. My boundary is called land as it's instance name, and my user controlled MC is called tank. My tanks code is below, and the "land" MC currently has no code. Can anyone solve my "probably" easy problem?
TANK CODE: MC known as instance name "tank"
onClipEvent (load) {
this.swapDepths(10000);
speed = 4;
bumSound= new Sound();
bumSound.attachSound("bum")
}
onClipEvent (enterFrame) {
if (Key.isDown(Key.UP)) {
xx = math.cos(_rotation*Math.PI/180)*speed;
yy = math.sin(_rotation*Math.PI/180)*speed;
this._x += xx;
this._y += yy;
}
if (Key.isDown(Key.LEFT)) {
this._rotation -= 5;
} else if (Key.isDown(Key.RIGHT)) {
this._rotation += 5;
} else if (Key.isDown(Key.SHIFT)) {
turret._rotation -= 5;
} else if (Key.isDown(Key.CONTROL)) {
turret._rotation += 5;
}
treadcheck++;
if (treadcheck>5) {
treadcount++;
duplicateMovieClip (_root.tread, "tread"+treadcount, (treadcount%100)+1000);
treadcheck = 0;
}
if (Key.isDown(Key.SPACE) && shotTimer<=0) {
bumSound.start();
shotCount++;
duplicateMovieClip (_parent.shot, "shot"+shotCount, (shotCount%100)+1100);
shotTimer = 15;
}
shotTimer--;
}
Thanks
I Hate Actionscript 3.0
why did they get rid of the on() command and why did they get rid of placing scripts on buttons why do they want to make me hate them. It now takes so many lines of code to do something that was once so simple. you need to use this crap to use buttons.
Quote:
myButton.addEventListener(
MouseEvent.MOUSE_UP,
function(evt:MouseEvent):void {
trace("I've been clicked!");
}
);
I will not use Action script 3.0 as far as i am concerned it sucks and i hope the people who came up with it die. 2.1 is much better and i will continue using it and treat 3.0 like the little piece of crap it is.
[CS3] I Hate HitTest Now.
The reason why I hate hitTest?
It's because after X versions of Flash coming and going, Macromedia/Adobe NEVER thought to make it so movieclip-movieclip hitTests could occur without those stupid bounding boxes! I know you agree with me (if you know what I'm talking about...)
Anyway, I'm getting to the point...
Lets say I have four blank movieclips, named "a", "b", "c", and "d", with "a" and "b" placed on the top layer, and "c" and "d" inside of a fifth movie clip, which is also on the top layer. (Don't ask why it's like this, it's just is how I'm doing it.) I want to know how to find the hitTest of the LINE between "a" and "b" and the LINE between "c" and "d".
I would just use hitTest, but it would only work when the lines are perfectly horizontal or vertical.
So, any suggestions?
I Hate Mac And Safari
ok so i created a flash site on a PC for viewing in all browsers (so i thought!) but when i view it on a safari browser the flash file shows up but in like a 10 x 10 pixel square...any idea on how to fix this...i know there is a code that needs to go into the index.html file for safari browsers, but i cant seem to find it anywhere...
thanks guys...
namtab
I Hate SetInterval Is There A Better Way To Do This?
this is just a test function, I have not done anything to the string to beautify the output. Is there a better way to do this???
PHP Code:
var gotime:Function = function () {
//replaces and refreshes now; otherwise, the data woudl remain the same
var now:Date = new Date();
//requires a dynamic text instance called time_txt
time_txt.text = now.getHours()+":"+now.getMinutes()+":"+now.getSeconds()+":"+now.getMilliseconds();
};
setInterval(gotime, 10);
I Hate Sandboxes
I have two mc instances labeled mc1 and mc2. I have two swf files that were created with poser and then compressed using sorenson squeeze the exact same whay. Here is my code.
Code:
mc1.loadMovie("http://otis.usu.edu/create/videos/female_student/L03_S01_intro.swf");
mc1.play();
mc2.loadMovie("http://otis.usu.edu/create/videos/female_student_talkative/L03_S01_intro.swf");
mc2.play();
I get a sandbox violation with the second video but not the first. This is killing me. What am I doing wrong. How can I get the sandbox violation to go away? Please help me before I rip all my hair out on this one.
Jason
I Hate Depth
So..... I got a quick question. I'm placing a background that loads a different color dynamically every time you load up my SWF, by the following code:
import flash.display.BitmapData;
import flash.geom.Rectangle;
var myColors:Array = new Array(0x993300, 0x9933CC, 0xFF9966, 0x009999, 0x663399, 0x666600, 0x999999, 0x00CC99, 0xFF9900, 0x9999FF, 0xCC3300);
var myColor=myColors[Math.floor(Math.random()*11)];
var myBmp:BitmapData = new BitmapData(Stage.width, Stage.height, false, myColor);
var myBackground:MovieClip = _root.createEmptyMovieClip("background_mc", 1);
background_mc.attachBitmap(myBmp, this.getNextHighestDepth());
Then, I want to put in a logo, so I simply place it on my stage in a new layer.
Now, when I do that, it doesn't show up, so I run a trace on that logo's depth, and it's giving me -16383!
So, I do logo.getNextHighestDepth(),
That doesn't do anything at all to change the depth. This is a real pain, I honestly cannot figure out this depth thing.
So, my question is two parts:
1: is there a way that I can simply change the background color dynamically without having to create a new movieclip with a bitmap data image in it?
2: what's the deal with depth? Can anyone help me out with my depth issue?
Thanks a lot!
-Carmire
|