741 Forum Posts by "Jams44"
So I have been slaving at this menu in MooTools (why didn't I just choose jQuery?!?!) and I am 99.999% done. The only thing I am having trouble with is page centering. When the menu is completely open, it is centered due to the width of the #container. When it is closed, however, it is offset to the left because of the width of the container.
What I am asking is....how can I adjust the width of the container onOpen and onClose fluidly using MooTools.
Here is my code: http://jsfiddle.net/radiantstatic/ww7UU/
10/
Any help is much appreciated.
Thanks,
Joe
I've got a slideshow script that I've been using and I wanted to modify it a bit. I wanted to make it so that the further away from the center the mouse cursor is, the slower the slideshow. The closer to the center of the flash document, the faster it goes. Can anyone help me out?
Here's the code I've got thus far:
// import tweener
import caurina.transitions.Tweener;
// delay between slides
const TIMER_DELAY:int = 3000;
// fade time between slides
const FADE_TIME:int = 1;
// reference to the current slider container
var currentContainer:Sprite;
// index of the current slide
var intCurrentSlide:int = -1;
// total slides
var intSlideCount:int;
// timer for switching slides
var slideTimer:Timer;
// slides holder
var sprContainer1:Sprite;
var sprContainer2:Sprite;
// slides loader
var slideLoader:Loader;
// url to slideshow xml
var strXMLPath:String = "slideshow-data.xml";
// slideshow xml loader
var xmlLoader:URLLoader;
// slideshow xml
var xmlSlideshow:XML;
function init():void {
// create new urlloader for xml file
xmlLoader = new URLLoader();
// add listener for complete event
xmlLoader.addEventListener(Event.COMPLETE, onXMLLoadComplete);
// load xml file
xmlLoader.load(new URLRequest(strXMLPath));
// create new timer with delay from constant
slideTimer = new Timer(TIMER_DELAY);
// add event listener for timer event
slideTimer.addEventListener(TimerEvent.TIMER, switchSlide);
// create 2 container sprite which will hold the slides and
// add them to the masked movieclip
sprContainer1 = new Sprite();
sprContainer2 = new Sprite();
mcSlideHolder.addChild(sprContainer1);
mcSlideHolder.addChild(sprContainer2);
// keep a reference of the container which is currently
// in the front
currentContainer = sprContainer2;
}
function onXMLLoadComplete(e:Event):void {
// create new xml with the received data
xmlSlideshow = new XML(e.target.data);
// get total slide count
intSlideCount = xmlSlideshow..image.length();
// switch the first slide without a delay
switchSlide(null);
}
function fadeSlideIn(e:Event):void {
// add loaded slide from slide loader to the
// current container
currentContainer.addChild(slideLoader.content);
// clear preloader text
// fade the current container in and start the slide timer
// when the tween is finished
Tweener.addTween(currentContainer, {alpha:1, time:FADE_TIME, onComplete:function() { slideTimer.start(); }});
}
function switchSlide(e:Event):void {
// check, if the timer is running (needed for the
// very first switch of the slide)
if(slideTimer.running)
slideTimer.stop();
// check if we have any slides left and increment
// current slide index
if(intCurrentSlide + 1 < intSlideCount)
intCurrentSlide++;
// if not, start slideshow from beginning
else
intCurrentSlide = 0;
// check which container is currently in the front and
// assign currentContainer to the one that's in the back with
// the old slide
if(currentContainer == sprContainer2)
currentContainer = sprContainer1;
else
currentContainer = sprContainer2;
// hide the old slide
currentContainer.alpha = 0;
// bring the old slide to the front
mcSlideHolder.swapChildren(sprContainer2, sprContainer1);
// create a new loader for the slide
slideLoader = new Loader();
// add event listener when slide is loaded
slideLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, fadeSlideIn);
// add event listener for the progress
// load the next slide
slideLoader.load(new URLRequest(xmlSlideshow..image[intCurrentSlide].@src));
}
// init slideshow
init();
Sorry for the double post, I totally screwed that last one up....let's try this again,
I've got an XML file that's all out of whack but I know what I want to do with it.
I'd like to replace all instances of the <description> tag with one thing. Let's say a $newdescription string.
I'd also like to reformat the content in the <title> tag which appears like this:
<title>dynamic title 1</title>
<description>content</description>
<link>dynamic url 1</link>
<title>dynamic title 2</title>
<description>content</description>
<link>dynamic url 2</link>
I'd like it to be reformatted to be a URL using the contents of the <link> tag.
So imagine each title has its own <title> with its own attributes.
$titleattributes = Content between title;
$linkattributes = Content between link;
I'd like the <title> to be reformatted to
<title><a href="$linkattributes">$titleattributes</a></title>
What's the best way of approaching this. Sorry if it makes absolutely no sense.
Okay, this is a doozy. Or perhaps not.
I've got an XML file that's all out of whack and but I know what I want to do with it.
I'd like to replace all instances of the <description> tag with one thing. Let's say a $newdescription string.
I'd also like to reformat the content in the <title> tag which appears like this:
<title>Title 1</title>
<title>Title 2</title>
I'd like it to be reformatted to be a URL using the contents of the <link> tag.
So imagine each title has its own <title> with its own attributes.
$titleattributes = Content between title;
I'd like the <title> to be reformatted to
<title><a href="$titleattributes">$title</a></title>
What's the best way of approaching this. Sorry if it makes absolutely no sense.
Hey,
Still can't figure it out. Changed the page accordingly and still nothing.
Jake and Momo,
Thanks for your responses. I'm taking a look at it right now. As of late I've been making such ridiculous mistakes that have nothing to do with logic and everything to with exhaustion, haha.
Momo, I would have just taken a look at the source but the displayed source is ultimately the DOM output so it doesn't do me much good. I'll still take a look.
Thanks again.
Hey all,
I'm trying to emulate this page: http://spaceforaname.com/panels.html
I normally have no trouble with this but have been having the worst time with this gallery. I'm using it here: http://radiantstatic.com/dev/web_store/ and can't get it to display anything.
If anyone could help me out, that would be much appreciated.
- Joe
Do you know by chance how to do this with radio button? I'm doing a Terms of Agreement and I want the submit button only to appear after the "I Agree" radio button is selected. Inversely, if they reselect the I Disagree, it hides the div.
Thanks ahead of time.
nevermind - got it fixed!
Okay,
I've figured out everything except why my content won't center itself within Safari. Anyone have any idea why? Auto margin doesn't seem to be working. Any help would be much appreciated.
Thanks,
Joseph
Would I clear it in the container or in the actual div itself? And if so, both or one specifically?
Thanks.
I'm having an issue with a basic mock layout of mine.
In Safari, I am getting this issue, when the right content is set to float:right; -
http://img13.imageshack.us/img13/1881/sc reenshot20100312at626.png
It's resolved when it's set to left but then the layout doesn't center itself in the window. And if the window is too small, the right content is pushed down. Any ideas why this is happening?
Why isn't the right content being contained by the main div's absolute width?
Any help would be much appreciated.
Thanks,
Joe
So I've found I can do a lot of my project using the OpenCV framework. So I'll record all my progress here. I've already have got image capture successful. I'm going to figure out how to save the image file next, ill post here. Take note this is currently for use with an iSight although its pretty easy to use any registered camera.
Here is the framework: http://opencv.willowgarage.com/wiki/
#import <Cocoa/Cocoa.h>
#import <OpenCV/cv.h>
#import <OpenCV/highgui.h>
int main()
{
//create camera object by using device 0
CvCapture* capture = cvCaptureFromCAM(0);
//create image object to be used
IplImage* img = 0;
// capture a frame from the camera to see if it is working
if(!cvGrabFrame(capture))
{exit(0);}
//capture the first image from the camera
img=cvQueryFrame(capture);
//create the windows to display the images
cvNamedWindow( "Image Capture", 1 );
//show the images in the correct windows
cvShowImage( "Image Capture", img );
//wait for the user to press anything
cvWaitKey(0);
//release camera, images, and windows
cvReleaseCapture(&capture); cvReleaseImage(&img); cvDestroyWindow("Image Capture");
return 0;
}
So here's some info I've gathered so far:
http://iphone-cocoa-objectivec.blogspot.
com/2009/01/using-opencv-for-mac-os-in-x code.html
I'm looking to do a quick programming project (may not be too quick) and I was wondering if you all could help me out. So I'll explain the concept and then maybe someone can help me move forward on it.
So the idea is I would like to make a fake "visual / audio memory bank" but it will be based on many factors (can be limited based on programming difficulty).
The tools that would be used is a external mic (or built-in computer) and a webcam (in my macs case, the built in one). The program would at certain intervals decide to either 1)Record Video / Audio for a specific period of time 2) Record just Audio 3) Take a snapshot. After that it would catalog the file in a folder of choice. The next time the program runs, it determines whether or not it will overwrite or delete the last written file or create a new one. If it creates a new one, the previously recorded file will never be destroyed or overwritten.
The idea is that the program will decide what "memories" to keep and what not to. I'd like to use this as a base in an art project I'm working on and perhaps you all can help me.
If it means anything, I'm working on Mac OSX and have been looking at XCode some. Maybe thats the wrong step. but please help me out!!! I'm limited on time!
As always, thanks ahead of time -
Joe
I'm trying to load an image by its URL in javascript. It will be changed dynamically from flash. How do I display an image from a variable with the URL in it?
Thanks,
Joe
Hey Renae!
Yeah, its been a LONG time and it feels as if I'm starting over here but hopefully I get some good content to use. It would be great if you contributed but obviously I'm not forcing anyone to do any work they don't want to do!
So funny that you recognized me.
- Joe
We've got about 3 great little clips from NG members but we sure could use a lot more. Remember this is a great opportunity to get your name out in the public!
At 11/20/09 09:18 PM, Mexifry wrote:At 11/20/09 08:58 PM, Jams44 wrote: Still open for plenty more!Something that might help the readers gain some interest is to make your claim sound more legitimate.
- Joseph
Here's a few questions I though of that might help people jump on board this.
Do you have a website?
How long have you been in music?
What's some of your background?
What are the frame rate specifications?
Where's a link to the song that we are animating to?
What does the animator get in return? Money? Credits?
http://radiantstatic.com is my basic portfolio site, nothing spectacular
I've been in music as long as I can recall, I've worked for a record company here in Syracuse for almost a year now and I've been writing/performing for about 4 years. None of this has to do with the topic at hand. Its not even my music we will be animating to.
The frame rate doesn't matter, as long as it fits with the sound clip provided. That means its 30,60,120, or 240 bpm which can be easily translated to fps if needed. Just use the audio file.
As I mentioned earlier, the audio can't be released until the release of the video itself, not my rules, its the label's rules. And also, as mentioned before you will receive credit in the credits for your work. I'm not getting paid for this, its just a project I'm working on. Certainly a great thing to add to your portfolio. Post if you are interested.
Still open for plenty more!
- Joseph
Hey Guys,
As a part of the ongoing promotions the record label I work for is doing, my studio concepts class will be shooting a music video for one of the bands. Right now, we are coming up with ideas but I am looking to do something along the lines of this:
So what I am asking is this...
If you would like to have one of your animations featured in the music video as well as your name in the end credits, shoot me an email or post here.
We are looking for characters that are very similar to those in the video posted above, they will be imported into After Effects and placed accordingly throughout the video. While we already have basic characters for the main focus of the video we are trying to gather many many many more.
http://radiantstatic.com/files/audio/120 bpm.mp3
This is an audio file you can sync your animation to. Snare/Bass drums are 1/2 notes while bass drum is played every 1/4 note. The animated character(s) must be on a blank stage. Size is not really an issue, the bigger the better (easier to size down). If you'd like to do more than one character, go for it. You'll probably get your credit text in a fancy color or something, haha. Please refrain from adding any background elements into the animation. For multiple characters, please use multiple .fla project files.
Also, in the style of the animation posted above, we would appreciate that all submissions be frame by frame. However, there are always exceptions.
Anyways,
If you are interested, drop me a line at jams44@gmail.com or post here.
If you have any questions, post away.
PS
I can't play you the song and I can't tell you the band/artist. I'm sorry, but I have to follow rules too.
When all is done, everyone will be free to watch/download.
Love,
Josepn
Okay, so I have an assignment (I'm in art school) that requires me to use Word as the main medium for a project. Without going to far into the whole objective of this project, I need some help.
I need to get a period (as in ".") on the last line of every page. There is only one period on every page and it must start on the left side and end on the right side. Each period must be one space to the right of the period on the previous page. Now, is there anyway I can run a script to do this for me? I'd rather not manually make 150+ pages and move the period across myself but I may have to.
I know this seems utterly and completely ridiculous, but maybe there is some sort of automation I can use.
At 11/17/09 11:48 AM, Deathcon7 wrote: First, where ever you copied that from, it's archaic. It's possible to do exactly the same thing with half the lines.
Second, your drag function is backwards. It should be left, top, right, bottom.
No matter which way I switch it, it still only drags downwards. And the script was taken from a tutorial that revolved around playing audio files from an XML file list. Sadly written in AS2. If you have a suggestion on how to better write it, please elaborate.
At 11/17/09 12:26 PM, henke37 wrote:At 11/17/09 11:08 AM, Jams44 wrote: The math for the volume is correct.No, it is not. The volume increases as it is moved downwards. This clearly is the right scenario in your picture, the one marked as "do not want".
I'm aware. I was explaining that the basics behind the volume was right or else it wouldn't work in the first place. It's not that I need to take a class on linear functions because this is the only time I will be working with Flash/ActionScript. Just lookin' for some help.
At 11/17/09 01:31 AM, henke37 wrote: I don't think that you are considering the height of the handle itself in the calculations. The limitation box is restricting the registration point, not the full object. (But that's just my guts speaking, not something I looked up)
For the volume issue, you are not doing the right math. You should take some classes in linear functions and figure out what the issue is.
The math for the volume is correct. If anything it's just inversed. It's proportionally risng and declining within the restrictions of the slider. It just so happens that the slider is out of place and that it is going down.
I originally had this working in a left to right position. However, due to space restrictions I needed to convert it to a vertical volume bar, this is where I ran into problems.
Can anyone else help?
Okay,
So I've been slaving away working on this stupid translucent flash player bar thing. Anyways, I can almost see the light but I've been stuck on one problem and one problem only. I'm trying to make a vertical volume bar and slider. As you drag the slider up the volume does up. As you drag the slider down, the volume goes down. However, the slider isn't staying within its constraints. In fact, it is directly the volume bar but still holds the height constraints. However, as the slider goes down, the volume goes up. Here's my code and attached is an image of the problem.
this._parent.volume1.dragger.onPress = function() {
startDrag(this, true, this._x, 0, this._x, this._parent.volBG._height);
_root.toolTip._visible = true;
setInterval(draggableTip,100);
function draggableTip(){
_root.toolTip._y = _root._ymouse;
}
this.onEnterFrame = function() {
var p = (this._y/this._parent.volBG._height)*100;
this._parent._parent.sound_mc.sound_obj.setVolume(p);
};
};
this._parent.volume1.dragger.onRelease = function() {
delete this.onEnterFrame;
stopDrag();
};
this._parent.volume1.dragger.onReleaseOutside = function() {
_root.toolTip._visible = false;
stopDrag();
};
Does anyone have any information on how I should go about making a flash audio streamer that is fred data from a XML file. I essentially need control buttons, volume control, text display, and a progress bar. Any suggestions? Anyone willing to help me out?
At 11/15/09 05:46 AM, hdxmike wrote: Well like said JS might be better but i would do it in flash completely because it would be shit easy and i could get some nice music player visualizations and browsers n shit but thats just me
shit
I'm going to try my best to stick within flash, far more resources to specific instances of projects. An example: a flash audio streamer/player. Also, the player will just be simple audio controls, Back PAuse Play Forward and possibly a status bar.
At 11/15/09 05:37 AM, andy70707 wrote: not as far as I know, I know you can do it with adobe AIR but I have never figured out how to do that. Your best solution would be to stick the part of the background the flash player would be on in the actual flash underneath the transparent area, so it looks semi transparent.
Actually, just found a link to do so, so I've answered this question but I've got a couple more.
http://www.kirupa.com/developer/mx/trans parency.htm
At 11/15/09 05:20 AM, ZuiGe wrote: Go to the Flash portal, open a random flash, then scroll up and down.
Yes, it is possible but doesn't work very well as you see. The movie starts twitching and moves to odd spots. I think the only way to do what you're trying to do would be using javascript, not flash.
I think you misunderstood the concept. The movie will not be moving.
Anyways, now that I got that problem solve, can anyone direct me into how I can go abouts making a flash audio streamer that feeds off a XML feed??
Worked perfectly, thank you!
Hi Everyone,
Long time no see.
Here's my question:
I asked the programming forum for help regarding creating a bar on the top of a webpage that remains static as the page is scrolled. My reasoning for asking this is because it will contain a flash music player that will be feeding off an XML script (Artist, File Location, and Image file location). Thing is, I'm trying to make the bar translucent while keeping the album art at 100% opacity. I can load the image art using javascript from flash but my main concern is, can I embed flash and still uphold translucency. In layman's terms, is there a way to "see through" the flash player to the content below? This may be really easy but seeing as I have little to no Flash/ActionScript knowledge (although I'm sure to learn from this project), I'm not sure if this is possible.
Any help would be greatly appreciated!
- Joe
PS Attached is an image to explain what I am doing.

