CreateChildSymbol on the straight edges of top bottom left of the window/step?
I'm creating a particle system and I am trying to generate particles / CreateChildSymbol on the top left bottom right edges of the window/scene?
Currently I'm generation random X & Y points but that is not really what I need.
find the stage width & height | ||
sym.maxWidth = $('#Stage').width (); | ||
sym.maxHeight = $('#Stage').height (); |
Alternate numbers 1 to 12 | ||
var randomSymbol = Math.floor ((Math.random () * 12) + 1); |
Pull the symbol of the lib and add to the scene | ||
sym.mainParticle = sym.createChildSymbol ("symbol_ani_" + randomSymbol, "Stage"); |
Create the jQuery object / Edge Ani element var | ||
sym.mainParticleElement = sym.mainParticle.getSymbolElement (); |
| |||
var randomX = Math.floor (Math.random () * sym.maxWidth); | |||
var randomY = Math.floor (Math.random () * sym.maxHeight); |
position based on random scene X + position Y | ||
sym.mainParticleElement.css ({'position': 'absolute', "top": randomY + "px", "left": randomX + "px"}); |
But I am at a loss of how to randomize the top / right / bottom / left edges X & Y of the scene
He has got to work!
Well to be honest another friend helped me to establish the logic for randomizing the sides (up, left, down, right) to operate.
But I wanted to share because I had a hard time finding anything releated to this topic. Big up to Resdesign + Tim Jaramillo who helped me with logic along the way as well!
These variables are global to breast compReady would need to change to sym. instead if necessary var outside of this
var moveToX = $(window) () .width / 2,.
moveToY = $(window) () .height / 2;
function spawnParticle() {}
These variables are available only within this function
side var = Math.floor (Math.random () * 4).
offScreen = 100, / / the number of pixels off the coast on the side of the screen to start
yRand = Math.floor (Math.random () * $(window) .height ()),
Enough = Math.floor (Math.random () * $(window) .width ()),
PosX = 0,
yPos = 0;
switch (side) {}
case 0:
PosX = enough;
yPos = - off the screen;
Console.log ("spawn of top '");
break;
case 1:
Console.log ("spawn of right");
PosX = $(window) () .width + off the screen;
yPos = yRand;
break;
case 2:
Console.log ("spawn on the bottom");
PosX = enough;
yPos = $(window) () .height + off the screen;
break;
case 3:
PosX = - off the screen;
yPos = yRand;
Console.log ("spawn on the left");
break;
}
Add to the scene
sym.mainParticle = sym.createChildSymbol ("star", "Stage");
sym.mainParticleElement = sym.mainParticle.getSymbolElement ();
sym.mainParticleElement.css({'position':'absolute','top':yPos+'px','left':xPos+'px'});)
simple animations to reveal the particle
sym.mainParticleElement.animate ({left: moveToX, top of page: moveToY}, 1000, function() {})
for this test, I'm removing the particle after the end of the animation
{$(this) .fadeOut (function ()}
$(this) .remove ();
});
});
}
keep spanwing new particles
setInterval (spawnParticle, 500);
Tags: Edge Animate
Similar Questions
-
Impossible to move the screen image. I fly over the edge of the arrow of the mouse to drag the inside of the screen and it won't work. Neither left nor right, neither the top or bottom. I have to be able to do this because my monitor has an error of graphics on the right side of the screen-screen covering about two inches of width of the length of the right side of my window screen image, so I do not see where to put my mouse cursor to scroll vertically. In addition, sometimes I want to remake the image of the window longer or shorter, and I can't do same. It seems that it is a matter of "settings". Just do not know how to activate it. Help, please.
See next post
-
How to position my tag div with top, bottom, left and right attributes?
So I have my background image and then I want only the sides to display so I put my div tag in the Center and does it extend to the edges of the top and bottom of the page, then theres a little bit of the background image on the sides of the white div. Than perfect, but when I focus I had to remove the position attribute. Now, I can not use the up, down, left and right attributes.
OLD CODE WITHOUT A CENTER:
{#whitediv}
position: absolute;
Top: 0px;
Width: 930px;
height: 100%;
z-index: 1;
background-color: #FFF;
}
NEW CODE WITH CENTER POSITION BUT CANT IT:
{#whitediv}
position:;
Top: 0px;
margin: 0px auto;
Width: 930px;
height: 100%;
z-index: 1;
background-color: #FFF;
}
To Center elements with CSS, you need 4 basic things.
- A document type is valid,
- width in pixels, % or ems, container
- a margin left and right of the automobile,
- default positioning (static or not specified).
For example, the following page has a centered division.
http://ALT-Web.com/test/resizable-BG.shtml
The background image is applied to the CSS body selector.
/ * DIV CENTERED * /.
{#page online purchase
Width: 70%;
margin: 5th auto;
Padding: 3em;
background: rgba (0,0,0, 0.70);
color: #FFF;
}Nancy O.
-
createChildSymbol at the bottom of DOM?
When you place a createChildSymbol on the scene, how do I place it to the background hierarchy, instead of default top?
You mean presenting it the back of the elements or positioning at the bottom?
Both can be set using the css dynamically
-
My hp 4632 is cutting off the top & bottom of my pages when I try to print with double-sided printing. Y at - it a fix for this problem?
Hello!
Welcome to the HP community @hoylep,I saw your post on your Officejet 4632 cutting the ups and the downs off printed pages and wanted to answer to help you. My suggestions are below.
1 reset the printer and make sure the printer is plugged directly into a wall outlet, avoiding bars power and surge protectors.
2 start the print and Scan Doctor for Windows in order to solve printer problems
3. try the steps in this guide: fixing poor print quality
4. Uninstall and reinstall the printer. You can use the printer Installation Wizard to install the printer.
5 print from other programs.
If the problem is not resolved at the time where all the above steps are performed, contact HP to discuss alternatives to the printer.
If you have trouble, let me know and I'll do my best to help.
Click on the thumb to below testify my help!
Click on the 'accept as Solution' If I guided you towards a solution!Best wishes
HP technical support are available by clicking on the following link:
http://h22207.www2.HP.com/us-en/?openCLC=true
(1) once the page opens, please select the country in which you are located. Then enter your model of HP on the right number.
(2) then choose "Contact the Support" tab at the top and scroll to the bottom of the page "HP Support - contact" to fill out the form with your details.
(3) Once finished, click the "Show Options" at the bottom right.
(4) Finally, scroll to the bottom of the page and select "Get a phone number." A file number and telephone number will now fill for you.
-
Hide the bar of Navigation from the top + bottom fashion Folio
Hi all, it is possible to hide the top + bottom mode Folio Navigation bar (always)?
I need this for a simple editing for child application.
I remember that it is possible with professionals?
Thank you very much!
With a Pro account or business, you can hide the top navigation bar, but not the lower navigation bar. The workaround is a place a dummy ESM invisible on each page and add navigation buttons. For an example, see the article of last second DPS tips > Advanced overlays.
-
How to get rid of the black bars on the top, bottom and sides?
I export an Adobe Premiere Pro (CS3) project that is in HD (widescreen) format. The original video is HD, the size option I have chosen for the project is HD, all that shows when I look into the window of the program. I admit I'm a bit of a first novice user, I don't need a little help to export as there are a ton of options. That's what's happening: when I export to AVI or Quicktime my project comes out with black bars all around. Not like the black bars on the top and down like when you have a large screen video exported to a size 4:3 standard, but almost like a 16:9 video, narrowed down a bit with a black box of 16:9 set around it. What the hell I am doing wrong. I'm sure this has something to do with an option on the export, but I tried messing around with the options to export about 20 different ways. I'm desperate! Please help!
Thanks in advance!
To help you understand a little more about your problem
The reason why you have black bars on the top and the bottom of your exported image is that you placed a "small picture within a large framework.
First makes up the difference with black borders.
Go back a step... which is your final requirement for this story for example Youtube, web, broadcast, PowerPoint etc...
The answer to this determines the solution because it becomes a quality factor.
-
FF4 b6:
Vertical scan 3 finger scroll to top/bottom of page.
FF4 b7:
Scan in 3 fingers up does nothing, down shows tab groups.HOW CAN I CHANGE BACK? is there something I can do?
go to Subject: config in your address bar. Change browser.gesture.swipe.up to cmd_scrollTop and browser.gesture.swipe.down to cmd_scrollBottom
-
Remember - this is a public forum so never post private information such as numbers of mail or telephone
- My icon start at the bottom left is gone also the taskbar at the bottom with the notifications inside IE clock etc.
- I moved the mouse to the edges of the screen and dragged to the rear but no task bar.
- In the control panel in Classic view, there is the taskbar and the START MENU ICON, but when I click on it I do not get the Advisor news, I get nothing if clicked.
Suggestions:
1. press Ctrl + Alt and WAITING, press DELETE key > select Task Manager > file > new task (run...) > in the Open box, type explore> OK
Is back on the taskbar?
If so, make sure that lock you the taskbar, right-click on the taskbar > check 'lock the Tasbar.2. If the above does not help, go to safe mode and see if you can see the taskbar at the bottom.
Here's how to get safe mode:Shut down your computer > turn it back on and immediately and repeatedly tab key F8 until you see a black and white screen. The top/down arrow and select Safe Mode.If you can see the taskbar in safe mode, please do a system restore. Choose a date where you did not have this problem as your restore point.
To sit and wait. The machine restarts when it's done.For the benefits of others looking for answers, please mark as answer suggestion if it solves your problem.
-
On my desktop Mac, the edges of window and the border are gray. On my laptop, there is a background sky blue - as in the top of the window of Firefox and a translucent version of the same through the bar where web addresses are registered and the search criteria. I have a very hard time to see the superior information because of this. I want a background gray (or white) standard. I can't find any Mac preferences or preferences of Firefox that address this issue.
You may have installed a light theme (Persona).
You can uninstall this theme and go back to the default theme (Tools > Modules > appearance/themes). -
Gray at the bottom of the window area
One day, I opened Firefox and it started upward with the gray box at the bottom of the window, as shown in the screenshot. I can't be able to get rid of it. Uninstalled/reinstalled and does not go far. Everyone knows what it is? Thank you.
Hello
Refresh (called "Reset" in older versions of Firefox) can solve a lot of problems in restaurant Firefox as his default factory while saving your bookmarks, history, passwords, cookies, and other essential information.
Note: When you use this feature, you will lose all the extensions, toolbar customizations, and certain preferences. See article Firefox Refresh - reset modules and parameters for more information.
Refresh for Firefox:
- Open the troubleshooting information page using one of the following methods:
- Click the menu button
click Help
and select troubleshooting information. Should open a new tab containing your troubleshooting information.
- If you are unable to access the Help menu, type Subject: support in your address bar to bring up the troubleshooting information page.
- Click the menu button
- At the top right of the page, you should see a button that says 'Refresh Firefox' ('reset Firefox' in older versions of Firefox). Click on it.
- Firefox closes. Once the update process is complete, Firefox will display a window with the imported information.
- Click Finish and reopen Firefox.
This corrects the problem? Please report to us!
Thank you.
- Open the troubleshooting information page using one of the following methods:
-
If I think that a received email is not my Bank, a simple control has always been of the cursor on the 'Login' button to see what URL in Russia he wants to take me. However, the details of binding no longer appear at the bottom of the window of Thunderbird. How can I return this feature more useful please?
This information is displayed on the status bar. Do this on if it isn't already.
The Menu bar, select Tools-bar display-toolbars.If the status bar is already made there is an add on that caused the action to the top status bar. It is Ad Blocker Plus. Disable this add if installed and see if this function returns.
-
Top of the window is translucent; Office is reflected.
The top of my window of Firefox, or not full screen is translucent across its width. The office (or at the top of the window immediately above the one I use) shows through, which makes them extremely difficult to see/read the top of page three toolbars. How can I make this area of the opaque window like the rest of the Firefox window?
Try disabling the transparency of the windows.
Right-click in the free space on your desktop.
Left click on personalization.
There are four options at the bottom of the screen, select 'window color and appearance '.
Select a border color
Uncheck the box: "enable transparency". -
Microsoft Solitaire: text indication at the bottom left of the screen is unreadable.
Original title: microsoft solitaire
the text of the indication at the bottom left of the screen is unreadable. It looks like some kind of trouble puncuation or something. y at - it a patch or an option that I can use to solve this problem.
Hello
· What operating system is installed on the computer?
· It happens with Solitaire?
If you use Windows Vista or Windows 7, then try to TURN the game.
(a) click Start
(b) click on Control Panel and open programs and features
(c) and then click on Windows to enable or disable features.
(d) If you are prompted for an administrator password or a confirmation, type the password or provide confirmation
(e) search for the games and then alone.
· To turn a Windows feature off, clear the check box.
· To turn a Windows feature, select the check box next to the feature.
Refer to
http://Windows.Microsoft.com/en-us/Windows7/turn-Windows-features-on-or-off
http://Windows.Microsoft.com/en-us/Windows-Vista/turn-Windows-features-on-or-off
Diana
Microsoft Answers Support Engineer
Visit our Microsoft answers feedback Forum and let us know what you think.
If this post can help solve your problem, please click the 'Mark as answer' or 'Useful' at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.
-
Hello:
When I put my margins to upgrade to Windows 10 and re-installed new print driver HP for Windows 10 of their site, not printable top & bottom increased (> 3/4 ''). I then ran the HP Print doctor and everything seems to check out.
My wife can print from your Mac via wifi and the margins are still good)<1 ").="" my="" pc="" is="" connected="" to="" the="" printer="" via="">1>
I'm tempted to just buy a new printer, any suggestions?
Hey @Mike144,
Welcome to the Forums of HP's Support.
I see you have some problems with the printing of 10 Windows PC to your Officejet 8710 e-all-in-one printer. I can help you with that.
To resolve this problem:
- If your printer is connected to your PC via a USB cable, remove it.
- Close any programs you have open.
- In your search type in printers bar and open devices and printers.
- Right-click on any icon of your printer listed.
- Click on remove the instrument.
- Repeat for all other icons of your printer listed.
If you removed the USB cable, connect. If this is not the case, click on add printer and follow the prompts to add a new queue for your printer.
Please let me know the results after following the above. If you are able to print with larger margins, click on accept solution. If you appreciate my help, please click on the thumbs up icon. The two icons are below this post.
Maybe you are looking for
-
How to remove virus w32.vrbat on Macbook Pro?
How to remove virus w32.vrbat on Macbook Pro?
-
I have several backups from the bookmark and I would mix in a bookmark. I used one and then open the other that it removes all bookmarks and use only the last one
-
HP Pavilion 15-n034ca - remove keyboard
I need to remove the keyboard on my HP Pavilion n034ca 15. I removed the screws at the back that has the keyboard (about under the '0' key) icon, but I can't get off the keyboard. What should I do? Thank you.
-
How can I register clips unrelated
Some of the clips I divided that were formerly connected are now independent and I cannot "meet" their return. I want to join these clips together so that I complete my film in the sections. Thanks in advance for the help.
-
Extenal HDD does not illuminate
Hi, I desperately need help or advice. I have an external HARD drive that I borrowed from a family member to take pictures of them. I come back from a trip to see the Hard Drive power, even if it worked perfectly fine before the holidays. The power s