how to create a sliding open door effect - jquery-animate

i'm looking to create a sliding open door effect with jquery that has the following functionality:
arrive on the page and the doors are closed
click a link and the doors slide outwards a fixed amount on the x-axis
click the same link again and the doors close
i started out with the concept here, which works great:
http://buildinternet.com/2009/07/animate-curtains-opening-with-jquery/
but realised that i wanted the doors to slide across, rather than shrink in size, using the type of functionality seen here:
http://ricostacruz.com/jquery.transit/
so i think what i am looking for is some type of 'animate' functionality:
http://api.jquery.com/animate/
this is the logic of the functionality i am trying to achieve:
static state:
background: an image that is revealed when the doors slide open.
door-left-inner: 122px wide x 244px high, centered and offset left -61px with z-index 3.
door-left-outer: 122px wide x 244px high, centered and offset left -151px with z-index 2.
door-right-inner: 122px wide x 244px high, centered and offset right 61px with z-index 3.
door-right-outer: 122px wide x 244px high, centered and offset right 151px with z-index 2.
onclick (all these functions take place at the same time):
door-left-inner x-position slide on click: -164px on x-axis.
door-left-outer x-position slide on click: -74px on x-axis.
door-right-inner x-position slide on click: 164px on x-axis.
door-right-outer x-position slide on click: 74px on x-axis.
here is a diagram of what i am trying to achieve:
attempted code (not currently working)
$("#open_close_doors").click(function(){ $("#leftdoor_inner").animate({"left": "-=50px"}, "slow");});​
and here is my jsfiddle attempt at getting one of the doors to slide - i figure once i know how to get one of the doors sliding i'll be able to apply the same logic to the others. also i'm a relative newb to jquery.
http://jsfiddle.net/9zsdN/
thank you.

Here's the corrected jsFiddle for the same: http://jsfiddle.net/9zsdN/1/
$("#open_close_doors").click(function(){ $("#leftdoor_inner").animate({"left": "-=50px"}, "slow");});​
It should be:
$(".open_close_doors").click(function(){
$("#leftdoor_inner").animate({"left": "-=50px"}, "slow");
});​
The difference lies in the way you access an element. As you can see, when you access an element by class, you use " .classsname" instead of "#classname" as you have done.
"#name" is used for accessing elements by their id.

Related

Blender boolean subtraction not rendering in Cura 3d

I am trying to make a simple 3d object to print out on my 3d printer using Blender.
I have succeeded in creating what I want in Blender, which is essentially a platform 100mm x 120mm x 15mm with an inset trough of 10mm depth this leaving a 10mm border around the trough.
Looks spot on in Blender.
I have removed the inset object and checked that it looks ok.
Then I export it to an STL and open it in Cura 3D and I just get a solid platform, it's like it has ignored the boolean subtraction.
What am I doing wrong? Edit : Apply Modifiers is ticked.
In the boolean modifier tab you should be able to see a little down arrow to the left of the "X" button above difference (see first picture). When you click the drop down button, you should see a button that says apply(see second picture. When you hit apply it will apply the modifier and you will see the boolean modifier disappear and be good to remove the other object used in the modifier (pictures 3 & 4)
Picture of the location of the drop down button
Picture of the drop down menu
Modifier Goes away
Finished product with Difference modifier

Form resizing OnResize-event

On a form I have a rectangle with the vertical anchor set to both. After every form-resize I need to execute code that depends on the new size of the rectangle.
When I execute the code in the OnResize-event of the form, I only get the size of the rectangle at design-time.
Having no better solution even after 2 months I take it the best way is what I described in the comments above:
I put a second rectangle at the lower righthand corner of the rectangle in question and calculate the size of the original rectangle as difference (original.width=dummy.left-original.left ...)

ClickTag banner issues in Flash CS5

I've created some animated as well as static banners in Flash CS5 and I'd like to apply clickTag ActionScript 2.0 code to them. However, I only found tutorials where over all the existing layers, you create a rectangle using the Rectangle Primitive Tool, set the border, fill, and opacity to 0 and then apply the code and export the movie. When I create the rectangle, there is no setting for opacity, and when I set no border and no fill, the rectangle disappears and the dark dot in the timeline becomes empty so I can't click on the rectangle in order to convert it into a symbol.
I would really appreciate any advice on this!
Create your rectangle using 'Rectangle Primitive' tool shapes menu instead of the regular Rectangle tool.
select your rectangle by a single click.
From the properties panel select the bucket symbol (the one used to control the fill color) and you will find a setting 'alpha' for setting the transparency.
change the alpha value to 0. after that remove the stroke.
select your rectangle, from the top menu : Modify > Convert to symbol. give it a name and select 'button' from the dropdown. press ok.
now select the button you just created, open the actions panel and paste the following code :
on (release) {
if (clickTAG.substr(0, 5) == "http:")
{
getURL(clickTAG, "_blank");
}
}

Dynamically set maximum scale of horizontal pointer slide in labview?

I want to make a primitive movie player in Labview. I want the user to be able to load in a movie and have a slider to select frames. As such, I want the range of the slider to go from zero to N where N is the number of frames in the movie.
How do I set the scale of the slider programmatically?
I don't see any inputs to the slider, only one output.
Here is an example of a "Horizontal Pointer Slide" bar taken from the NI Website. The slide bar is in the upper right hand corner of the image.
Right click on the slider:
Create -> Property Node-> Data Entry Limits -> Maximum
Create -> Property Node-> Scale -> Range -> Maximum
This creates property nodes you can wire up to set the maximum limit of the slider.

Empty pages in RDLC-Report

I have a rdlc report that conains a tablix, nothing other. The Tablix expands in horizontal direction to show days and in the vertical direction to show groups.
The tablix works as expected, as long as I set the width of the content area equal to the width of the tablix.
If I expand the content size to its fixed size (approximately PageWidth-PageBorders) and run the report, every second page is an empty page.
However the tablix only uses one page. Every odd page is absolutely empty. It seems that the tablix adds its horizontal expansion to the currently definied content width and calculates then the overflow.
The reportviewer Version is 3 (2010 Redistributable)
Does someone have a solution for this odd behaviour?
Update
If I export the report to excel, I see that there is on the right site of the tablix a column that is exactly as long as the generated items for the days. It seems realy to be a bug or a feature I don't see how to deactivate.
I also have tried to create the same construction from a table, and it resulted in the same problem, what not is astonishing, because the table is internally also a tablix.
Update 1
If I set the property "ConsumeContainerWhitespace" of the report to true, the above test version works. But if I place then other elements in the "white" area, the effect reocurrs.
Setting the page-property ConsumeContainerWhitespace=true (in the properties dialog, F4) has helped. However it was anyhow tricky to build the report correct. At the begining it worked only if I added all extra content to the page-header and footer. But this was not acceptable. After a lot of trying, I succeed in making the report as desired. However I don't really understand the logic behind.
I have in mind that I already have done such reports (growing in both directions, horizontally and vertically together) without any problems and I don't know what is difference to this report here. For this report, it's definitively reproducable that the ConsumeContainerWhitespace-property makes the difference. But why this never happens to me for similar reports I have done, I don't know. Also I don't know why I had first to circle around before the layout-engine accepted my design.
The best way to solved this problem is, for example for an A4 page where
Width=21 cm and Height=29.7 cm
Now Margin Left=1 cm and Right=1 cm so you are having a usable width of 19 cm.
When you have understand this basic calculation that means your problem is solved. You can set up the report page size properties by right clicking on the report property => pagesetup.
I was working with an RDLC report that was printing an extra blank page. I tried all the usual tricks, and everything I could think of, until I realized the problem was caused by an extra amount of visible whitespace in the right margin area of the report. One of the objects in the report (a "Rectangle") was a single pixel or two too wide, and this prevented resizing the visible space of the report. Once I removed all the extra width, the report started printing with the expected number of pages.
Visual Studio 2017 (15.7.5) + Microsoft Rdlc Report Designer extension (v14.2)
I had a similar problem, I solved it this way
For instance for width, the following equation should be satisfied
PageSize >= LeftMargin + BodySize + RightMargin
where to find BodySize?
Press F4 -> CLick somewhere inside the report -> you will find body property(look at size property, take the width value)
Where to find report PageSize?
click somewhere outside the report -> you will find report property ( look at PageSize (take its width value), and margins (Left, right, ..), take left and right margin values)
take values from these properties, and check if they meet
PageSize >= LeftMargin + BodySize + RightMargin
Check the "body" size, try to make it as wide and height as your real paper size but reduce only the margins.
There is a confusion there on the page design. Developers would think the report being designed is WYSIWYG, but actually it's NOT!! Microsoft reportviewer will take your designed page as the content!! and append the margins defined on the outside of your page, and turn out that your page can never fit in to one page!!
So, when you design a new report, focus on the content area, the client area, including your headers and footers, and allow margins to be appended on your outer border.
the solution is simple ConsumeContainerWhiteSpace=True (you find this in the property window for "report") you set the paper size in the main menu/ report/report properties for example to "A4" and then you check that paper size is larger then body + header + footer + margins.
I was having the same issue until I played with the report body's height and width. :)
Please select "Report" in the object selector at the top of the window.
and make the ConsumeContainerWhiteSpace = true
if the also same problem persist then, your rdlc report size should be less than your report body.!
I have meet this problem recently.
The root cause may be:
your report's body has some blank upside report Footer or somewhere else.
The solution is :
1, click the report body
2, go to the property window, you will see the body size property
3, check the body size, you may find a strange number like 9.6654in,1.5625in.
that means you have some blank upside the Footer, modify the height or width size till there is no blank you can see.
Go to Property F4
Select Body
Write width and height to 1cm
Visual studio will overwrite to the smallest Body possible
Done.
You need set report width property to actual print page width. In my case 6 inches helped.
You need to make sure your RDLC Report have :
ConsumeContainerWhiteSpace = true (open by click F4)
Report Body Size <= Page Size+margin Size. (open by Ctrl + Alt + D)
Page Footer may cause the problem too. So if you have one, it's better to place it as near as possible to the main content. In this case you don't need to set the Body.Height property.
My 4x2 inch label was printing 3 extra pages for a one page report.
To fix it, I reduced the Body.Size attribute to be same or smaller than the Report.PageSize minus the summed respective Report.Margins.
Try this one,
Just make sure that all Data the needed is in the report,
Then Select the Table or the Matrix and make it squeeze to the left and if needed to the Top Left Corner until your white Page Problem is Done.
But make sure that the cells are squeezed in the right manner, Be gentle (I hope you got it !!)
Ok, Bye
Or you can just graphically resize your report design, to the exact bottom of the last report control or label.
Or add a footer section to create some space.
I thought this important enough to put here, especially since every day more of the critical information we need to do our jobs keeps disappearing:
From response to The "Every Other Page Is Blank" Feature
Many Reporting Services users ask this question:
"I'm rendering to a physical page format (PDF, Image, Print) and for
some reason a blank page gets inserted between all of the other pages
in the report. Thank you, Reporting Services, for the free pages.
It's a charming feature, but paper ain't free and I'm getting paper
cuts pulling out every other blank page after it's printed. How do I
make it stop?!"
To which I reply:
This is almost always caused by the Body of your report being too wide
for your page. Make sure that the Width of the Body is less than the
physical page size, less the margins. For those of you who are into
the math thing, make sure that:
Body Width <= Page Width - (Left Margin + Right Margin)
For physical page renderers, it's important to keep in mind the
concept of Usable Area. The Usable Area is the amount of space left
on a page for your report to be drawn after reserving space for
margins, headers and footers, and column spacing (for multi-column
reports).
Horizontal usable area:
X = Page.Width - (Left Margin + Right Margin + Column Spacing)
Vertical usable area:
Y = Page.Height - (Top Margin + Bottom Margin + Header Height + Footer
Height)
Any time objects on your report (including the Body itself) extend
past the usable area either because they are defined like that or
because they grow at runtime, the physical page renderers have no
choice but to break onto a new page.
Make sure Body size is cm , not in(inch)
For me when I increase the width for pagesize report from 21 to 23 cm , It was not generating extra empty page.
Because of few elements total size of my report's element was greater than 21 and less than 23, that is why I changed to 23cm and works for me.
In my case I have only one page and I was working with .rdl file.