Thank Iu Senocular But...
Thank iu but it donīt works. I explain you: I have five buttons and their rest frames have a movieclip called "reposo", when I placed the cursor over one of those buttons (call it button A), the other buttons are playing itself "reposo" movieclip , the movieclip in the "over" frame of the button A plays very slowly. I want to stop the other four "reposo" playings with a rollover in button A that stops the "reposo"mcs allowing button A over-movieclip plays normaly. Thank you a lot.
FlashKit > Flash Help > Flash ActionScript
Posted on: 05-19-2002, 04:33 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Senocular?
Hey...I emailed you twice for some help...you never responded? Did u get them?
Hey Senocular
all my point of getting it's instance name is cuz the instance name has the depth... cuz the current name is mmb4 so the depth is 4...
but in the movie when i rollover the object it makes the depth to be the highest (in this case 101)
and i want to make the old depth to come back when i rollout from the object.
so i thought i will be able to use the instance name to retrieve the depth using the string functions but it seems that i can't retrieve the got dame name.
so i had another idea:
i will save the corrent depth in side the object (depth = "")
and while i will do the duplication it will save the current duplicate depth in side the object but it seems that i can't retrieve the var from the object.
i tried:
a = _root.mmb2.depth
for example!!!
can you help me??? i can send my movie over if that will be more usefull
Thanks To Senocular
I just wanted to say thanks to senocular for the one on one help he gave me in fixing my Action Scripting problems.
He was a responsive, thoughtful and helpfull guy.
I have one smaller problem that is still dogging me, but with the kind people in this forum, I'm sure I can get it solved.
FlashKit and its members ROCK.
Senocular.. U Iz Da Man
this is just me thankin you for helpin me so much. i thought there was no way i could do this.. well i cant.. u did. the is extreamily helpful. me gona mention ya on my site when its done,
'actionscripting brought to you by senocular'
if you have a site u want me to mention i will...doesnt harm a few extra peeps lookin at your site
again..you cant believe how much you have helped me...
thanx
Senocular Can You...
is there a way within your actionscripting, change the speds in which each power is defined. what i am finding is that you can hit my animation pretty hard b4 it gets to power 1
its also very difficuly to get to power 1, it mainly stays on power 2 or 0. any help?
Senocular, Is There A Way You Can...
is there a way you can make it so that they can hit the same area again and again?
right now. once you hit 1 area.. you have to hit another b4 you can hit the first area again
any ideas?
Senocular (or Anyone Who Can Help :) )
Hiya. I found your rotating eye .FLA extremely helpful for a game I was making, you wrote excellent code there.
However, being that I am... well... the inverse of how skilled you are, I bumbled, crashed, and burned when trying to adapt it to another part of my game.
I need a gun to rotate and follow the cursor (so it looks like it is being aimed), but it also needs to look somewhat natural. I have successfully made it go in weird circles, flip vertically, and spin in what appears to be random counterclockwise directions
Here's a code-less .fla just to give you an idea of the positioning. The targets appear randomly via code in the actual .fla, but what matters is the mouse x-y position, not the targets'.
Anyways... if you want to help, thank you very much!
Senocular. Did You Know,,,
when the animation starts, if you move your mouse, doesnt matter where it is, it effects the animation. i mean... it starts.. you literally move your mouse and the animation gets a hit.
any thoughts.
For Senocular
hi senocular,
i know the work you do over flashkit,,thats why i thought i could get my answer from you,,
i would like to know the actionscript used in Fantasy Interfaces Viewpod ,,the 360 degree rotaion i have seen many places but at the same time increasing and decreasing in size is what i didnt see,,
both zoom,pan,,rorate all at a time while dragging left,right,top,bottom
hope you would post the script here,
thanx
xs
[F8] Help With Senocular Example
Can you someone tell me why theres no perspective correction in the 3D picture box example at the bottom of this page
http://www.senocular.com/flash/tutor...ansformmatrix/
this is code that does the 3d to 2d conversion
Code:
var tpoints = new Array();
var sx = Math.sin(rotations.x);
var cx = Math.cos(rotations.x);
var sy = Math.sin(rotations.y);
var cy = Math.cos(rotations.y);
var sz = Math.sin(rotations.z);
var cz = Math.cos(rotations.z);
var x, y, z, xy, xz, yx, yz, zx, zy;
var i = points.length;
while (i--) {
x = points[i].x+multx;
y = points[i].y+multy;
z = points[i].z;
// rotation around x
xy = cx*y-sx*z;
xz = sx*y+cx*z;
// rotation around y
yz = cy*xz-sy*x;
yx = sy*xz+cy*x;
// rotation around z
zx = cz*yx-sz*xy;
zy = sz*yx+cz*xy;
tpoints[i] = {x:zx, y:zy};
}
return tpoints;
and I just don't see where the perspective correction is, i.e something like this
var scale:Number = fl/ (fl +object.z);
mc._x = startPointX + object.x *scale;
mc._y = startPointY + object.y *scale;
ok so that does that mean then, that his example is not true 3D? and if thats the case, how can I put the perspective code into his??
thanks for any ideas about this!
boombanguk
Senocular Pls Help
Hi Senocular!
You're always in the random forum!
Please I need some help with you isometry tutorials (the advanced one)! I don't understand all your code I am trying to decontruct it to understand it better, but I'm having trouble trying to get the cube in my fla to move with keyboard arrows!
here's the fla!
Thanks
Senocular
hey! after reading all the stuff that senocular writes and how well he explains i think he should wirte a book... who agrees with me? I would buy the book :-D
Senocular I Need Ur Help :P
hi
im trying to make an xml portfolio (thnx for great tutorial ) but i also want to combine it with ur external txt css tutorial but i just cant get it to work everytime i try i screw up the script and then it aint working so i hope u can help me out
Senocular
so i made a instance name for my input text field and its "a"
then this is my script for the button:
on (release){
if (a=="hello"){
output("bye");
}
}
so if hello is typed in the field then when i click the button the bye should come up, but its not working for me
Please Mr. Senocular
href > level (XML - FLASH)
http://www.kirupa.com/web/xml/examples/searchbestof.htm
Please, it is possible to open a file.swf in the level 1 instead of http: //
href for level
//
DisplayNodes = function(nodes, field_txt){ field_txt.htmlText = ""; var entry; var separator = "<br>_______________________<br><br>"; for (var i=0; i<nodes.length; i++){ entry = ""; entry += "<b>"+ nodes[i].childNodes[0].firstChild.nodeValue +"</b>"; entry += " by: "+ nodes[i].childNodes[1].firstChild.nodeValue; entry += "<br>"+ nodes[i].childNodes[2].firstChild.nodeValue; if (nodes[i].attributes.url.length){ entry += "<br><a href='" + nodes[i].attributes.url; entry += "'><font color='#0000FF'>Read more...</font></a>";} field_txt.htmlText += entry + separator;}}~
thank you for the attention
Splabol
Need Your Help Senocular
hi senocular
i m developing a flash presentation, in which i need to resize the movieclip by dragging the corners. i just visited "flash source files" category in your site senocular.com. and downloaded the "Scale9 (9-slice) framed picture". how can i change the width of the selectable border, so that if my movieclip has 1 pixcel border then i can select at only 1 px width range and can resize the movie clip. pleeeeeeeeez help.
Help With Senocular's Map..
I am trying to modify Senocular's map with steady zoom, (found on his source files section on his website http://www.senocular.com/flash/source.php?id=0.11 )
I made the stage and map size 1024 x 768 instead of the small version he had.
I also changed the coordinates in all the as layers accordingly. The problem that I have is that the map leaves the stage when you use the pan function. Try to pan the map up and down and you will see that it leaves the stage. I need it to remain within that area 1024 x 768 of the stage. I don't know what I am doing wrong and have tried almost everything I could think of. I really need to make this work somehow. The images that I wanna use to zoom in on are actually larger than this sample but I would like to keep the stage size 1024 x 768.
I have attached the fla file in case somebody would be kind enough to have a look. It's pretty simple. You'll find the code in the slider and the actual map.
Yo Senocular
Any chance you would errr... put up more tutorials on using the Flex 2 SDK? I'm kinda sick of compiling using flash when I don't even code in flash anymore.
Things like how to define classpaths, and such?
That way I can do flash projects like I do Java
Thankies.
Senocular
I've decided to try my hand at Flash gaming, and 3D gaming too, which in all likelyhood is going to have to be Shockwave.
I love Flash, but the lack of proper 3D, hardware acceleration and polygon pushing is a shame.
I must say though, I am impressed with what shockwave can do, until recently I had absolutely no idea that it could use DX/OpenGL, polygons and a proper 3D environment.
How difficult is Director to use compared to Flash and Actionscript, specifically for 3D?
And seeing as Flash is an incredibly versatile application already, arguably THE most versatile program around, why do you think Adobe doesn't just port Director/Shockwave's polygonal ability and hardware acceleration over the Flash? It doesn't make sense to me.
Does anyone know of some good Director tutorials? Specifically 3D and game development in shockwave.
Joe
Best Of Senocular
Here are a lot of the more well put and explanatory threads Ive been involved with over the years. There are a lot more over in WH but their new site blows and the search is a pain to use, so I probably wont be posting much from there otherwise they come from all over the place.
Determining the side being viewed for a 3D movie clip (FP10+)
http://www.kirupa.com/forum/showthread.php?t=315821
General (AS3)
ByteArray (BitmapData.getPixels, corrupting/uncorrupting SWF data)
http://board.flashkit.com/board/showthread.php?t=720498
bitwise NOT operator
http://www.kirupa.com/forum/showthread.php?t=198082
AS3 Tip of the Day
http://www.kirupa.com/forum/showthread.php?t=223798
General (AS1/AS2)
Deforming objects with triangles
http://www.actionscript.org/forums/s....php3?t=128444
Oddities in Removing Components
http://www.actionscript.org/forums/s...633#post491633
The Color Object
http://www.actionscript.org/forums/s...&postid=159709
Associative Array Referencing
http://www.kirupaforum.com/forums/sh...threadid=12082
"Soft" References with MovieClips
http://www.actionscript.org/forums/s...d.php3?t=45082
Relative and Absolute as in Referencing
http://www.kirupaforum.com/forums/sh...threadid=12462
Random Numbers
http://www.kirupaforum.com/forums/sh...=&postid=81617
_global
http://www.kirupaforum.com/forums/sh...threadid=12948
http://www.kirupaforum.com/forums/sh...threadid=17389
#include
http://www.actionscript.org/forums/s...threadid=29521
Use of switch
http://www.kirupaforum.com/forums/sh...threadid=15407
Object.watch
http://www.flashkit.com/board/showth...hreadid=428453
http://www.actionscript.org/forums/s...threadid=25915
Movieclips in Buttons
http://www.kirupaforum.com/forums/sh...threadid=19984
Back and Forth in Arrays
http://www.kirupaforum.com/forums/sh...threadid=15558
Hex colors as/from RGB
http://www.were-here.com/forum/tm.asp?m=1265553
How || operates
http://www.actionscript.org/forums/s...threadid=25931
QT VRObject in Flash
http://www.flashkit.com/board/showth...hreadid=379970
Isometric
http://www.kirupaforum.com/forums/sh...threadid=15767
"How Actionscript Thinks" (an attempt at least )
http://www.actionscript.org/forums/s...threadid=31272
Intro to XML and editing it in Flash
http://www.kirupaforum.com/forums/sh...threadid=13697
Trigonometry and rotating a 2D vector
http://www.kirupaforum.com/forums/sh...threadid=12181
3D in Flash
http://www.actionscript.org/forums/s...threadid=31108
enterFrame event
http://www.actionscript.org/forums/s...threadid=28620
Tricks of the Trade
http://www.kirupaforum.com/forums/sh...threadid=14268
Flash to Director (and Director's "me")
http://www.actionscript.org/forums/s...d.php3?t=58278
EventDispatcher vs AsBroadcaster
http://www.actionscript.org/forums/s...d.php3?t=68068
Accessing a Movie Clip's Frame Code When it First Appears on Stage
http://www.actionscript.org/forums/s...d.php3?t=68966
OOP (AS 1.0)
import and classpath
http://www.actionscript.org/forums/s....php3?t=134660
What prototypes are
http://proto.layer51.com/d.aspx?f=645
Inheritance among Classes
http://proto.layer51.com/d.aspx?f=604 (see comments)
http://www.actionscript.org/forums/s...threadid=28896
Movieclips Inheriting from Classes
http://www.flashkit.com/board/showth...hreadid=430658
http://www.flashkit.com/board/showth...hreadid=459377
__proto__ etc. (in depth)
http://www.flashkit.com/board/showth...hreadid=462834
addProperty and prototypes
http://www.actionscript.org/forums/s...threadid=28857
Multiple Inheritance Workaround Using __resolve
http://www.flashkit.com/board/showth...hreadid=461833
super()
http://forums.ultrashock.com/forums/...threadid=21186
http://www.actionscript.org/forums/s...threadid=28710
Movieclips in Objects
http://www.actionscript.org/forums/s...threadid=28748
prototype vs _global
http://www.actionscript.org/forums/s...threadid=30048
init and apply for classes
http://www.kirupaforum.com/forums/sh...&postid=187502
http://forums.ultrashock.com/forums/...threadid=28549
OOP "creatures" exercise
http://www.actionscript.org/forums/s...threadid=26314
Small thing about ASBroadcaster with all Instances of class
http://www.were-here.com/forum/tm.asp?m=1265396
Also, a little less AS oriented, and more Flash MX in general is:
Flash MX, The Things You Might Have Missed
http://www.kirupaforum.com/forums/sh...threadid=23051
MXP and Packaging Components
http://www.actionscript.org/forums/s...threadid=30391
Im doing this before I forget them though Im sure there is some gold out there which has long since been wiped clean of my memory. Ill try to keep future good'uns posted here and add any I might recall from the past that are not already included.
Senocular Pls Help
Hi Senocular!
You're always in the random forum!
Please I need some help with you isometry tutorials (the advanced one)! I don't understand all your code I am trying to decontruct it to understand it better, but I'm having trouble trying to get the cube in my fla to move with keyboard arrows!
here's the fla!
Thanks
Senocular
hey! after reading all the stuff that senocular writes and how well he explains i think he should wirte a book... who agrees with me? I would buy the book :-D
Senocular's Eyes Only :)
hey again. i try to edit the fla you gave me so that it works for my site, ie, x position, height, section size etc, but when i copy and paste the frame into my movie it doesnt seem to work. do you kno what could be wrong?
please reply if ya need more info from me
Senocular You Seem To Be A Flash God...
senocular you seem to be a flash God... know anything about:
Part 1:
How can I print from flash WITHOUT displaying the print dialog box... (i.e. when flash goes to print it just prints to my printer and does not bring up the printer properties box and make me hit OK)
Part 2:
How can I print an external document (.doc, .jpg, etc.) in flash? I know I can print a frame in flash and that is fine but what about if I want to print an EXTERNAL document like a word file or txt file... note: I want it just to print the external document and NOT load it.... just print..
A Question For Senocular
Hi senoc, ive still been going hard with that drawing board thing I was working with (re the Kirupa.com thread) only problem is Im having MAJOR dramas with paths. My current movie sits in the _root, and I want to move it inside a clip. I did this, and of course alot of things stopped working . I changed all the '_root' paths to 'this ' and even tried using _parent.
Anyway Ill post the attachment if you reply,
Thanks
Senocular: How Does This Work?
deck.sort(function(){return random(2)});
Aparrently you posted this code to randmise a 20 element array ... just wondering how it works. Any clues?
3d Translation (senocular Help Me Or Any One Else)
Following Senoculars Tutorial on 3D at
http://www.kirupa.com/developer/actionscript/3d_index.htm
which is excellent, even for a pea brain like me.
However, still having problems linking 2 concepts together.
If you look at the link below:
http://www16.brinkster.com/jayhoo/Jons_Steps4.html
You see i have 3d boxes drawn bia the API within attached Movie Clips (the green box is the centre of each clip). Each Clip is then moved through 3d space.
The problem is and what i want to do, is to adjust the perpective of the drawn points relative to the x,y,z properties of its home clip (the green box).
I have tried drawing the points only and not adjusting the clip but cant get this work for me either.
Any help would be graetly appreciated and i am more than happy to post my hideous attempt at rewriting senoculars tutorial examples.
cheers
Senocular: Is The StageResize.fla Done In AS3?
Senocular,
I am having a hell of a time trying to make flash header fliud with the browser window.
I see that you have this done already.
http://www.senocular.com/demo/Layout...ageResize.html
I am using Flash CS3 and programming in AS3 strict mode. Can you provide the .fla file for this so I can look at it please.
Thanks,
Wayne
[F8] Senocular's FreeTransform.as
Hi all
Im using FreeTransform.as(http://www.senocular.com) code to create transform tool om movie clip.
But its rotation,scale and drag functions are not restricted.I want to place my movie clip with in boundary and ones any transformation reaches boundary it should be terminated.
I tried variety of code adjustment,but couldn't get perfect solution.
If any one who used above class please give me and idea how to figure it out.
Bit urgent.
Thanks.
AS3 Senocular KeyPresses Example?
Hi I was looking over his KeyObject.as and I could seem to get it to work can anyone send/host me a example .swf and .fla of this .as working?
Also does this allow multiple key presses and no delay?
AS3 Senocular KeyPresses Example?
Hi I was looking over his KeyObject.as and I could seem to get it to work can anyone send/host me a example .swf and .fla of this .as working?
Also does this allow multiple key presses and no delay?
http://www.senocular.com/flash/actio...s/KeyObject.as
Help With Senocular's ClearRGB
I have an FLA with multiple menu's and I want to define the users place in the tree by hilighting buttons with different colors.
The buttons in the first tree are in a menu called LEFTBUTTONS, and contain buttons like MEN, WOMEN, CHILDREN etc. and are coded like this:
Code:
on (release) {
_parent.menmenu.gotoAndPlay(2);
_parent.aboutbanner._visible = false;
_parent.newsbox._visible = false;
_root.rightmenu._visible = false;
_root.rightbuttons._visible = false;
_root.footerdark._visible = true;
var activebutton = new Color("men");
activebutton.setRGB(0x003366);
this.gotoAndStop(10);
}
so far so good, pressing MEN will result in the MEN button flipping to green and then the MENMENU opening up to the next branch of the tree which contains buttons like BOMBERS, PARKAS, ETC. I would like to have selections from this menu hilighted with color when they are clicked as well (MEN would still be hilighted too). Here is the code I am using for those buttons.
Code:
on (release) {
_parent.leftbuttons.gotoAndStop(10);
loadMovie("swf/bomberjackets.swf", _root.maincontent);
var activebutton = new Color("bombers");
activebutton.setRGB(0x003366);
}
Still no problem! but now the user has reached the end of the tree, she's seen the bomber jackets so they will presumably click on PARKA's or whatever else is offered in MEN which will require a return of the BOMBERS button to it's normal state, or perhaps they might leave that tree to WOMEN, or whatever in the first branch of the tree. Basically I need to figure out how to clear the RGB.
Now... senocular seems to have it all figured out, but I am confused by most of the code. located here:
http://proto.layer51.com/d.aspx?f=1206
especially the function itself:
Code:
Color.prototype.clearRGB = function(){
this.setTransform({ra:100, rb:0,ga:100,gb:0,ba:100,bb:0,aa:100,ab:0});
}
Is this a global function that I can call anytime? anywhere? what is Color.prototype? and what frame would the function go into? and finally, why can't I call the function with something like....
Code:
on (release) {
_parent.menmenu.gotoAndPlay(2);
_parent.aboutbanner._visible = false;
_parent.newsbox._visible = false;
_root.rightmenu._visible = false;
_root.rightbuttons._visible = false;
_root.footerdark._visible = true;
var activebutton = new Color("men");
activebutton.setRGB(0x003366);
women.clearRGB();
children.clearRGB();
this.gotoAndStop(10);
Any help on understanding how to implement the clearRGB would be great, thanks.
batch
Using LayoutConstraint (senocular)
hi to all,
this is my first post in years using the forum, the search took me always to straight answers
i'm moving to AS3... finally!
know i'm looking for a easy to use way to align objects in stage, the one i used before was from elvis, chq.emehmedovic.com, and it was the perfect solution.
after search for the same but AS3 i found a post here from Slowburn:
http://www.actionscript.org/forums/a.../t-144138.html
sent me to download the senocular as files and give it a try. all seam to work, even more options that i had before.
the problem is i can get it to work if the contents of the movieclip i'm applying are being changed dynamically. this will give the movieclip a different width and height, and the "aligner" will act strange, scaling down the contents till i can't see it no more...
this is what i'm setting from the classes:
ActionScript Code:
var stageLayout:Layout = new Layout(stage);
var layout:Layout;
layout = new Layout(align, true);
layout.verticalCenter = 0;
layout.horizontalCenter = 0;
stageLayout.addChild(layout);
stageLayout.draw();
if someone have some experience working with those, please point me out something i can follow.
Thanks
Senocular DuplicateDisplayObject
Hi
I needed to duplicate a Loader and found senocular's class
http://www.kirupa.com/forum/showthread.php?p=1939827
However, i have followed this and ge the error
1118: Implicit coercion of a value with static type flash.displayisplayObject to a possibly unrelated type flash.display:Loader.
I thgouht it may be down to me attempting to duplicate a Loader, so i changed the instnace i was copying into a Sprite.... but i still got the error.
Has anoyone managed to get it to work?
Or has an alternative to copy the loader?
Help W/ Modified Senocular
This is an image fader by Senocular. The transition is on a seperate MC.
I am trying to figure out how to add text to accompany each image.
I've done this when loading images from an XML file, but this is beyond me.
Any help is greatly appriciated!!
// start //
var baseurl = _url.substr(0,_url.lastIndexOf("/")+1);
var dir = baseurl + "images";
var images = ["pic_1","pic_2","pic_3", "pic_4"];
playFade = function(){
this.gotoAndStop(this._currentframe + this.speed);
}
loadFade = function(){
var lod = this.fader.contents.getBytesLoaded();
var tot = this.fader.contents.getBytesTotal();
if (lod && tot && lod == tot){
this.speed = -1;
this.onEnterFrame = playFade;
}
}
pressForNext = function(){
this.speed = 1;
delete this.onPress;
}
fading_symbol.onFadeOut = function(){
this.speed = 0;
this.fader.contents.loadMovie(dir + "/" + images[0] + ".jpg");
images.push(images.shift());
this.onEnterFrame = loadFade;
}
fading_symbol.onFadeIn = function(){
this.speed = 0;
this.onPress = pressForNext;
}
fading_symbol.gotoAndStop(fading_symbol._totalfram es); // straight to onFadeOut
Senocular's Xml Tutorial
Senocular, could you please post a link for printable versions of the xml tutorials you are doing. They are excellent, but I do much better when I can read a tut while doing the exercise... I only have one screen too! Thanks.
Senocular 3d Tut Question
In the beginning of sen's 3d tutorial, there's an example of 3 guys moving back and forth and resizing so they look as if they are 3d..they move back and fourth with this function:
ActionScript Code:
backAndForth = function(){ this.z += speed*this.dir; if (this.z > 500){ this.z = 500; this.dir = -1; }else if (this.z < 0){ this.z = 0; this.dir = 1; } var scaleRatio = focalLength/(focalLength + this.z); this._x = origin.x + this.x * scaleRatio; this._y = origin.y + this.y * scaleRatio; this._xscale = this._yscale = 100 * scaleRatio; this.swapDepths(-this.z);};
then they are moved with this:
ActionScript Code:
figureA.onEnterFrame = backAndForth;figureB.onEnterFrame = backAndForth;figureC.onEnterFrame = backAndForth;
what i want to do is change the movement function into 2 seperate parts, back and forth, and set it up so you have to click a guy to get him to come foward, then click him again to send him back?
i've tried..but it's not working out, any help?
Senocular: Countdown
Hey.. I want to add years. I had no problem adding years to the basic script that was similiar to this I found on flashkit. What am I doing wrong here?
ActionScript Code:
this.secs = Math.floor(this.msecs/1000); // 1000 milliseconds make a second this.mins = Math.floor(this.secs/60); // 60 seconds make a minute this.hours = Math.floor(this.mins/60); // 60 minutes make a hour this.days = Math.floor(this.hours/24); // 24 hours make a second<b>this.years = Math.floor(this.days/365.242199); // 365 days make a year</b> this.msecs = string(this.msecs % 1000); this.secs = string(this.secs % 60); this.mins = string(this.mins % 60); this.hours = string(this.hours % 24); this.days = string(this.days);<b>this.years = string(this.years);</b> while (this.msecs.length < 3) this.msecs = "0" + this.msecs; if (this.secs.length < 2) this.secs = "0" + this.secs; if (this.mins.length < 2) this.mins = "0" + this.mins; if (this.hours.length < 2) this.hours = "0" + this.hours; while (this.days.length < 3) this.days = "0" + this.days;<b>if (this.years.length < 1) this.years = "0" + this.years;</b>
As you can see, bold is what I added
p.s. "this.days = Math.floor(this.hours/24); // 24 hours make a second"
Did you mean make a day? hehe
Senocular's XML Tutorial
First of all let me thank Senocular for his kick as* tutorial on xml and flash.
I don't know if that one is brand new or if I just missed it until today.
i'm working on the second example .swf. the portfolio one. I've built a similar .fla from scratch and am basically taking his code apart piece by piece.
When I debug, I can tell that i'm getting the xml nodes in because i'm getting the multiple container mc's for the menu.
for some reason I can get anything to appear in the menu_mc, the image_mc or any of my text boxes...
It's gotta be something in my AS, the XML seems fine to me (maybe someone else will prove me wrong there though)....
anyhow, if anyone has figured it out (Senocular's example) here's my XML and AS:
AS:
Code:
var thumb_spacing = 55;
// load variables object to handle loading of text
var description_lv = new LoadVars();
description_lv.onData = function(raw_text){
description_txt.text = raw_text;
}
function GenerateGallery(gallery_xml){
var GalleryPictures = gallery_xml.firstChild.childNodes;
for (var i = 0; i < GalleryPictures.length; i++){
var currentPicture = GalleryPictures[i];
var currentThumb_mc = menu_mc.createEmptyMovieClip("thumbnail_mc"+i,i);
currentThumb_mc._x = i * thumb_spacing;
currentThumb_mc.createEmptyMovieClip("thumb_container",0);
currentThumb_mc.thumb_container.loadMovie(currentPicture.attributes.thumb);
currentThumb_mc.title = currentPicture.attributes.title;
currentThumb_mc.image = currentPicture.attributes.image;
currentThumb_mc.description = currentPicture.attributes.description;
currentThumb_mc.onRollOver = currentThumb_mc.onDragOver = function(){
info_txt.text = this.title;
}
currentThumb_mc.onRollOut = currentThumb_mc.onDragOut = function(){
info_txt.text = "";
}
currentThumb_mc.onRelease = function(){
image_mc.loadMovie(this.image);
description_lv.load(this.description);
}
}
}
// xml object for xml content (defines sources for selections)
var gallery_xml = new XML();
gallery_xml.ignoreWhite = true;
gallery_xml.onLoad = function(success){
if (success) GenerateGallery(this);
else trace("Error loading XML file"); // no success? trace error (wont be seen on web)
}
// load
gallery_xml.load("tiger.xml");
stop();
and here's my xml:
Code:
<?xml version="1.0"?>
<gallery>
<picture title = "cave"
thumb = "images/thumbs/tcave.jpg"
description = "textfiles/cave.txt"
image = "images/lrgpics/cave.jpg" />
<picture title = "what's this guy holding anyway?"
thumb = "images/thumbs/tguyshands.jpg"
description = "textfiles/guyshands.txt"
image = "images/lrgpics/guyshands.jpg" />
<picture title = "crappy lake"
thumb = "images/thumbs/tlake.jpg"
description = "textfiles/lake.txt"
image = "images/lrgpics/lake.jpg" />
<picture title = "funky monks prepare to do battle."
thumb = "images/thumbs/tmonks.jpg"
description = "textfiles/monks.txt"
image = "images/lrgpics/monks.jpg" />
<picture title = "the monks' mountainside retreat"
thumb = "images/thumbs/tmountainside.jpg"
description = "textfiles/mountainside.txt"
image = "images/lrgpics/mountainside.jpg" />
<picture title = "buy two parrots, get one free!"
thumb = "images/thumbs/tparrots.jpg"
description = "textfiles/parrots.txt"
image = "images/lrgpics/parrots.jpg" />
<picture title = "we call it football in our country..."
thumb = "images/thumbs/tsoccer.jpg"
description = "textfiles/soccer.txt"
image = "images/lrgpics/soccer.jpg" />
<picture title = "shake your groove thing"
thumb = "images/thumbs/ttribal.jpg"
description = "textfiles/tribal.txt"
image = "images/lrgpics/tribal.jpg" />
</gallery>
any help would be great as I shamefully admit to being stuck!!!!
Senocular XML Portfolio
I'm using a version of Senoculars XML Portfolio. I'd like to have the info specific to the first thumbnail loaded first without clicking a thumbnail. Does this make sense? As it is now, the portfolio is blank until a thumbnail is clicked. I don't know how to call this info because it's all referenced with 'this'. I thought I'd do something like p = 0; and then have something like picture.loadMovie(image[p]); but.. that doesn't work.
Can anyone help? Posting my .fla would be the same as showing you this.
Thanks!
Senocular Says No, I Say Maybe? SwapDepths
Hi,
i am stuck with swapDepth over a timeline. i have 20 frames with labels inside an mc (called 'site') on the stage. i have a nav that jumps to the different labels inside site. on the keyframes, i have a some swapDepth stuff for sorting cards on the keyframe.
Problem is, i can't clear the the mcs that have swapped depth when i jump to a frame before the current frame.
According to Sen, there is no fix for this!!! here is the link:
http://www.kirupa.com/developer/acti...pt/depths2.htm
and the paragraph:
Quote:
Another problem, which may not be so obvious, is that concerning depth-swapped timeline instances. If you use swapDepths to bring a movieclip which was placed on the timeline in Flash out of the timeline zone and into a depth above 0, then in a timeline refresh, that clip will not be removed in Flash's clearing of the timeline instances and a new instance of that clip will be placed on the screen at its original depth, effectively duplicating it. Similarly, to avoid this, don't do it. Again, its safe in controlled timelines, but otherwise, its risky. Something to be aware of nonetheless.
does anyone know a workaround? i can fix it i think by putting everything on 1 frame, but this is a LOT of work late in the project.
any help is really appreciated!
thanks
Senocular Forum
Why the senocular forum is almoust like a gost town? I mean, why is not like kirupa's forum. I don't think that Kirupa knows more actionscript that senocular...
XML Menu By Senocular
http://www.kirupa.com/developer/acti...pdown_menu.htm
Ive followed the menu by senocular and everything works great. my question is, is it possible to change the over/down state of the childs of the submenu?
I did do a search on the forum for this and there wasonly one topic discussed but never answered.
any help would be appreciated,thankyou
Tracy
(if this is the wrong section, please move)
Senocular's Xml Tutorial?
I thought I saw a fairly lengthy tutorial/info base about xml and flash that had been written by senocular, but I can't seem to find it.. anyone know where that is?
LostInBeta, Or Senocular Need Some Help
Ok, I am using your submenu system that has your names in the as code, so I fig ure i shoulda ask you. I implmented the menu on a new site I am designing, the only problem is the URL will not work, and how would I make them load into a iframe? The iframe name is set to main.
In the XML file would I do:
<ITEM NAME="Leagues">
<SUBITEM NAME="CAL-IM" URL="link.html" TARGET="main" />
</ITEM>
Any help from any1 would be great right now. To see the culprut that I am talking about check, www.evilattitude.com/vexed and you will see the menu. Thxs.
Xmlmenu By Senocular
Hi,
I'm pretty new to Flash. Right now I'm going line by line with senocular's xmlmenu tutorial. I have a question. Why do I get a syntax error, if I try to import a blur filter in it?
The line, making me trouble is the first line when importing a filter - import flash.filters ....
Filters are still a little mystery to me.
THX for any help
|