Need help fine tuning my gallery
Hello everybody... first let me post the code and then I'll post the errors and what needs to be done...
XML Code:
<images>
<image src="images/image1.jpg" title="Jelly 4" url="images/image1.jpg" />
<image src="images/image2.jpg" title="Cat" url="images/image2.jpg" />
<image src="images/image3.jpg" title="Statue" url="images/image3.jpg" />
<image src="images/image4.jpg" title="Arch 3" url="images/image4.jpg" />
<image src="images/image5.jpg" title="Penguin" url="images/image5.jpg" />
<image src="images/image6.jpg" title="Jelly" url="images/image6.jpg" />
<image src="images/image7.jpg" title="Statue 2" url="images/image7.jpg" />
<image src="images/image8.jpg" title="Arch 1" url="images/image8.jpg" />
<image src="images/image9.jpg" title="Arch 2" url="images/image9.jpg" />
</images>
AS 3.0 Code:
import gs.*;
import gs.easing.*;
//load xml
var xmlLoader:URLLoader = new URLLoader();
var xmlData:XML = new XML();
xmlLoader.addEventListener(Event.COMPLETE, LoadXML);
var xmlPath:String = "image-scroller.xml";
xmlLoader.load(new URLRequest(xmlPath));
function LoadXML(e:Event):void {
xmlData = new XML(e.target.data);
buildScroller(xmlData.image);
//declaring variables
var scroller:MovieClip = new MovieClip();
var speed:Number;
var padding:Number = 5;
var thumbFadeOut:Number = .2;
var thumbFadeIn:Number = 1;
var thumbSmall:Number = 1;
var thumbLarge:Number = 1.1;
this.addChild(scroller);
scroller.y = scroller.x = padding;
var thisOne:MovieClip
//build scroller from xml
function buildScroller(imageList:XMLList):void{
for (var item:uint = 0; item < imageList.length(); item++ ) {
thisOne = new MovieClip();
//outline
var blackBox:Sprite = new Sprite();
blackBox.graphics.beginFill(0xFFFFFF);
blackBox.graphics.drawRect( -1, -1, 82, 82);
blackBox.alpha = thumbFadeOut;
thisOne.addChild(blackBox);
thisOne.blackBox = blackBox;
thisOne.x = thisOne.myx = (80 + padding) * item;
thisOne.itemNum = item;
thisOne.title = imageList[item].attribute("title");
thisOne.link = imageList[item].attribute("url");
thisOne.src = imageList[item].attribute("src");
//image container
var thisThumb:Sprite = new Sprite();
//add image
var ldr:Loader = new Loader();
var urlReq:URLRequest = new URLRequest(thisOne.src);
ldr.load(urlReq);
//assign event listeners for Loader
ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
ldr.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);
thisThumb.addChild(ldr);
thisOne.addChild(thisThumb);
//create listeners for this thumb
thisOne.buttonMode = true;
thisOne.addEventListener(MouseEvent.MOUSE_OVER, overScrollerItem);
thisOne.addEventListener(MouseEvent.MOUSE_OUT, outScrollerItem);
thisOne.addEventListener(MouseEvent.CLICK, clickScrollerItem);
//add item to the scroller mc
scroller.addChild(thisOne);
scroller.addEventListener(Event.ENTER_FRAME, moveScrollerThumbs);
function overScrollerItem(e:MouseEvent):void {
//trace("over" + e.currentTarget.name);
TweenMax.to(e.currentTarget, 0.5, { scaleX:thumbLarge, scaleY:thumbLarge, x:e.currentTarget.myx - e.currentTarget.width * Math.abs(thumbSmall - thumbLarge)/2, y: -e.currentTarget.width * Math.abs(thumbSmall - thumbLarge)/2} );
TweenMax.to(e.currentTarget.blackBox, 1, { alpha:thumbFadeIn} );
function outScrollerItem(e:MouseEvent):void {
//trace("out" + e.currentTarget.name);
TweenMax.to(e.currentTarget, 0.5, { scaleX:thumbSmall, scaleY:thumbSmall, x:e.currentTarget.myx, y:0} );
TweenMax.to(e.currentTarget.blackBox, 0.5, { alpha:thumbFadeOut} );
var mcFullImage:MovieClip;
var fullLdr:Loader
function clickScrollerItem(e:MouseEvent):void {
mcFullImage = new MovieClip();
fullLdr = new Loader()
var urlReq:URLRequest = new URLRequest(e.currentTarget.link);
fullLdr.load(urlReq);
fullLdr.contentLoaderInfo.addEventListener(Event.INIT, initHandler)
addChild(mcFullImage);
mcFullImage.x = 100;
mcFullImage.y = 90;
mcFullImage.addChild(fullLdr);
var image:Bitmap = Bitmap(e.target.content);
image.smoothing = true;
function initHandler(e:Event):void
TweenMax.from(fullLdr, 1, {alpha: 0});
mcFullImage.addEventListener(MouseEvent.CLICK, removeImg);
function removeImg(e:MouseEvent):void
TweenMax.to(mcFullImage, 0.2, {alpha: 0, onComplete: unloadImg});
function unloadImg(e:Event):void
removeChild(fullLdr);
fullLdr.unload();
removeChild(mcFullImage);
mcFullImage = null;
function completeHandler(e:Event):void {
//size image into scroller
resizeMe(e.target.loader.parent, 80, 80, true, true, false);
var image:Bitmap = Bitmap(e.target.content);
image.smoothing = true;
TweenMax.to(e.target.loader.parent.parent, 0.5, { alpha:1} );
function errorHandler(e:IOErrorEvent):void {
trace("thumbnail error="+e);
//The resizing function
// parameters
// required: mc = the movieClip to resize
// required: maxW = either the size of the box to resize to, or just the maximum desired width
// optional: maxH = if desired resize area is not a square, the maximum desired height. default is to match to maxW (so if you want to resize to 200x200, just send 200 once)
// optional: constrainProportions = boolean to determine if you want to constrain proportions or skew image. default true.
function resizeMe(mc:DisplayObject, maxW:Number, maxH:Number=0, constrainProportions:Boolean=true, centerHor:Boolean=true, centerVert:Boolean=true):void{
maxH = maxH == 0 ? maxW : maxH;
mc.width = maxW;
mc.height = maxH;
if (constrainProportions) {
mc.scaleX < mc.scaleY ? mc.scaleY = mc.scaleX : mc.scaleX = mc.scaleY;
if (centerHor) {
mc.x = (maxW - mc.width) / 2;
if (centerVert){
mc.y = (maxH - mc.height) / 2;
function moveScrollerThumbs(e:Event):void {
if ( mouseY > scroller.y && mouseY < scroller.y + scroller.height) {//vertically over scroller
if (mouseX < stage.stageWidth/2 - padding*2 && mouseX > 0) {//left of stage explicitly
speed = -(mouseX - (stage.stageWidth/2 - padding*2)) / 8;
else if (mouseX > stage.stageWidth/2 + padding*2 && mouseX < stage.stageWidth) {//right of stage explicitly
speed = -(mouseX - (stage.stageWidth/2 + padding*2)) / 8;
else {
speed = 0;
scroller.x += speed;
//scroller limits
if (scroller.x < -scroller.width + stage.stageWidth - padding) { //if scrolled too far left
scroller.x = -scroller.width + stage.stageWidth - padding;
else if (scroller.x > padding) { //if scrolled to far right
scroller.x = padding;
The problem is that when I click on a thumb it shows up the image nicely, but when I click on the image to close it, I get this error:
ArgumentError: Error #1063: Argument count mismatch on XMLScroller_fla::MainTimeline/unloadImg(). Expected 1, got 0.
at Function/http://adobe.com/AS3/2006/builtin::apply()
at gs::TweenLite/complete()
at gs::TweenMax/complete()
at gs::TweenMax/render()
at gs::TweenLite$/updateAll()
Also, when there's already an image which is loaded, and I click another thumb, a new image loads on top of the one that is already loaded. I tried removing "thisOne.addEventListener(MouseEvent.CLICK, clickScrollerItem);" in the clickScrollerItem function but it didn't work.... Any suggestions?
Now I tried adding a boolean to check whether there's an image that is already loaded to the stage or not and still no luck I really need to fix this, so please someone tell me where did I go wrong...!! here's the code:
import gs.*;
import gs.easing.*;
//load xml
var xmlLoader:URLLoader = new URLLoader();
var xmlData:XML = new XML();
xmlLoader.addEventListener(Event.COMPLETE, LoadXML);
var xmlPath:String = "image-scroller.xml";
xmlLoader.load(new URLRequest(xmlPath));
function LoadXML(e:Event):void {
xmlData = new XML(e.target.data);
buildScroller(xmlData.image);
//declaring variables
var scroller:MovieClip = new MovieClip();
var speed:Number;
var padding:Number = 5;
var thumbFadeOut:Number = .2;
var thumbFadeIn:Number = 1;
var thumbSmall:Number = 1;
var thumbLarge:Number = 1.1;
this.addChild(scroller);
scroller.y = scroller.x = padding;
var thisOne:MovieClip
var loaded:Boolean = false;
//build scroller from xml
function buildScroller(imageList:XMLList):void{
for (var item:uint = 0; item < imageList.length(); item++ ) {
thisOne = new MovieClip();
//outline
var blackBox:Sprite = new Sprite();
blackBox.graphics.beginFill(0xFFFFFF);
blackBox.graphics.drawRect( -1, -1, 82, 82);
blackBox.alpha = thumbFadeOut;
thisOne.addChild(blackBox);
thisOne.blackBox = blackBox;
thisOne.x = thisOne.myx = (80 + padding) * item;
thisOne.itemNum = item;
thisOne.title = imageList[item].attribute("title");
thisOne.link = imageList[item].attribute("url");
thisOne.src = imageList[item].attribute("src");
//image container
var thisThumb:Sprite = new Sprite();
//add image
var ldr:Loader = new Loader();
var urlReq:URLRequest = new URLRequest(thisOne.src);
ldr.load(urlReq);
//assign event listeners for Loader
ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
ldr.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);
thisThumb.addChild(ldr);
thisOne.addChild(thisThumb);
//create listeners for this thumb
thisOne.buttonMode = true;
thisOne.addEventListener(MouseEvent.MOUSE_OVER, overScrollerItem);
thisOne.addEventListener(MouseEvent.MOUSE_OUT, outScrollerItem);
if(loaded == false) {
thisOne.addEventListener(MouseEvent.CLICK, clickScrollerItem);
//add item to the scroller mc
scroller.addChild(thisOne);
scroller.addEventListener(Event.ENTER_FRAME, moveScrollerThumbs);
function overScrollerItem(e:MouseEvent):void {
//trace("over" + e.currentTarget.name);
TweenMax.to(e.currentTarget, 0.5, { scaleX:thumbLarge, scaleY:thumbLarge, x:e.currentTarget.myx - e.currentTarget.width * Math.abs(thumbSmall - thumbLarge)/2, y: -e.currentTarget.width * Math.abs(thumbSmall - thumbLarge)/2} );
TweenMax.to(e.currentTarget.blackBox, 1, { alpha:thumbFadeIn} );
function outScrollerItem(e:MouseEvent):void {
//trace("out" + e.currentTarget.name);
TweenMax.to(e.currentTarget, 0.5, { scaleX:thumbSmall, scaleY:thumbSmall, x:e.currentTarget.myx, y:0} );
TweenMax.to(e.currentTarget.blackBox, 0.5, { alpha:thumbFadeOut} );
var mcFullImage:MovieClip;
var fullLdr:Loader
function clickScrollerItem(e:MouseEvent):void {
mcFullImage = new MovieClip();
fullLdr = new Loader()
var urlReq:URLRequest = new URLRequest(e.currentTarget.link);
fullLdr.load(urlReq);
fullLdr.contentLoaderInfo.addEventListener(Event.INIT, initHandler)
addChild(mcFullImage);
mcFullImage.x = 100;
mcFullImage.y = 90;
mcFullImage.addChild(fullLdr);
var image:Bitmap = Bitmap(e.target.content);
image.smoothing = true;
loaded = true;
function initHandler(e:Event):void
TweenMax.from(fullLdr, 1, {alpha: 0});
mcFullImage.addEventListener(MouseEvent.CLICK, removeImg);
function removeImg(e:MouseEvent):void
TweenMax.to(mcFullImage, 0.2, {alpha: 0, onComplete: unloadImg});
function unloadImg():void
mcFullImage.removeChild(fullLdr);
fullLdr.unload();
removeChild(mcFullImage);
mcFullImage = null;
loaded = false;
function completeHandler(e:Event):void {
//size image into scroller
resizeMe(e.target.loader.parent, 80, 80, true, true, false);
var image:Bitmap = Bitmap(e.target.content);
image.smoothing = true;
TweenMax.to(e.target.loader.parent.parent, 0.5, { alpha:1} );
function errorHandler(e:IOErrorEvent):void {
trace("thumbnail error="+e);
//The resizing function
// parameters
// required: mc = the movieClip to resize
// required: maxW = either the size of the box to resize to, or just the maximum desired width
// optional: maxH = if desired resize area is not a square, the maximum desired height. default is to match to maxW (so if you want to resize to 200x200, just send 200 once)
// optional: constrainProportions = boolean to determine if you want to constrain proportions or skew image. default true.
function resizeMe(mc:DisplayObject, maxW:Number, maxH:Number=0, constrainProportions:Boolean=true, centerHor:Boolean=true, centerVert:Boolean=true):void{
maxH = maxH == 0 ? maxW : maxH;
mc.width = maxW;
mc.height = maxH;
if (constrainProportions) {
mc.scaleX < mc.scaleY ? mc.scaleY = mc.scaleX : mc.scaleX = mc.scaleY;
if (centerHor) {
mc.x = (maxW - mc.width) / 2;
if (centerVert){
mc.y = (maxH - mc.height) / 2;
function moveScrollerThumbs(e:Event):void {
if ( mouseY > scroller.y && mouseY < scroller.y + scroller.height) {//vertically over scroller
if (mouseX < stage.stageWidth/2 - padding*2 && mouseX > 0) {//left of stage explicitly
speed = -(mouseX - (stage.stageWidth/2 - padding*2)) / 8;
else if (mouseX > stage.stageWidth/2 + padding*2 && mouseX < stage.stageWidth) {//right of stage explicitly
speed = -(mouseX - (stage.stageWidth/2 + padding*2)) / 8;
else {
speed = 0;
scroller.x += speed;
//scroller limits
if (scroller.x < -scroller.width + stage.stageWidth - padding) { //if scrolled too far left
scroller.x = -scroller.width + stage.stageWidth - padding;
else if (scroller.x > padding) { //if scrolled to far right
scroller.x = padding;
Similar Messages
-
This program im making is eventualy going to end up as an attack calculator; the thing is i need help finetuning my program so that a) when it is run it will start at the very top of the window ancestory. b) the 2 windows are locked onto the same ancestory (ancestory is the position of the window relitive to the others: ie the window that is on top of another is higher on the ancestory). this code runs and should easily cut and paste.
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class AttackCalculator implements ActionListener{
* Create the GUI and show it. For thread safety,
* this method should be invoked from the
* event-dispatching thread.
"Use the legend below for the correct government number. ",
"Legend: Democracy = 1, Communism = 2, Autocracy = 3, Fascism = 4, ",
"Monarchy = 5, Pacifism = 6, Technocracy = 7, Theocracy = 8, ",
"Anarchy = 9, Corpocracy = 10, Ochlocracy = 11, Physiocracy = 12 ",
public static void createAndShowGUI(){
String[] labels = {
"Enter how many troops you have: ", "Enter how many tanks you have: ",
"Enter how many jets you have: ", "Enter how many ships you have: ",
"Enter your government type (1-12 refer above): ","Enter your health(%)",
"Enter your stage number (1-4): ", "Enter how many troops your enemy has: ",
"Enter how many tanks your enemy has: ", "Enter how many jets your enemy has: ",
"Enter how many ships your enemy has: ", "Enter your enemy's government type (1-12 refer above): ",
"Enter your enemy's stage number (1-4): ", "Enter your enemy health: "};
int numPairs = labels.length;
JTextField[] textField = {
new JTextField( 10 ), new JTextField( 1 ), new JTextField( 1 ), new JTextField( 1 ), new JTextField( 1 ),
new JTextField( 1 ), new JTextField( 10 ), new JTextField( 1 ), new JTextField( 1 ), new JTextField( 1 ),
new JTextField( 1 ), new JTextField( 1 ), new JTextField( 1 ), new JTextField( 1 )};
//Create and populate the panel.
JPanel p = new JPanel(new SpringLayout());
for (int i = 0; i < numPairs; i++) {
JLabel l = new JLabel(labels, JLabel.TRAILING);
p.add(l);
l.setLabelFor(textField[i]);
p.add(textField[i]);
JLabel l = new JLabel("Your union has 2+ members", JLabel.TRAILING);
p.add(l);
JCheckBox checkBox = new JCheckBox("", false);
l.setLabelFor( checkBox );
p.add(checkBox );
JLabel la = new JLabel("Enemy's union 2+ members", JLabel.TRAILING);
p.add(la);
JCheckBox jcheckBox = new JCheckBox("", false);
la.setLabelFor( jcheckBox );
p.add(jcheckBox);
JButton calculate = new JButton("Calculate");
p.add(calculate);
//Lay out the panel.
SpringUtilities.makeCompactGrid(p,
16, 2, //rows, cols
6, 6, //initX, initY
6, 6); //xPad, yPad
JFrame contentPane = new JFrame();
contentPane.setSize(420, 105);
JLabel title1 = new JLabel("Use the legend below for the correct government number. \n");
JLabel title2 = new JLabel("Legend: Democracy = 1, Communism = 2, Autocracy = 3, Fascism = 4, \n");
JLabel title3 = new JLabel("Monarchy = 5, Pacifism = 6, Technocracy = 7, Theocracy = 8, \n");
JLabel title4 = new JLabel("Anarchy = 9, Corpocracy = 10, Ochlocracy = 11, Physiocracy = 12 " );
contentPane.add( title1 );
contentPane.add( title2 );
contentPane.add( title3 );
contentPane.add( title4 );
SpringLayout layout = new SpringLayout();
contentPane.setLayout(layout);
//Adjust constraints for the label so it's at (5,5).
layout.putConstraint(SpringLayout.WEST, title1,
5,
SpringLayout.WEST, contentPane);
layout.putConstraint(SpringLayout.NORTH, title1,
5,
SpringLayout.NORTH, contentPane);
//Adjust constraints for the label so it's at (5,5).
layout.putConstraint(SpringLayout.WEST, title2,
5,
SpringLayout.WEST, contentPane);
layout.putConstraint(SpringLayout.NORTH, title2,
20,
SpringLayout.NORTH, contentPane);
//Adjust constraints for the label so it's at (5,5).
layout.putConstraint(SpringLayout.WEST, title3,
5,
SpringLayout.WEST, contentPane);
layout.putConstraint(SpringLayout.NORTH, title3,
35,
SpringLayout.NORTH, contentPane);
//Adjust constraints for the label so it's at (5,5).
layout.putConstraint(SpringLayout.WEST, title4,
5,
SpringLayout.WEST, contentPane);
layout.putConstraint(SpringLayout.NORTH, title4,
50,
SpringLayout.NORTH, contentPane);
//Create and set up the window.
JFrame frame1 = new JFrame("Endless Revolution Attack Calculator");
frame1.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
//Make sure we have nice window decorations.
JFrame.setDefaultLookAndFeelDecorated(true);
//Set up the content pane.
p.setOpaque(true); //content panes must be opaque
frame1.setContentPane(p);
//Display the window.
frame1.pack();
frame1.setLocationRelativeTo( null );
frame1.setVisible(true);
contentPane.setLocationRelativeTo( null );
contentPane.setVisible(true);
public void actionPerformed( ActionEvent evt){
public static void main(String[] args) {
//Schedule a job for the event-dispatching thread:
//creating and showing this application's GUI.
javax.swing.SwingUtilities.invokeLater(new Runnable() {
public void run() {
createAndShowGUI();
here is the second class needed to run
import javax.swing.*;
import javax.swing.SpringLayout;
import java.awt.*;
* A 1.4 file that provides utility methods for
* creating form- or grid-style layouts with SpringLayout.
* These utilities are used by several programs, such as
* SpringBox and SpringCompactGrid.
public class SpringUtilities {
* A debugging utility that prints to stdout the component's
* minimum, preferred, and maximum sizes.
public static void printSizes(Component c) {
System.out.println("minimumSize = " + c.getMinimumSize());
System.out.println("preferredSize = " + c.getPreferredSize());
System.out.println("maximumSize = " + c.getMaximumSize());
* Aligns the first <code>rows</code> * <code>cols</code>
* components of <code>parent</code> in
* a grid. Each component is as big as the maximum
* preferred width and height of the components.
* The parent is made just big enough to fit them all.
* @param rows number of rows
* @param cols number of columns
* @param initialX x location to start the grid at
* @param initialY y location to start the grid at
* @param xPad x padding between cells
* @param yPad y padding between cells
public static void makeGrid(Container parent,
int rows, int cols,
int initialX, int initialY,
int xPad, int yPad) {
SpringLayout layout;
try {
layout = (SpringLayout)parent.getLayout();
} catch (ClassCastException exc) {
System.err.println("The first argument to makeGrid must use SpringLayout.");
return;
Spring xPadSpring = Spring.constant(xPad);
Spring yPadSpring = Spring.constant(yPad);
Spring initialXSpring = Spring.constant(initialX);
Spring initialYSpring = Spring.constant(initialY);
int max = rows * cols;
//Calculate Springs that are the max of the width/height so that all
//cells have the same size.
Spring maxWidthSpring = layout.getConstraints(parent.getComponent(0)).
getWidth();
Spring maxHeightSpring = layout.getConstraints(parent.getComponent(0)).
getWidth();
for (int i = 1; i < max; i++) {
SpringLayout.Constraints cons = layout.getConstraints(
parent.getComponent(i));
maxWidthSpring = Spring.max(maxWidthSpring, cons.getWidth());
maxHeightSpring = Spring.max(maxHeightSpring, cons.getHeight());
//Apply the new width/height Spring. This forces all the
//components to have the same size.
for (int i = 0; i < max; i++) {
SpringLayout.Constraints cons = layout.getConstraints(
parent.getComponent(i));
cons.setWidth(maxWidthSpring);
cons.setHeight(maxHeightSpring);
//Then adjust the x/y constraints of all the cells so that they
//are aligned in a grid.
SpringLayout.Constraints lastCons = null;
SpringLayout.Constraints lastRowCons = null;
for (int i = 0; i < max; i++) {
SpringLayout.Constraints cons = layout.getConstraints(
parent.getComponent(i));
if (i % cols == 0) { //start of new row
lastRowCons = lastCons;
cons.setX(initialXSpring);
} else { //x position depends on previous component
cons.setX(Spring.sum(lastCons.getConstraint(SpringLayout.EAST),
xPadSpring));
if (i / cols == 0) { //first row
cons.setY(initialYSpring);
} else { //y position depends on previous row
cons.setY(Spring.sum(lastRowCons.getConstraint(SpringLayout.SOUTH),
yPadSpring));
lastCons = cons;
//Set the parent's size.
SpringLayout.Constraints pCons = layout.getConstraints(parent);
pCons.setConstraint(SpringLayout.SOUTH,
Spring.sum(
Spring.constant(yPad),
lastCons.getConstraint(SpringLayout.SOUTH)));
pCons.setConstraint(SpringLayout.EAST,
Spring.sum(
Spring.constant(xPad),
lastCons.getConstraint(SpringLayout.EAST)));
/* Used by makeCompactGrid. */
private static SpringLayout.Constraints getConstraintsForCell(
int row, int col,
Container parent,
int cols) {
SpringLayout layout = (SpringLayout) parent.getLayout();
Component c = parent.getComponent(row * cols + col);
return layout.getConstraints(c);
* Aligns the first <code>rows</code> * <code>cols</code>
* components of <code>parent</code> in
* a grid. Each component in a column is as wide as the maximum
* preferred width of the components in that column;
* height is similarly determined for each row.
* The parent is made just big enough to fit them all.
* @param rows number of rows
* @param cols number of columns
* @param initialX x location to start the grid at
* @param initialY y location to start the grid at
* @param xPad x padding between cells
* @param yPad y padding between cells
public static void makeCompactGrid(Container parent,
int rows, int cols,
int initialX, int initialY,
int xPad, int yPad) {
SpringLayout layout;
try {
layout = (SpringLayout)parent.getLayout();
} catch (ClassCastException exc) {
System.err.println("The first argument to makeCompactGrid must use SpringLayout.");
return;
//Align all cells in each column and make them the same width.
Spring x = Spring.constant(initialX);
for (int c = 0; c < cols; c++) {
Spring width = Spring.constant(0);
for (int r = 0; r < rows; r++) {
width = Spring.max(width,
getConstraintsForCell(r, c, parent, cols).
getWidth());
for (int r = 0; r < rows; r++) {
SpringLayout.Constraints constraints =
getConstraintsForCell(r, c, parent, cols);
constraints.setX(x);
constraints.setWidth(width);
x = Spring.sum(x, Spring.sum(width, Spring.constant(xPad)));
//Align all cells in each row and make them the same height.
Spring y = Spring.constant(initialY);
for (int r = 0; r < rows; r++) {
Spring height = Spring.constant(0);
for (int c = 0; c < cols; c++) {
height = Spring.max(height,
getConstraintsForCell(r, c, parent, cols).
getHeight());
for (int c = 0; c < cols; c++) {
SpringLayout.Constraints constraints =
getConstraintsForCell(r, c, parent, cols);
constraints.setY(y);
constraints.setHeight(height);
y = Spring.sum(y, Spring.sum(height, Spring.constant(yPad)));
//Set the parent's size.
SpringLayout.Constraints pCons = layout.getConstraints(parent);
pCons.setConstraint(SpringLayout.SOUTH, y);
pCons.setConstraint(SpringLayout.EAST, x);
}I know this is a lot but when I have tried to put out the portion where I belived the problem to be, didnt work, people couldent help, so here it is all of it.it wouldn't run for me, until I changed these lines
contentPane.add( title1 );
contentPane.add( title2 );
contentPane.add( title3 );
contentPane.add( title4 );
SpringLayout layout = new SpringLayout();
contentPane.setLayout(layout);
to these
contentPane.getContentPane().add( title1 );
contentPane.getContentPane().add( title2 );
contentPane.getContentPane().add( title3 );
contentPane.getContentPane().add( title4 );
SpringLayout layout = new SpringLayout();
contentPane.getContentPane().setLayout(layout);
then it worked OK, smaller frame on top (the one with the info), larger frame behind.
both above all other windows
made it into a .jar file (in case IDE influenced above) and ran the same way -
can anyone give some help on the best setup for my system including over clocking
here is the details of my system and thanx in advance
processor intel pentium 4
code name northwood
voltage 1.536v
specification intel cpu 3.06ghz
core speed 3006mhz
multiplier x15.0
fsb 200.0mhz
bus speed 800.0mhz
L1 date 8 kbytes
L1 trace 12kbytes
Level 2 512kbytes
L2 cacha
location on chip
size 512kbytes
associativity 8-way
line size 64bytes
ratio full
frequency 3006 mhz
bus width 256 bits
prefetch lodge yes
motherboard
micro-star inc.
model ms-6728 100
chip intel i865p/pe/g/i848p rev a2
southbridge intel 82801eb [1ch5]
AGP
revision 3.0
aperture size 256mb
data transer rate 8x
side band addressing
memory
1024 mbytes
channels dual
performance mode enabled
modules info dane-elec DDR-SDRAM PC3200-X2
frequency 133.3mhz
fsb dram 3:4
cas#latency 2.0 clocks
ras#to cas# delay 3 clocks
ras# percharge 2 clocks
cycle time [tras] 5 clocksThere is no one overclockring to rule them all. Try here instead: https://forum-en.msi.com/index.php?boardid=27&sid=
-
Need help with this xml gallery !!!
i have build a gallery but its very simple...... it takes images from xml file.
i have attached all files in zip.
i just want two things if anyone can help.
first when i press next button it goes to next image but with no effect. it just displays next image ... i want to incorporate a sliding effect when the image is changed to another.
and second i want to use autoplay feature.
as soon as swf starts the images came one by one with difference of few seconds.
thx in advance... i really need help in this....!You're welcome.
I don't have an example to offer for the autorun. You should be able to think it thru. One key, as I mentioned is to preload all of the images first, that will allow for smooth playing of the show--no waiting for images to load between changes. You can load them into empty movieclips and hide them (_viisible = false) until they are needed. You could load them when called for, but you would have to put conditions on the displaying of things until the image loads, which will change when they are all loaded, so I recommend just loading them all first.
For the timing you can use setInterval. If something is going to be allowed to interupt the autorun, then you will need to make use of the clearInterval function as well, so that you stop the clock.
Since you will be wanting to know when things are loaded, you will need to use the MovieClipLoader.loadClip method for loading the images instead of using loadMovie. This is because the MovieClipLoader class supports having an event listener. If you look in the help documents in the MovieClipLoader.addListener section, there is an example there that provides a fairly good complete overview of using the code. The only difference is you'd be looking for the onLoadComplete event rather than the onLoadInit event. -
Need help th tuning query or re write the query--
Hi,
Need help to tune the below query or rewrite th query for reducing the execution time Please find the query and explain plan.
QUERY
explain plan FOR SELECT consumer_key,product_key,days_in_product,20100201 period_key FROM
(SELECT consumer_key,
product_key,
days_in_product,
row_number() over ( Partition BY consumer_key order by Days_in_product DESC) row_num
FROM
(SELECT consumer_key,
product_key,
SUM(no_ofdays) days_in_product
FROM
(SELECT pcv.consumer_key,
pcv.product_key,
pcv.product_consumer_valid_from,
pcv.product_consumer_valid_to,
DECODE (SIGN(20100201000000-product_consumer_valid_from),1,20100201000000,product_consumer_valid_from) period_start,
DECODE (SIGN(20100228235959-product_consumer_valid_to),1,product_consumer_valid_to,20100228235959) period_end,
CASE
WHEN to_number(TO_CHAR(cd.activation_date,'YYYYMMDDHH24MISS')) BETWEEN 20100201000000 AND 20100228235959
AND activation_date > to_Date(product_consumer_valid_to,'YYYYMMDDHH24MISS')
THEN 0
WHEN to_number(TO_CHAR(cd.activation_date,'YYYYMMDDHH24MISS')) BETWEEN 20100201000000 AND 20100228235959
AND activation_date BETWEEN to_Date(product_consumer_valid_from,'YYYYMMDDHH24MISS') AND to_Date(product_consumer_valid_to,'YYYYMMDDHH24MISS')
THEN
--to_char(activation_date,'MON-YYYY')='PERIOD_ACTIVE' and activation_date >= to_Date(product_consumer_valid_from,'YYYYMMDDHH24MISS') then
(to_date(DECODE (SIGN(20100228235959-product_consumer_valid_to),1,product_consumer_valid_to,20100228235959),'YYYYMMDDHH24MISS') - to_date(TO_CHAR(activation_date,'YYYYMMDDHH24MISS'),'YYYYMMDDHH24MISS') )
WHEN to_number(TO_CHAR(cd.activation_date,'YYYYMMDDHH24MISS')) < 20100201000000
THEN (to_date(DECODE (SIGN(20100228235959-product_consumer_valid_to),1,product_consumer_valid_to,20100228235959),'YYYYMMDDHH24MISS') - to_Date(DECODE (SIGN(20100201000000-product_consumer_valid_from),1,20100201000000,product_consumer_valid_from),'YYYYMMDDHH24MISS') )
WHEN to_number(TO_CHAR(cd.activation_date,'YYYYMMDDHH24MISS')) > 20100228235959
THEN 0
ELSE
--unusual situation
(to_date(DECODE (SIGN(20100228235959-product_consumer_valid_to),1,product_consumer_valid_to,20100228235959),'YYYYMMDDHH24MISS') - to_Date(DECODE (SIGN(20100201000000-product_consumer_valid_from),1,20100201000000,product_consumer_valid_from),'YYYYMMDDHH24MISS') )
END No_ofDays
FROM cimtran.product_consumer_validity pcv,
consumer_dimension cd
WHERE pcv.consumer_key =cd.consumer_key
AND product_consumer_valid_to >= 20100201000000
AND product_consumer_valid_from <= 20100228235959
--and product_consumer_valid_from > '20090801000000'
ORDER BY consumer_key,
product_key,
product_consumer_valid_from
) a
GROUP BY consumer_key,
product_key
ORDER BY consumer_key,
product_key
) WHERE row_num=1 ;EXPLAIN PLAN
"PLAN_TABLE_OUTPUT"
"Plan hash value: 3823907703"
"| Id | Operation | Name | Rows | Bytes |TempSpc| Cost (%CPU)| Time |"
"| 0 | SELECT STATEMENT | | 4665K| 231M| | 133K (1)| 00:31:08 |"
"|* 1 | VIEW | | 4665K| 231M| | 133K (1)| 00:31:08 |"
"|* 2 | WINDOW SORT PUSHED RANK| | 4665K| 173M| 232M| 133K (1)| 00:31:08 |"
"| 3 | VIEW | | 4665K| 173M| | 104K (1)| 00:24:18 |"
"| 4 | SORT GROUP BY | | 4665K| 182M| 729M| 104K (1)| 00:24:18 |"
"|* 5 | HASH JOIN | | 13M| 533M| 65M| 44241 (1)| 00:10:20 |"
"| 6 | TABLE ACCESS FULL | CONSUMER_DIMENSION | 2657K| 35M| | 4337 (1)| 00:01:01 |"
"|* 7 | TABLE ACCESS FULL | PRODUCT_CONSUMER_VALIDITY | 13M| 351M| | 15340 (2)| 00:03:35 |"
"Predicate Information (identified by operation id):"
" 1 - filter(""ROW_NUM""=1)"
" 2 - filter(ROW_NUMBER() OVER ( PARTITION BY ""CONSUMER_KEY"" ORDER BY "
" INTERNAL_FUNCTION(""DAYS_IN_PRODUCT"") DESC )<=1)"
" 5 - access(""PCV"".""CONSUMER_KEY""=""CD"".""CONSUMER_KEY"")"
" 7 - filter(""PRODUCT_CONSUMER_VALID_FROM""<=20100228235959 AND "
" ""PRODUCT_CONSUMER_VALID_TO"">=20100201000000)"I doubt that this query can be tuned without using indexes. There is a lot of unnecessary work specified in your query, like unnecessary intermediate sorting and selecting unused columns. The cost based optimizer recognized it and skips some of that unnecessary work, it seems. For clarity's sake, I would rewrite your query like below. Note that the query is untested:
select consumer_key
, max(product_key) keep (dense_rank last order by days_in_product) product_key
, max(days_in_product) days_in_product
, 20100201 period_key
from ( select pcv.consumer_key
, pcv.product_key
, sum
( case
when to_number(to_char(cd.activation_date,'yyyymmddhh24miss')) between 20100201000000 and 20100228235959
then
case
when cd.activation_date > to_date(pcv.product_consumer_valid_to,'yyyymmddhh24miss')
then
0
when cd.activation_date between to_date(pcv.product_consumer_valid_from,'yyyymmddhh24miss') and to_date(product_consumer_valid_to,'yyyymmddhh24miss')
then
to_date(to_char(pcv.product_consumer_valid_to),'yyyymmddhh24miss'))
- to_date(to_char(activation_date,'yyyymmddhh24miss'),'yyyymmddhh24miss')
end
when to_number(to_char(cd.activation_date,'yyyymmddhh24miss')) < 20100201000000
then
to_date(to_char(pcv.product_consumer_valid_to),'yyyymmddhh24miss'))
- to_date(to_char(pcv.product_consumer_valid_from),'yyyymmddhh24miss'))
when to_number(to_char(cd.activation_date,'yyyymmddhh24miss')) > 20100228235959
then
0
end
) days_in_product
from cimtran.product_consumer_validity pcv
, consumer_dimension cd
where pcv.consumer_key = cd.consumer_key
and product_consumer_valid_to >= 20100201000000
and product_consumer_valid_from <= 20100228235959
group by consumer_key
, product_key
group by consumer_keyRegards,
Rob. -
Need help in tuning a procedure
DECLARE
CURSOR Cur_sub_rp IS
SELECT A.SUB_ACCOUNT, B.PH_basic_srv,B.PH_Salesman,A.SUB_SSN
FROM STG_SUB_MASTER_MONTH_HISTORY A, STG_PHN_MASTER_MONTH_HISTORY
B
WHERE A.SUB_ACCOUNT = B.PH_ACCOUNT (+)
AND A.MONTH_ID = B.MONTH_ID ;
TYPE t_values_tab IS TABLE OF cur_sub_rp%rowtype ;
values_tab t_values_tab := t_values_tab() ;
BEGIN
OPEN Cur_sub_rp ;
LOOP
FETCH Cur_sub_rp BULK COLLECT INTO Values_tab
LIMIT 1000;
EXIT WHEN Cur_sub_rp%NOTFOUND ;
END LOOP ;
CLOSE Cur_sub_rp;
FORALL i IN VALUES_TAB.first..values_tab.last
INSERT INTO SUB_PHN_1 VALUES VALUES_TAB(i);
commit;
END;
The tables used here has 9 million records each.
The total process takes around 19 minutes.
Need your help in optimizing the process.i have tried using
Create table as SELECT A.SUB_ACCOUNT, B.PH_basic_srv,B.PH_Salesman,A.SUB_SSN
FROM STG_SUB_MASTER_MONTH_HISTORY A, STG_PHN_MASTER_MONTH_HISTORY
B
WHERE A.SUB_ACCOUNT = B.PH_ACCOUNT (+)
AND A.MONTH_ID = B.MONTH_ID (+);But still taking long time(apprx 15 min).
so used this...
help me in tuning the query in either of this.
DECLARE
CURSOR Cur_sub_rp IS
SELECT A.SUB_ACCOUNT, B.PH_basic_srv,B.PH_Salesman,A.SUB_SSN
FROM STG_SUB_MASTER_MONTH_HISTORY A, STG_PHN_MASTER_MONTH_HISTORY
B
WHERE A.SUB_ACCOUNT = B.PH_ACCOUNT (+)
AND A.MONTH_ID = B.MONTH_ID (+);
TYPE t_values_tab IS TABLE OF cur_sub_rp%rowtype ;
values_tab t_values_tab := t_values_tab() ;
BEGIN
OPEN Cur_sub_rp ;
LOOP
FETCH Cur_sub_rp BULK COLLECT INTO Values_tab
LIMIT 1000;
EXIT WHEN Cur_sub_rp%NOTFOUND ;
END LOOP ;
CLOSE Cur_sub_rp;
FORALL i IN VALUES_TAB.first..values_tab.last
INSERT INTO SUB_PHN_1 VALUES VALUES_TAB(i);
commit;
END;Message was edited by:
Vakeel
Message was edited by:
Vakeel -
Need help on tuning materialized view refresh
Hi All,
I am working on materialized view refresh tuning.Initially it was complete refresh and used to take more than 90 mins to complete.
I changed it to fast refresh now it is completing fast. Now i have partitioned the base tables gl_balances and gl_code_combinations of column code_combination_id and created a local index on column code_combination_id then i am trying to partition the materialized on the same column to take advantage of partition change tracking.
Size of gl_balances base tables is 40Gb and all others tables sizes are small. In where clause there all the 4 tables are mapped. If i will create the partition only on code_combination_id will i the materialized will become the candidate for partition change tracking. As i know it will be applicable for PCT. I need expert advice on this.
While doing a fast refresh. the refresh takes less time. when there is a change in gl_balances , gl_code_combinations or gl_periods it completes in 20-30 mins. When there is a change in gl_set_of_books tables. It creates a problem here.DEL query takes more than 48 hours to complete.
CREATE MATERIALIZED VIEW apps.BAL_PART
REFRESH FAST ON DEMAND
ENABLE QUERY REWRITE as
SELECT GL.GL_CODE_COMBINATIONS21.ROWID C1,GL.GL_BALANCES21.ROWID C2, GL.GL_SETS_OF_BOOKS.ROWID C3,
GL.GL_PERIOD.ROWID C4,
"GL"."GL_BALANCES21"."ACTUAL_FLAG" ,
"GL"."GL_BALANCES21"."CURRENCY_CODE" ,
"GL"."GL_BALANCES21"."PERIOD_NUM" ,
"GL"."GL_BALANCES21"."PERIOD_YEAR" ,
"GL"."GL_BALANCES21"."SET_OF_BOOKS_ID" "SOB_ID",
"GL"."GL_CODE_COMBINATIONS21"."CODE_COMBINATION_ID" "CCID",
"GL"."GL_CODE_COMBINATIONS21"."SEGMENT1" ,
"GL"."GL_CODE_COMBINATIONS21"."SEGMENT10" ,
"GL"."GL_CODE_COMBINATIONS21"."SEGMENT11" ,
"GL"."GL_CODE_COMBINATIONS21"."SEGMENT12" ,
"GL"."GL_CODE_COMBINATIONS21"."SEGMENT13" ,
"GL"."GL_CODE_COMBINATIONS21"."SEGMENT14" ,
"GL"."GL_CODE_COMBINATIONS21"."SEGMENT2" ,
"GL"."GL_CODE_COMBINATIONS21"."SEGMENT3" ,
"GL"."GL_CODE_COMBINATIONS21"."SEGMENT4" ,
"GL"."GL_CODE_COMBINATIONS21"."SEGMENT5" ,
"GL"."GL_CODE_COMBINATIONS21"."SEGMENT6" ,
"GL"."GL_CODE_COMBINATIONS21"."SEGMENT7" ,
"GL"."GL_CODE_COMBINATIONS21"."SEGMENT8" ,
"GL"."GL_CODE_COMBINATIONS21"."SEGMENT9" ,
"GL"."GL_PERIODS"."PERIOD_NAME" ,
NVL("GL"."GL_BALANCES21"."BEGIN_BALANCE_CR", 0) Open_Bal_Cr,
NVL("GL"."GL_BALANCES21"."BEGIN_BALANCE_CR", 0) +
NVL("GL"."GL_BALANCES21"."PERIOD_NET_CR", 0) Close_Bal_Cr,
NVL("GL"."GL_BALANCES21"."BEGIN_BALANCE_DR", 0) Open_Bal_Dr,
NVL("GL"."GL_BALANCES21"."BEGIN_BALANCE_DR", 0) +
NVL("GL"."GL_BALANCES21"."PERIOD_NET_DR", 0) Close_Bal_Dr,
NVL("GL"."GL_BALANCES21"."BEGIN_BALANCE_DR", 0) -
NVL("GL"."GL_BALANCES21"."BEGIN_BALANCE_CR", 0) Open_Bal,
NVL("GL"."GL_BALANCES21"."BEGIN_BALANCE_DR", 0) -
NVL("GL"."GL_BALANCES21"."BEGIN_BALANCE_CR", 0) +
NVL("GL"."GL_BALANCES21"."PERIOD_NET_DR", 0) -
NVL("GL"."GL_BALANCES21"."PERIOD_NET_CR", 0) Close_Bal,
NVL("GL"."GL_BALANCES21"."PERIOD_NET_CR", 0) Period_Cr,
NVL("GL"."GL_BALANCES21"."PERIOD_NET_DR", 0) Period_Dr
FROM GL.GL_CODE_COMBINATIONS21,
GL.GL_BALANCES21,
GL.GL_SETS_OF_BOOKS,
GL.GL_PERIODS
WHERE GL.GL_BALANCES21.CODE_COMBINATION_ID =GL.GL_CODE_COMBINATIONS21.CODE_COMBINATION_ID
AND GL.GL_SETS_OF_BOOKS.SET_OF_BOOKS_ID = GL.GL_BALANCES21.SET_OF_BOOKS_ID
AND GL.GL_PERIODS.PERIOD_NUM = GL.GL_BALANCES21.PERIOD_NUM
AND GL.GL_PERIODS.PERIOD_YEAR = GL.GL_BALANCES21.PERIOD_YEAR
AND GL.GL_PERIODS.PERIOD_TYPE = GL.GL_BALANCES21.PERIOD_TYPE
AND GL.GL_PERIODS.PERIOD_NAME = GL.GL_BALANCES21.PERIOD_NAME
AND GL.GL_PERIODS.PERIOD_SET_NAME = GL.GL_SETS_OF_BOOKS.PERIOD_SET_NAME
and gl.GL_CODE_COMBINATIONS21.summary_flag != 'Y'TRACE 1046 del statement
DELETE FROM "APPS"."apps.BAL_PART" SNA$
WHERE "C3" IN (SELECT /*+ NO_MERGE */ * FROM (SELECT
CHARTOROWID("MAS$"."M_ROW$$") RID$ FROM "GL"."MLOG$_GL_SETS_OF_BOOKS"
"MAS$" WHERE "MAS$".SNAPTIME$$ > :B_ST1 ) AS OF SNAPSHOT(:B_SCN) MAS$)
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 1 17759.00 171782.99 159422121 1267371 2564144739 0
Fetch 0 0.00 0.00 0 0 0 0
total 2 17759.00 171782.99 159422121 1267371 2564144739 0
Misses in library cache during parse: 1
Misses in library cache during execute: 1
Optimizer mode: ALL_ROWS
Parsing user id: 175 (APPS) (recursive depth: 1)
Rows Row Source Operation
0 DELETE apps.BAL_PART (cr=0 pr=0 pw=0 time=0 us)
193128740 NESTED LOOPS (cr=592437 pr=592422 pw=0 time=945244160 us cost=339302 size=168 card=1)
3 SORT UNIQUE (cr=7 pr=0 pw=0 time=15832 us cost=2 size=138 card=1)
24 TABLE ACCESS FULL MLOG$_GL_SETS_OF_BOOKS (cr=7 pr=0 pw=0 time=19 us cost=2 size=138 card=1)
193128740 INDEX RANGE SCAN C3BOOKS (cr=592430 pr=592422 pw=0 time=789499200 us cost=339299 size=3318314250 card=110610475)(object id 2114736)
error during execute of EXPLAIN PLAN statement
ORA-08187: snapshot expression not allowed here
parse error offset: 314
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
db file sequential read 159520897 2.12 144415.96
latch: cache buffers chains 134 0.06 0.68
latch: undo global data 33 0.02 0.15
latch: object queue header operation 521 0.02 0.53
log file switch (private strand flush incomplete)
532 0.31 28.26
resmgr:cpu quantum 155 1.40 13.49
resmgr:internal state change 25 0.11 2.21
latch free 10 0.00 0.00
latch: cache buffers lru chain 4 0.00 0.00
rdbms ipc reply 489 0.02 0.54
reliable message 587 0.00 0.56
latch: row cache objects 3 0.00 0.00
********************************************************************************GL_SETS_OF_BOOKS has only 6 rows. I know there is complete refresh as a option which will again take more than 90 mins.
I want to do the fast refresh. Tables rows details below.
SQL> select count(*) from gl.gl_code_combinations21;
COUNT(*)
3075255
SQL> select count(*) from gl.GL_PERIODS;
COUNT(*)
1160
SQL> select count(*) from gl.gl_balances21;
COUNT(*)
477613527
SQL> select count(*) from gl.gl_sets_of_books;
COUNT(*)
6gl_sets_of_books has less rows. Whenever there is a change then it mapped to huge rows hence during materialized view has delete huge number of rows.
select count(*) from apps.BAL_PART group by C3;
C3 is the rowid which is present in create materialized statement.
COUNT(*)
292927011
210215
69330
184406971
Is there any way to improve the plan. As i created a partition on code_combination_id and local index on code_combination_id which will not help in set_of_books_id case. I dont PCT will help here or not. Is it possible to use PCT refresh by equipartitioning only one column in where clause.
Please assist me in improving refresh of materialized view using fast refresh.
Thanks and Regards,
Edited by: user646034 on Feb 23, 2013 11:13 PM
Edited by: user646034 on Feb 23, 2013 11:19 PM
Edited by: user646034 on Feb 23, 2013 11:46 PM
Edited by: user646034 on Feb 25, 2013 11:46 AMHi
The below explain without index and with index.
/* MV_REFRESH (DEL) */ DELETE FROM "APPS"."BAL_PART
" SNA$ WHERE "C3" IN (SELECT /*+ NO_MERGE */ * FROM (SELECT
CHARTOROWID("MAS$"."M_ROW$$") RID$ FROM
"GL"."MLOG$_GL_SETS_OF_BOOKS" "MAS$" WHERE "MAS$".SNAPTIME$$ > :B_ST1
) AS OF SNAPSHOT(:B_SCN) MAS$)
Plan hash value: 2704021294
| Id | Operation | Name | E-Rows |E-Bytes| Cost (%CPU)| E-Time |
| 0 | DELETE STATEMENT | | | | 339K(100)| |
| 1 | DELETE | BAL_PART | | | | |
| 2 | NESTED LOOPS | | 1 | 168 | 339K (1)|999:59:59 |
| 3 | SORT UNIQUE | | 1 | 138 | 2 (0)| 00:02:31 |
| 4 | TABLE ACCESS FULL| MLOG$_GL_SETS_OF_BOOKS | 1 | 138 | 2 (0)| 00:02:31 |
| 5 | INDEX RANGE SCAN | C3BOOKS | 110M| 3164M| 339K (0)|999:59:59 |
If i will not use the C3 index then the query will use the belolw plan, I guess this will also take same time or more time.
| 0 | DELETE STATEMENT | | | | 9743K(100)| |
| 1 | DELETE | BAL_PART | | | |   -
Need Help Removing XML Photo Gallery on Button Click
Hi, I'm new to flash so this might seem like a dumb question, but I'm right in the middle of designing a photography site and need some help. I have 4 buttons in my timeline that go to the corresponding frame labels when clicked, above each frame label is a keyframe with actionscript applied to it, that will load an external XML photo gallery. I need the current photo gallery that's on the screen to disappear when I click on a new button to load the new XML photo gallery. this is the code that will be above each frame label with a few changes, then below this is the code for my buttons. Any help is greatly appreciated. Thank you Code: Select all var imageX:XML; var imageList:XMLList; var canvas:MovieClip = new MovieClip(); var picLoader:Loader; addChild(canvas); canvas.x = -155; canvas.y = 160; var req:URLRequest = new URLRequest("gallery.xml"); var imageLoader:URLLoader = new URLLoader(); imageLoader.addEventListener(Event.COMPLETE, onComplete); imageLoader.load(req); function onComplete(e:Event):void { imageX = new XML(imageLoader.data); imageList = imageX.image; picLoader = new Loader(); picLoader.contentLoaderInfo.addEventListener(Event .COMPLETE, imageLoaded); picLoader.load(new URLRequest (imageList[0].url)); } function imageLoaded(e:Event):void { canvas.addChild(picLoader); } Code for the buttons in different keyframe. Code: Select all stop(); kids_btn.addEventListener(MouseEvent.CLICK,onKidsClick); couples_btn.addEventListener(MouseEvent.CLICK,onCouplesClick); portraits_btn.addEventListener(MouseEvent.CLICK,onPortraitsClick); bellies_btn.addEventListener(MouseEvent.CLICK,onBelliesClick); function onKidsClick(e:MouseEvent):void { gotoAndStop("kids"); } function onCouplesClick(e:MouseEvent):void { gotoAndStop("couples"); } function onPortraitsClick(e:MouseEvent):void { gotoAndStop("portraits"); } function onBelliesClick(e:MouseEvent):void { gotoAndStop("bellies"); }
Hi, I'm new to flash so this might seem like a dumb question, but I'm right in the middle of designing a photography site and need some help. I have 4 buttons in my timeline that go to the corresponding frame labels when clicked, above each frame label is a keyframe with actionscript applied to it, that will load an external XML photo gallery. I need the current photo gallery that's on the screen to disappear when I click on a new button to load the new XML photo gallery. this is the code that will be above each frame label with a few changes, then below this is the code for my buttons. Any help is greatly appreciated. Thank you Code: Select all var imageX:XML; var imageList:XMLList; var canvas:MovieClip = new MovieClip(); var picLoader:Loader; addChild(canvas); canvas.x = -155; canvas.y = 160; var req:URLRequest = new URLRequest("gallery.xml"); var imageLoader:URLLoader = new URLLoader(); imageLoader.addEventListener(Event.COMPLETE, onComplete); imageLoader.load(req); function onComplete(e:Event):void { imageX = new XML(imageLoader.data); imageList = imageX.image; picLoader = new Loader(); picLoader.contentLoaderInfo.addEventListener(Event .COMPLETE, imageLoaded); picLoader.load(new URLRequest (imageList[0].url)); } function imageLoaded(e:Event):void { canvas.addChild(picLoader); } Code for the buttons in different keyframe. Code: Select all stop(); kids_btn.addEventListener(MouseEvent.CLICK,onKidsClick); couples_btn.addEventListener(MouseEvent.CLICK,onCouplesClick); portraits_btn.addEventListener(MouseEvent.CLICK,onPortraitsClick); bellies_btn.addEventListener(MouseEvent.CLICK,onBelliesClick); function onKidsClick(e:MouseEvent):void { gotoAndStop("kids"); } function onCouplesClick(e:MouseEvent):void { gotoAndStop("couples"); } function onPortraitsClick(e:MouseEvent):void { gotoAndStop("portraits"); } function onBelliesClick(e:MouseEvent):void { gotoAndStop("bellies"); }
-
Need help with xml video gallery
Hello everyone
I recently bought a xml video gallery. I'm loading the movie externally into another movie. When the xml gallery loads, it cancels all sounds.
I need to figure out where in the actionscription can i reverse the cancellation of sounds. Can anyone help? if possible, I can email, whomever is willing to help, the xml gallery to see if theres another reason the sound is being canceled.
Also, the sound of the gallery doesn't work til you click the volume scroller.
Here are two parts of actionscript included in the gallery:
part one:
// Import filter classes
import mx.transitions.Tween;
import mx.transitions.easing.*;
// Set flash variables
var xmlFileUrl:String = "playlist.xml";
var auto_play:String = "true";
// Set xml file URL
if (_root.xmlfile) {
xmlFileUrl = _root.xmlfile;
var V_SRC;
var thuArray:Array = new Array();
var currentVideo:Number = 0;
var totalItems;
var numOfItems:Number;
var itemDistance:Number = 120+5;
var itemHeight:Number = 80+2;
var Value:Number = 1;
var boundry:Number = 1;
var ratio:Number = 1;
var diff:Number = 1;
var collectionWidth:Number = 1;
var buffer:Number = 135*2;
this.createEmptyMovieClip("video_txt",this.getNextHighestDepth());
video_txt.createTextField("theText",video_txt.getNextHighestDepth(),0,0,584,36);
video_txt.theText.selectable = false;
video_txt.theText.autoSize = "left";
//The Format
myFormat = new TextFormat();
myFormat.font = _root.font_format;
myFormat.size = _root.font_size;
myFormat.color = _root.font_color;
myFormat.align = "center";
video_txt.theText.setNewTextFormat(myFormat);
// Create a new movieclip to load the thumbs
var thumbLoader:MovieClipLoader = new MovieClipLoader();
var thumbListener:Object = new Object();
thumbLoader.addListener(thumbListener);
thumbListener.onLoadInit = function(target_mc:MovieClip, httpStatus:Number)
new Tween(target_mc, "_alpha", Regular.easeOut, 0, 100, 1, true);
target_mc._parent.preloader_mc._alpha = 0;
var xml:XML = new XML();
xml.ignoreWhite = true;
xml.onLoad = xmlLoaded;
xml.load(xmlFileUrl);
// Load the xml file into the player
function xmlLoaded(b:Boolean) {
if (b) {
auto_play = this.firstChild.firstChild.attributes.auto_play;
scrollSpeed = parseInt(this.firstChild.firstChild.attributes.scrollSpeed);
totalItems = this.firstChild.firstChild.childNodes;
numOfItems = totalItems.length;
for (j=0; j<numOfItems; j++) {
var i = player_mc.main_mc.collection_mc.attachMovie("mc_Thumb", "thumb_"+j, j);
i._x = itemDistance*j;
thumbLoader.loadClip(totalItems[j].attributes.thumb,i.loader_mc);
i.id = j;
i.videoTitle = totalItems[j].attributes.title;
i.videoUrl = totalItems[j].attributes.src;
// Create an event for thumb rollover
i.onRollOver = iRoll;
i.onRollOut = i.onReleaseOutside=iOut;
i.onRelease = iRelease;
thuArray[j] = i;
// default first video
collectionWidth = player_mc.main_mc.collection_mc._width;
currentVideo = 0;
V_SRC = thuArray[0].videoUrl;
changeVideo();
//scope._alpha = 100;
new Tween(scope, "_alpha", Regular.easeOut, 0, 100, 0.5, true);
else
trace("Error! xml file not loaded");
// onRollOver Events
function iRoll() {
player_mc.mc_title.title_txt.htmlText = totalItems[this.id].attributes.title;
this.light_mc.play();
function iRelease() {
currentVideo = this.id;
changeVideo();
function changeVideo() {
V_SRC = thuArray[currentVideo].videoUrl;
player_mc.loadVideo();
currentThumb();
player_mc.mc_title.title_txt.htmlText = thuArray[currentVideo].videoTitle;
video_txt.theText.text = totalItems[currentVideo].attributes.title;
player_mc.so.getVolume();
player_mc.playStatus = 1;
player_mc.checkStatus();
function nextVideo() {
if (currentVideo<(numOfItems-1)) {
currentVideo++;
} else {
currentVideo = 0;
changeVideo();
function currentThumb() {
for (i=0; i<thuArray.length; i++) {
if (i == currentVideo) {
thuArray[i].enabled = true;
// Mouse movement on rollover
this.onMouseMove = function() {
collectionWidth = player_mc.main_mc.collection_mc._width;
boundry = player_mc.main_mc.area_mc._width;
if ((player_mc.main_mc._ymouse>0) && (player_mc.main_mc._ymouse<itemHeight)) {
if ((player_mc.main_mc._xmouse>0) && (player_mc.main_mc._xmouse<boundry)) {
ratio = player_mc.main_mc._xmouse/boundry;
diff = (collectionWidth-boundry)+buffer;
Value = Math.floor((-ratio)*diff)+(buffer/2);
updateAfterEvent();
this.onEnterFrame = function() {
// Define movement area and speed
if (player_mc.main_mc.collection_mc._width>player_mc.main_mc.area_mc._width) {
player_mc.main_mc.collection_mc._x = Math.round((player_mc.main_mc.collection_mc._x)+((Value-player_mc.main_mc.collection_mc._ x)/scrollSpeed));
if (player_mc.main_mc.collection_mc._x>0) {
player_mc.main_mc.collection_mc._x = 0;
} else if (player_mc.main_mc.collection_mc._x<(player_mc.main_mc.area_mc._width-(player_mc.main_mc. collection_mc._width))) {
player_mc.main_mc.collection_mc._x = Math.round(player_mc.main_mc.area_mc._width-(player_mc.main_mc.collection_mc._width));
} else {
player_mc.main_mc.collection_mc._x = 0;
updateAfterEvent();
part two:
// Define flash variables
var video_url:String = "";
var tempx:Number = this._parent._x;
var tempy:Number = this._parent._y;
var timeCounter:Number = 0;
var timeInSeconds:Number = _root.time_counter;
// Object to listen to onStage Event
videoObj = vid.videoObj;
// Setting up the connection
var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
// Buffer time
ns.setBufferTime (10);
videoObj.attachVideo (ns);
function loadVideo () {
video_url = _parent.V_SRC;
trace(video_url);
ns.play (video_url);
function checkStatus()
if (playStatus == 1)
controls_mc.playPause.gotoAndStop("pause");
mc_playAgain._visible = false;
thumbs_out = false;
title_out = false;
else
controls_mc.playPause.gotoAndStop("play");
mc_playAgain._visible = true;
} // end else if
if (so.getVolume() == 0)
controls_mc.mute_mc.gotoAndStop("mute");
else
controls_mc.mute_mc.gotoAndStop("on");
}; // End of the function
mc_playAgain._visible = false;
// Check Status of video
ns.onStatus = function (info)
if (info.code == "NetStream.Buffer.Empty")
mc_buffer._visible = true;
else if (info.code == "NetStream.Buffer.Full")
mc_buffer._visible = false;
else if (info.code == "NetStream.Play.Stop")
ns.seek(0);
if (playStatus == 1)
ns.pause();
playStatus = 0;
else
trace;
} // end else if
mc_playAgain._visible = true;
mc_buffer._visible = false;
thumbs_out = true;
title_out = true;
checkStatus();
} // end else if
// Get info about video
ns.onMetaData = function(infoObject:Object)
FLVduration = infoObject["duration"];
relationshipW = infoObject.height / infoObject.width;
relationshipH = infoObject.width / infoObject.height;
if (Stage["displayState"] == "fullScreen")
largeSize ();
else
regularSize ();
if (_parent.auto_play == "false")
ns.seek(0);
if (playStatus == 1)
ns.pause();
playStatus = 0;
mc_buffer._visible = false;
controls_mc.playPause.gotoAndStop("play");
mc_playAgain._visible = true;
thumbs_out = true;
title_out = true;
_parent.auto_play = "true";
}// end else if
var videoInterval = setInterval(videoStatus, 100);
var amountLoaded;
var duration;
// videoStatus on load Event
function videoStatus()
amountLoaded = ns.bytesLoaded / ns.bytesTotal;
controls_mc.mc_progress.mc_buff._width = amountLoaded * 250;
controls_mc.mc_progress.mc_played._x = ns.time / duration * 250;
controls_mc.mc_progress.mc_played._xscale = Math.round(ns.time*100/FLVduration);
}; // End of the function
function scrubIt()
ns.seek(Math.floor(controls_mc.mc_progress.mc_played._x / 250 * duration));
}; // End of the function
// video time
var time_interval:Number = setInterval(checkTime, 500, ns);
function checkTime(ns:NetStream) {
//current time
var ns_seconds:Number = ns.time;
var minutes:Number = Math.floor(ns_seconds/60);
var seconds = Math.floor(ns_seconds%60);
sec = seconds;
min = minutes;
if (sec<10) {
sec = "0"+sec;
if (min<10) {
min = "0"+min;
controls_mc.time_txt.time_1.text = min+":"+sec;
//total time
var minutes2:Number = Math.floor(FLVduration/60);
var seconds2 = Math.floor(FLVduration%60);
sec2 = seconds2;
min2 = minutes2;
if (sec2<10) {
sec2 = "0"+sec2;
if (min2<10) {
min2 = "0"+min2;
controls_mc.time_txt.time_2.text = min2+":"+sec2;
if (controls_mc.time_txt.time_2.text == "NaN:NaN") {
controls_mc.time_txt.time_2.text = "00:00";
setStage ();
// Object to listen onStage Event
var stageL:Object = new Object ();
// function respnsible for content alignment
function setStage ()
if (Stage["displayState"] == "fullScreen") {
tempx = this._parent._x;
tempy = this._parent._y;
this._parent._x = 0;
this._parent._y = 0;
vidBg_mc._x = 0;
vidBg_mc._y = 0;
mc_title._x = 0;
mc_title._y = -30;
slide_me._x = 0;
slide_me._y = 0;
vidBg_mc._width = Stage.width;
vidBg_mc._height = Stage.height;
mc_title._width = Stage.width;
mc_title._height = Stage.height / 20;
slide_me._width = Stage.width;
slide_me._height = Stage.height / 20;
vid._x = vid._y = 0;
largeSize ();
controls_mc._x = Math.round ((Stage.width / 2) - (controls_mc._width / 2));
controls_mc._y = Math.round (Stage.height - 36);
mc_playAgain._x = Math.round ((Stage.width / 2) - (mc_playAgain._width / 2));
mc_playAgain._y = Math.round (Stage.height - 572);
thumbs_mc._x = Math.round ((Stage.width / 2) - (thumbs_mc._width / 2));
thumbs_mc._y = Math.round (Stage.height - 115);
main_mc._x = Math.round ((Stage.width / 2) - (controls_mc._width / 2));;
hide_mc.onEnterFrame = function () {
timeCounter = timeCounter + 1;
if (timeCounter >= timeInSeconds * 30) {
timeCounter = 0;
controls_mc._alpha = 0;
this.onMouseMove = function () {
timeCounter = 0;
controls_mc._alpha = 100;
else
delete hide_mc.onEnterFrame;
delete this.onMouseMove;
controls_mc._alpha = 100;
this._parent._x = tempx;
this._parent._y = tempy;
vidBg_mc._width = 600;
vidBg_mc._height = 360;
mc_title._width = 600;
mc_title._height = 30;
slide_me._width = 600;
slide_me._height = 30;
vidBg_mc._x = vid._x = 0;
vidBg_mc._y = vid._y = 35;
mc_title._x = vid._x = 0;
mc_title._y = vid._x = -30;
slide_me._x = vid._x = 0;
slide_me._y = vid._y = 35;
regularSize ();
controls_mc._x = 0;
controls_mc._y = 395;
mc_playAgain._x = 243;
mc_playAgain._y = 158;
thumbs_mc._x = 0;
thumbs_mc._y = 316;
main_mc._x = 0;
main_mc._y = 406;
mc_buffer._x = Math.round (vidBg_mc._x + (vidBg_mc._width / 2));
mc_buffer._y = Math.round (vidBg_mc._y + (vidBg_mc._height / 2));
// to apply when stage (browser window) is resized or modified
stageL.onResize = function () {
setStage ();
// attaching object to the stage
Stage.addListener (stageL);
MovieClip.prototype.slide = function(yPos) {
this._y -= (this._y-yPos)/5;
// tilte actions
mc_title.onEnterFrame = function()
if (Stage["displayState"] == "normal" && title_out == false)
this.slide(5);
else if (Stage["displayState"] == "normal" && title_out == true)
this.slide(35);
if (Stage["displayState"] == "fullScreen" && title_out == false)
this._y -= (this._y+106)/5;
else if (Stage["displayState"] == "fullScreen" && title_out == true)
this.slide(0);
// thumbs actions
main_mc.onEnterFrame = function()
if (Stage["displayState"] == "normal" && thumbs_out == false)
this.slide(406);
else if (Stage["displayState"] == "normal" && thumbs_out == true)
this.slide(299);
if (Stage["displayState"] == "fullScreen" && thumbs_out == false)
this._y = Math.round (Stage.height - 0);
else if (Stage["displayState"] == "fullScreen" && thumbs_out == true)
this._y = Math.round (Stage.height - 133);
// Playlist button
controls_mc.playlist_mc.onRollOver = function ()
this.gotoAndStop("playlistOver");
controls_mc.playlist_mc.onRollOut = controls_mc.playlist_mc.onReleaseOutside = function ()
this.gotoAndStop("playlist");
// Toggle playlist button
controls_mc.playlist_mc.onRelease = function ()
if (thumbs_out == false)
thumbs_out = true;
title_out = true;
else if (thumbs_out == true)
thumbs_out = false;
title_out = false;
} // end if else
// Define hit area for playPause button
vid.onPress = controls_mc.playPause.onRelease = function ()
ns.pause();
if (playStatus == 1)
controls_mc.playPause.gotoAndStop("play")
playStatus = 0;
checkStatus();
else if (playStatus == 0)
controls_mc.playPause.gotoAndStop("pause");
playStatus = 1;
checkStatus();
// playPause button
controls_mc.playPause.onRollOver = function ()
if (playStatus == 1)
this.gotoAndStop("pauseOver");
else
this.gotoAndStop("playOver");
} // end else if
controls_mc.playPause.onRollOut = controls_mc.playPause.onReleaseOutside = function ()
if (playStatus == 1)
this.gotoAndStop("pause");
else
this.gotoAndStop("play");
} // end else if
// Toggle playPause button
controls_mc.playPause.onRelease = function ()
ns.pause();
if (playStatus == 1)
this.gotoAndStop("play");
playStatus = 0;
checkStatus();
else if (playStatus == 0)
this.gotoAndStop("pause");
playStatus = 1;
checkStatus();
controls_mc.skip_mc.onRollOver = function ()
this.gotoAndStop("skipOver");
controls_mc.skip_mc.onRollOut = controls_mc.skip_mc.onReleaseOutside = function ()
this.gotoAndStop("skip");
controls_mc.skip_mc.onRelease = function ()
_parent.nextVideo()
// Play Again button
mc_playAgain.onRollOver = function ()
this.gotoAndStop("playAgainOver");
mc_playAgain.onRollOut = mc_playAgain.onReleaseOutside = function ()
this.gotoAndStop("playAgain");
// Toggle Play Again button
mc_playAgain.onRelease = function ()
this._visible = false;
ns.pause();
playStatus = 1;
checkStatus();
// make the seek bar clickable
controls_mc.mc_progress.mc_buff.onPress = function()
xpos = controls_mc.mc_progress._xmouse;
percent = Math.round(xpos/controls_mc.mc_progress._width*100);
seekTime = percent/100*FLVduration;
seekTime = Math.round(seekTime*100)/100;
ns.seek(seekTime);
// Set volume level
var s:Sound = new Sound();
s.setVolume(_root.volume_value);
controls_mc.mc_soundLevel.mc_volume._xscale = _root.volume_value;
// Volume control
controls_mc.mc_soundLevel.onPress = function()
volumeTo = (this._xmouse / this._width)*100;
this.mc_volume._xscale = volumeTo;
s.setVolume(volumeTo);
// Volume
_parent.createEmptyMovieClip("vSound", _parent.getNextHighestDepth());
vSound.attachAudio(ns);
var so = new Sound(vSound);
so.setVolume(_root.volume_value);
// Mute button
controls_mc.mute_mc.onRollOver = function ()
if (so.getVolume() >= 1)
this.gotoAndStop("onOver");
else
this.gotoAndStop("muteOver");
} // end else if
controls_mc.mute_mc.onRollOut = controls_mc.mute_mc.onReleaseOutside = function ()
if (so.getVolume() >= 1)
this.gotoAndStop("on");
else
this.gotoAndStop("mute");
} // end else if
// Toggle mute button
controls_mc.mute_mc.onRelease = function ()
if (so.getVolume() >= 1)
controls_mc.mc_soundLevel.mc_volume._xscale = 0;
so.setVolume(0);
this.gotoAndStop("muteOver");
else
controls_mc.mc_soundLevel.mc_volume._xscale = 70;
so.setVolume(_root.volume_value);
this.gotoAndStop("onOver");
} // end else if
// Resize video proportionaly
function regularSize ()
videoObj._width = 600;
videoObj._height = videoObj._width * relationshipW;
if (videoObj._height > 360)
videoObj._height = 360;
videoObj._width = videoObj._height * relationshipH;
videoObj.smoothing = true;
//var scale:Number;
videoObj._x = (600 - videoObj._width) / 2;
videoObj._y = (360 - videoObj._height) / 2;
function largeSize ()
videoObj._width = Stage.width;
videoObj._height = videoObj._width * relationshipW;
if (videoObj._height > Stage.height)
videoObj._height = Stage.height;
videoObj._width = videoObj._height * relationshipH;
videoObj.smoothing = true;
//var scale:Number;
videoObj._x = (Stage.width - videoObj._width) / 2;
videoObj._y = (Stage.height - videoObj._height) / 2;
// Fullscreen button
controls_mc.fullscreen_mc.onRollOver = function ()
if (Stage["displayState"] == "normal")
this.gotoAndStop("fullOver");
else
this.gotoAndStop("fullCloseOver");
} // end else if
controls_mc.fullscreen_mc.onRollOut = controls_mc.fullscreen_mc.onReleaseOutside = function ()
if (Stage["displayState"] == "normal")
this.gotoAndStop("full");
else
this.gotoAndStop("fullClose");
} // end else if
// Toggle fullscreen button
controls_mc.fullscreen_mc.onRelease = function ()
if (Stage["displayState"] == "normal")
Stage["displayState"] = "fullscreen";
_parent.video_txt.theText._visible = false;
else
Stage["displayState"] = "normal";
_parent.video_txt.theText._visible = true;if you mean sound works well when the gallery is tested without being loaded into another swf but fails when loaded, change the highlighted line:
// Import filter classes
import mx.transitions.Tween;
import mx.transitions.easing.*;
// Set flash variables
var xmlFileUrl:String = "playlist.xml";
var auto_play:String = "true";
// Set xml file URL
if (_root.xmlfile) {
xmlFileUrl = _root.xmlfile;
var V_SRC;
var thuArray:Array = new Array();
var currentVideo:Number = 0;
var totalItems;
var numOfItems:Number;
var itemDistance:Number = 120+5;
var itemHeight:Number = 80+2;
var Value:Number = 1;
var boundry:Number = 1;
var ratio:Number = 1;
var diff:Number = 1;
var collectionWidth:Number = 1;
var buffer:Number = 135*2;
this.createEmptyMovieClip("video_txt",this.getNextHighestDepth());
video_txt.createTextField("theText",video_txt.getNextHighestDepth(),0,0,584,36);
video_txt.theText.selectable = false;
video_txt.theText.autoSize = "left";
//The Format
myFormat = new TextFormat();
myFormat.font = _root.font_format;
myFormat.size = _root.font_size;
myFormat.color = _root.font_color;
myFormat.align = "center";
video_txt.theText.setNewTextFormat(myFormat);
// Create a new movieclip to load the thumbs
var thumbLoader:MovieClipLoader = new MovieClipLoader();
var thumbListener:Object = new Object();
thumbLoader.addListener(thumbListener);
thumbListener.onLoadInit = function(target_mc:MovieClip, httpStatus:Number)
new Tween(target_mc, "_alpha", Regular.easeOut, 0, 100, 1, true);
target_mc._parent.preloader_mc._alpha = 0;
var xml:XML = new XML();
xml.ignoreWhite = true;
xml.onLoad = xmlLoaded;
xml.load(xmlFileUrl);
// Load the xml file into the player
function xmlLoaded(b:Boolean) {
if (b) {
auto_play = this.firstChild.firstChild.attributes.auto_play;
scrollSpeed = parseInt(this.firstChild.firstChild.attributes.scrollSpeed);
totalItems = this.firstChild.firstChild.childNodes;
numOfItems = totalItems.length;
for (j=0; j<numOfItems; j++) {
var i = player_mc.main_mc.collection_mc.attachMovie("mc_Thumb", "thumb_"+j, j);
i._x = itemDistance*j;
thumbLoader.loadClip(totalItems[j].attributes.thumb,i.loader_mc);
i.id = j;
i.videoTitle = totalItems[j].attributes.title;
i.videoUrl = totalItems[j].attributes.src;
// Create an event for thumb rollover
i.onRollOver = iRoll;
i.onRollOut = i.onReleaseOutside=iOut;
i.onRelease = iRelease;
thuArray[j] = i;
// default first video
collectionWidth = player_mc.main_mc.collection_mc._width;
currentVideo = 0;
V_SRC = thuArray[0].videoUrl;
changeVideo();
//scope._alpha = 100;
new Tween(scope, "_alpha", Regular.easeOut, 0, 100, 0.5, true);
else
trace("Error! xml file not loaded");
// onRollOver Events
function iRoll() {
player_mc.mc_title.title_txt.htmlText = totalItems[this.id].attributes.title;
this.light_mc.play();
function iRelease() {
currentVideo = this.id;
changeVideo();
function changeVideo() {
V_SRC = thuArray[currentVideo].videoUrl;
player_mc.loadVideo();
currentThumb();
player_mc.mc_title.title_txt.htmlText = thuArray[currentVideo].videoTitle;
video_txt.theText.text = totalItems[currentVideo].attributes.title;
player_mc.so.getVolume();
player_mc.playStatus = 1;
player_mc.checkStatus();
function nextVideo() {
if (currentVideo<(numOfItems-1)) {
currentVideo++;
} else {
currentVideo = 0;
changeVideo();
function currentThumb() {
for (i=0; i<thuArray.length; i++) {
if (i == currentVideo) {
thuArray[i].enabled = true;
// Mouse movement on rollover
this.onMouseMove = function() {
collectionWidth = player_mc.main_mc.collection_mc._width;
boundry = player_mc.main_mc.area_mc._width;
if ((player_mc.main_mc._ymouse>0) && (player_mc.main_mc._ymouse<itemHeight)) {
if ((player_mc.main_mc._xmouse>0) && (player_mc.main_mc._xmouse<boundry)) {
ratio = player_mc.main_mc._xmouse/boundry;
diff = (collectionWidth-boundry)+buffer;
Value = Math.floor((-ratio)*diff)+(buffer/2);
updateAfterEvent();
this.onEnterFrame = function() {
// Define movement area and speed
if (player_mc.main_mc.collection_mc._width>player_mc.main_mc.area_mc._width) {
player_mc.main_mc.collection_mc._x = Math.round((player_mc.main_mc.collection_mc._x)+((Value-player_mc.main_mc.colle ction_mc._x)/scrollSpeed));
if (player_mc.main_mc.collection_mc._x>0) {
player_mc.main_mc.collection_mc._x = 0;
} else if (player_mc.main_mc.collection_mc._x<(player_mc.main_mc.area_mc._width-(player_m c.main_mc.collection_mc._width))) {
player_mc.main_mc.collection_mc._x = Math.round(player_mc.main_mc.area_mc._width-(player_mc.main_mc.collection_mc._w idth));
} else {
player_mc.main_mc.collection_mc._x = 0;
updateAfterEvent();
part two:
// Define flash variables
var video_url:String = "";
var tempx:Number = this._parent._x;
var tempy:Number = this._parent._y;
var timeCounter:Number = 0;
var timeInSeconds:Number = _root.time_counter;
// Object to listen to onStage Event
videoObj = vid.videoObj;
// Setting up the connection
var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
// Buffer time
ns.setBufferTime (10);
videoObj.attachVideo (ns);
function loadVideo () {
video_url = _parent.V_SRC;
trace(video_url);
ns.play (video_url);
function checkStatus()
if (playStatus == 1)
controls_mc.playPause.gotoAndStop("pause");
mc_playAgain._visible = false;
thumbs_out = false;
title_out = false;
else
controls_mc.playPause.gotoAndStop("play");
mc_playAgain._visible = true;
} // end else if
if (so.getVolume() == 0)
controls_mc.mute_mc.gotoAndStop("mute");
else
controls_mc.mute_mc.gotoAndStop("on");
}; // End of the function
mc_playAgain._visible = false;
// Check Status of video
ns.onStatus = function (info)
if (info.code == "NetStream.Buffer.Empty")
mc_buffer._visible = true;
else if (info.code == "NetStream.Buffer.Full")
mc_buffer._visible = false;
else if (info.code == "NetStream.Play.Stop")
ns.seek(0);
if (playStatus == 1)
ns.pause();
playStatus = 0;
else
trace;
} // end else if
mc_playAgain._visible = true;
mc_buffer._visible = false;
thumbs_out = true;
title_out = true;
checkStatus();
} // end else if
// Get info about video
ns.onMetaData = function(infoObject:Object)
FLVduration = infoObject["duration"];
relationshipW = infoObject.height / infoObject.width;
relationshipH = infoObject.width / infoObject.height;
if (Stage["displayState"] == "fullScreen")
largeSize ();
else
regularSize ();
if (_parent.auto_play == "false")
ns.seek(0);
if (playStatus == 1)
ns.pause();
playStatus = 0;
mc_buffer._visible = false;
controls_mc.playPause.gotoAndStop("play");
mc_playAgain._visible = true;
thumbs_out = true;
title_out = true;
_parent.auto_play = "true";
}// end else if
var videoInterval = setInterval(videoStatus, 100);
var amountLoaded;
var duration;
// videoStatus on load Event
function videoStatus()
amountLoaded = ns.bytesLoaded / ns.bytesTotal;
controls_mc.mc_progress.mc_buff._width = amountLoaded * 250;
controls_mc.mc_progress.mc_played._x = ns.time / duration * 250;
controls_mc.mc_progress.mc_played._xscale = Math.round(ns.time*100/FLVduration);
}; // End of the function
function scrubIt()
ns.seek(Math.floor(controls_mc.mc_progress.mc_played._x / 250 * duration));
}; // End of the function
// video time
var time_interval:Number = setInterval(checkTime, 500, ns);
function checkTime(ns:NetStream) {
//current time
var ns_seconds:Number = ns.time;
var minutes:Number = Math.floor(ns_seconds/60);
var seconds = Math.floor(ns_seconds%60);
sec = seconds;
min = minutes;
if (sec<10) {
sec = "0"+sec;
if (min<10) {
min = "0"+min;
controls_mc.time_txt.time_1.text = min+":"+sec;
//total time
var minutes2:Number = Math.floor(FLVduration/60);
var seconds2 = Math.floor(FLVduration%60);
sec2 = seconds2;
min2 = minutes2;
if (sec2<10) {
sec2 = "0"+sec2;
if (min2<10) {
min2 = "0"+min2;
controls_mc.time_txt.time_2.text = min2+":"+sec2;
if (controls_mc.time_txt.time_2.text == "NaN:NaN") {
controls_mc.time_txt.time_2.text = "00:00";
setStage ();
// Object to listen onStage Event
var stageL:Object = new Object ();
// function respnsible for content alignment
function setStage ()
if (Stage["displayState"] == "fullScreen") {
tempx = this._parent._x;
tempy = this._parent._y;
this._parent._x = 0;
this._parent._y = 0;
vidBg_mc._x = 0;
vidBg_mc._y = 0;
mc_title._x = 0;
mc_title._y = -30;
slide_me._x = 0;
slide_me._y = 0;
vidBg_mc._width = Stage.width;
vidBg_mc._height = Stage.height;
mc_title._width = Stage.width;
mc_title._height = Stage.height / 20;
slide_me._width = Stage.width;
slide_me._height = Stage.height / 20;
vid._x = vid._y = 0;
largeSize ();
controls_mc._x = Math.round ((Stage.width / 2) - (controls_mc._width / 2));
controls_mc._y = Math.round (Stage.height - 36);
mc_playAgain._x = Math.round ((Stage.width / 2) - (mc_playAgain._width / 2));
mc_playAgain._y = Math.round (Stage.height - 572);
thumbs_mc._x = Math.round ((Stage.width / 2) - (thumbs_mc._width / 2));
thumbs_mc._y = Math.round (Stage.height - 115);
main_mc._x = Math.round ((Stage.width / 2) - (controls_mc._width / 2));;
hide_mc.onEnterFrame = function () {
timeCounter = timeCounter + 1;
if (timeCounter >= timeInSeconds * 30) {
timeCounter = 0;
controls_mc._alpha = 0;
this.onMouseMove = function () {
timeCounter = 0;
controls_mc._alpha = 100;
else
delete hide_mc.onEnterFrame;
delete this.onMouseMove;
controls_mc._alpha = 100;
this._parent._x = tempx;
this._parent._y = tempy;
vidBg_mc._width = 600;
vidBg_mc._height = 360;
mc_title._width = 600;
mc_title._height = 30;
slide_me._width = 600;
slide_me._height = 30;
vidBg_mc._x = vid._x = 0;
vidBg_mc._y = vid._y = 35;
mc_title._x = vid._x = 0;
mc_title._y = vid._x = -30;
slide_me._x = vid._x = 0;
slide_me._y = vid._y = 35;
regularSize ();
controls_mc._x = 0;
controls_mc._y = 395;
mc_playAgain._x = 243;
mc_playAgain._y = 158;
thumbs_mc._x = 0;
thumbs_mc._y = 316;
main_mc._x = 0;
main_mc._y = 406;
mc_buffer._x = Math.round (vidBg_mc._x + (vidBg_mc._width / 2));
mc_buffer._y = Math.round (vidBg_mc._y + (vidBg_mc._height / 2));
// to apply when stage (browser window) is resized or modified
stageL.onResize = function () {
setStage ();
// attaching object to the stage
Stage.addListener (stageL);
MovieClip.prototype.slide = function(yPos) {
this._y -= (this._y-yPos)/5;
// tilte actions
mc_title.onEnterFrame = function()
if (Stage["displayState"] == "normal" && title_out == false)
this.slide(5);
else if (Stage["displayState"] == "normal" && title_out == true)
this.slide(35);
if (Stage["displayState"] == "fullScreen" && title_out == false)
this._y -= (this._y+106)/5;
else if (Stage["displayState"] == "fullScreen" && title_out == true)
this.slide(0);
// thumbs actions
main_mc.onEnterFrame = function()
if (Stage["displayState"] == "normal" && thumbs_out == false)
this.slide(406);
else if (Stage["displayState"] == "normal" && thumbs_out == true)
this.slide(299);
if (Stage["displayState"] == "fullScreen" && thumbs_out == false)
this._y = Math.round (Stage.height - 0);
else if (Stage["displayState"] == "fullScreen" && thumbs_out == true)
this._y = Math.round (Stage.height - 133);
// Playlist button
controls_mc.playlist_mc.onRollOver = function ()
this.gotoAndStop("playlistOver");
controls_mc.playlist_mc.onRollOut = controls_mc.playlist_mc.onReleaseOutside = function ()
this.gotoAndStop("playlist");
// Toggle playlist button
controls_mc.playlist_mc.onRelease = function ()
if (thumbs_out == false)
thumbs_out = true;
title_out = true;
else if (thumbs_out == true)
thumbs_out = false;
title_out = false;
} // end if else
// Define hit area for playPause button
vid.onPress = controls_mc.playPause.onRelease = function ()
ns.pause();
if (playStatus == 1)
controls_mc.playPause.gotoAndStop("play")
playStatus = 0;
checkStatus();
else if (playStatus == 0)
controls_mc.playPause.gotoAndStop("pause");
playStatus = 1;
checkStatus();
// playPause button
controls_mc.playPause.onRollOver = function ()
if (playStatus == 1)
this.gotoAndStop("pauseOver");
else
this.gotoAndStop("playOver");
} // end else if
controls_mc.playPause.onRollOut = controls_mc.playPause.onReleaseOutside = function ()
if (playStatus == 1)
this.gotoAndStop("pause");
else
this.gotoAndStop("play");
} // end else if
// Toggle playPause button
controls_mc.playPause.onRelease = function ()
ns.pause();
if (playStatus == 1)
this.gotoAndStop("play");
playStatus = 0;
checkStatus();
else if (playStatus == 0)
this.gotoAndStop("pause");
playStatus = 1;
checkStatus();
controls_mc.skip_mc.onRollOver = function ()
this.gotoAndStop("skipOver");
controls_mc.skip_mc.onRollOut = controls_mc.skip_mc.onReleaseOutside = function ()
this.gotoAndStop("skip");
controls_mc.skip_mc.onRelease = function ()
_parent.nextVideo()
// Play Again button
mc_playAgain.onRollOver = function ()
this.gotoAndStop("playAgainOver");
mc_playAgain.onRollOut = mc_playAgain.onReleaseOutside = function ()
this.gotoAndStop("playAgain");
// Toggle Play Again button
mc_playAgain.onRelease = function ()
this._visible = false;
ns.pause();
playStatus = 1;
checkStatus();
// make the seek bar clickable
controls_mc.mc_progress.mc_buff.onPress = function()
xpos = controls_mc.mc_progress._xmouse;
percent = Math.round(xpos/controls_mc.mc_progress._width*100);
seekTime = percent/100*FLVduration;
seekTime = Math.round(seekTime*100)/100;
ns.seek(seekTime);
// Set volume level
var s:Sound = new Sound(this);
s.setVolume(_root.volume_value);
controls_mc.mc_soundLevel.mc_volume._xscale = _root.volume_value;
// Volume control
controls_mc.mc_soundLevel.onPress = function()
volumeTo = (this._xmouse / this._width)*100;
this.mc_volume._xscale = volumeTo;
s.setVolume(volumeTo);
// Volume
_parent.createEmptyMovieClip("vSound", _parent.getNextHighestDepth());
vSound.attachAudio(ns);
var so = new Sound(vSound);
so.setVolume(_root.volume_value);
// Mute button
controls_mc.mute_mc.onRollOver = function ()
if (so.getVolume() >= 1)
this.gotoAndStop("onOver");
else
this.gotoAndStop("muteOver");
} // end else if
controls_mc.mute_mc.onRollOut = controls_mc.mute_mc.onReleaseOutside = function ()
if (so.getVolume() >= 1)
this.gotoAndStop("on");
else
this.gotoAndStop("mute");
} // end else if
// Toggle mute button
controls_mc.mute_mc.onRelease = function ()
if (so.getVolume() >= 1)
controls_mc.mc_soundLevel.mc_volume._xscale = 0;
so.setVolume(0);
this.gotoAndStop("muteOver");
else
controls_mc.mc_soundLevel.mc_volume._xscale = 70;
so.setVolume(_root.volume_value);
this.gotoAndStop("onOver");
} // end else if
// Resize video proportionaly
function regularSize ()
videoObj._width = 600;
videoObj._height = videoObj._width * relationshipW;
if (videoObj._height > 360)
videoObj._height = 360;
videoObj._width = videoObj._height * relationshipH;
videoObj.smoothing = true;
//var scale:Number;
videoObj._x = (600 - videoObj._width) / 2;
videoObj._y = (360 - videoObj._height) / 2;
function largeSize ()
videoObj._width = Stage.width;
videoObj._height = videoObj._width * relationshipW;
if (videoObj._height > Stage.height)
videoObj._height = Stage.height;
videoObj._width = videoObj._height * relationshipH;
videoObj.smoothing = true;
//var scale:Number;
videoObj._x = (Stage.width - videoObj._width) / 2;
videoObj._y = (Stage.height - videoObj._height) / 2;
// Fullscreen button
controls_mc.fullscreen_mc.onRollOver = function ()
if (Stage["displayState"] == "normal")
this.gotoAndStop("fullOver");
else
this.gotoAndStop("fullCloseOver");
} // end else if
controls_mc.fullscreen_mc.onRollOut = controls_mc.fullscreen_mc.onReleaseOutside = function ()
if (Stage["displayState"] == "normal")
this.gotoAndStop("full");
else
this.gotoAndStop("fullClose");
} // end else if
// Toggle fullscreen button
controls_mc.fullscreen_mc.onRelease = function ()
if (Stage["displayState"] == "normal")
Stage["displayState"] = "fullscreen";
_parent.video_txt.theText._visible = false;
else
Stage["displayState"] = "normal";
_parent.video_txt.theText._visible = true; -
Need help with 3D carousel gallery rotation to a specific angle
Hi,
I am making a 3d gallery, that has a menu underneath it. When clicking to a menu link, the gallery will rotate itself to a certain angle (photo) connected with the menu link. I am using FlashAndMaths 3D cylindrical gallery scripts (XML Customizable 3D Cylindrical Photo Gallery in Flash) as the base (as I couldn't find any free or neither payed 3d galleries that would have a menu connected to the carousel!).
The function to rotate a carousel of thumbnails is the following:
public function doRotate(ang:Number):void {
if(isLoading || notReady){
return;
if(!this.contains(container)){
return;
var i:int;
for(i=0;i<numCols;i++){
colsVec[i].rotationY+=ang;
colsVec[i].rotationY=colsVec[i].rotationY%360;
if((colsVec[i].rotationY>90+diffAng && colsVec[i].rotationY<270-diffAng) || (colsVec[i].rotationY<-(90+diffAng) && colsVec[i].rotationY>-(270-diffAng))){
if(container.contains(colsVec[i])){
container.removeChild(colsVec[i]);
} else {
if(!container.contains(colsVec[i])){
container.addChild(colsVec[i]);
This will rotate the carousel as an infinite loop. However - I need the function to stop at a certain angle e.g. 45% (and/or reset itself to 0%). Another option would be to stop the carousel at a certain thumbnail container.
The function to create a carousel is here:
thumbWidth=thumbsArray[0][0].width;
thumbHeight=thumbsArray[0][0].height;
colsVec=new Vector.<Column>();
colHeight=thumbHeight*colLen+(colLen-1)*pxSpace;
colWidth=thumbWidth;
rad=galLoader.radius;
angle=360/numCols;
container=new Sprite();
this.addChild(container);
containerWidth=2*rad;
vertAddOn=40;
vertDrop=15;
containerHeight=colHeight+vertAddOn;
container.x=containerWidth/2;
container.y=containerHeight/2+vertDrop;
contMask=new Shape();
this.addChild(contMask);
contMask.x=container.x;
contMask.y=container.y;
prepContainer();
diffAng=Math.round((Math.asin(rad/fL)*180/Math.PI)*1000)/1000;
for(i=0;i<numCols;i++){
colsVec[i]= new Column(thumbsArray[i],pxSpace,rad);
container.addChild(colsVec[i]);
colsVec[i].y=0;
colsVec[i].x=0;
colsVec[i].z=0;
colsVec[i].rotationY=angle*i;
if((colsVec[i].rotationY>90+diffAng && colsVec[i].rotationY<270-diffAng) || (colsVec[i].rotationY<-(90+diffAng) && colsVec[i].rotationY>-(270-diffAng))){
if(container.contains(colsVec[i])){
container.removeChild(colsVec[i]);
} else {
if(!container.contains(colsVec[i])){
container.addChild(colsVec[i]);
Could anyone help me as I'm out of ideas!Hi, well, unfortunately asking help from forums is my last option, there really isn't many people around anymore, who'd use Flash!
Also, I couldn't find neither free or payed scripts or examples online, that could do this - so, it's just me and forums.
I really do appreciate that you've tried to help me- I just need a bit clearer reference (as I'm just not really used to use AS), so that I could try to search and/or figure out how to solve that problem.
By "call doRotate() and pass the difference between the current rotation and the desired rotation.", did you mean something like this:
private function onEnter(e:Event):void {
if (rotate){
this.doRotate(1);
if( //so, here I should use something that would locate the desired position, so something like currentFrame or would you have any better ideas?
// should I also add something like doRotate.stop(); here?
this.removeEventlistener(Event.ENTER_FRAME,onEnter);
Or am I going the wrong way? -
DW8 - Need help with Flash Mirror Gallery by Flashdevelopment24
I just purchased an image viewer called Flash Mirror Gallery by Flashdevelopment24:
http://www.flashdevelopment24.com/extensions/flash_photo_gallery_06.aspx
I use DW8. Unfortunately the wizard and the instructions are WAY beyond me. I can insert the object on my page but I have no clue how to import images into it, do I need to create separate thumbnails?, etc. Its a European company and the English isn't taht great either which doesn't help.I went through all their FAQs and examples and I don't have a clue.
I'm doing something very simple, all I need are VERY simple directions on how to make this work. It would be best if there was a YouTube or other video tutorial available. I paid 45 buck for this and it useless to me right now. Help!I paid 45 buck for this and it useless to me right now. Help!
Sorry can't help, don't know the product at all.
If you are having problems with it, then it's best to contact the people you purchased it from no? They should either help you with support issues, you you should get a refund if it doesn't work as expected.
Nadia
Adobe® Community Expert : Dreamweaver
Unique CSS Templates | Tutorials | SEO Articles
http://www.DreamweaverResources.com
Web Design & Development
http://www.perrelink.com.au
http://twitter.com/nadiap -
Need help with uploading web gallery
When I try to upload a gallery, I recieve the following error message: An error occured sending the file: a response was not received in time.
How do I correct this?Find the exported gallery on the hard drive, and open the index file in a web browser. If that works correctly, then yes, it's a problem that you'll need to discuss with your web host, rather than a Lightroom problem that we can help with, sorry.
-
Need help on complicated thumb gallery
I need to build a gallery of thumbnails that allows you to do these things:
Click a main menu item to show a gallery consisting of rows of thumbs
Gallery has scrollbar to look at many rows of thumbs
Hovering over thumbs enlarges them a little
Double-click adds a larger size of image to another MC’s display list; Should that be the thumb itself at a larger size of should it load another image that’s different than the thumb? The image once in the other MC’s display list, will have to be like a MC/sprite and be able to be manipulated, i.e. scaled…
All help with this greatly appreciated.
GFHi,
Here are my inputs for your questions:-
1) You have to import the thumbnails and then you have to add it into movieclip it will not be movieclip when they are imported.
2) You can use smaller images as thumbnail so the loading will be fast and on selecting the thumbnail you can load the corresponding big image
this will save you thumbnail loading time. you can use same logic to load big image that u used for thumbnail loading... -
Hi,
I have the following query/report that takes hours to complete. Application version is 11.5.9 and database is on 9.2.0.6
{code}
SELECT c.inventory_location_id,
c.segment1
|| '.'
|| c.segment2
|| '.'
|| c.segment3
|| '.'
|| c.segment4 loc,
b.lot_number lot, -1 * b.primary_quantity lot_qty
FROM mtl_material_transactions a,
mtl_transaction_lot_numbers b,
mtl_item_locations c
WHERE a.transaction_id = b.transaction_id
AND a.locator_id = c.inventory_location_id
AND a.trx_source_line_id = :b1
ORDER BY 1
{code}
Explain Plan shows the following
{code}
SELECT STATEMENT CHOOSECost: 694
9 SORT ORDER BY Cost: 694 Bytes: 96 Cardinality: 2
8 TABLE ACCESS BY INDEX ROWID INV.MTL_TRANSACTION_LOT_NUMBERS Cost: 4 Bytes: 17 Cardinality: 1
7 NESTED LOOPS Cost: 693 Bytes: 96 Cardinality: 2
5 NESTED LOOPS Cost: 687 Bytes: 62 Cardinality: 2
2 TABLE ACCESS BY INDEX ROWID INV.MTL_MATERIAL_TRANSACTIONS Cost: 683 Bytes: 26 Cardinality: 2
1 INDEX FULL SCAN INV.NFPC_LOCATOR_ID_N1 Cost: 27 Cardinality: 2,579,440
4 TABLE ACCESS BY INDEX ROWID INV.MTL_ITEM_LOCATIONS Cost: 3 Bytes: 18 Cardinality: 1
3 INDEX RANGE SCAN INV.MTL_ITEM_LOCATIONS_U1 Cost: 2 Cardinality: 1
6 INDEX RANGE SCAN INV.MTL_TRANSACTION_LOT_NUMBERS_N1 Cost: 3 Cardinality: 1
{code}
Please let me know what other information I need to upload for any help.
Thanks
AJHi,
How many rows you have in MMT table?
Have you gathered the stats of the INV schema recently?
Did you test with some optimizer hints such as /*+ ordered */ or even /*+ rule */ ?
Regards,
Bashar -
Need help installing Bridge CS4 gallery in DW CS4
I've spent days trying to find out how to put a gallery I created in Bridge CS4 into Dreamweaver CS4. Bridge created a folder filled with a lot of files, including image files and an index.html file. How do I insert these into my DW page? I'm fairly new to Dreamweaver and need the specific steps laid out for me. Thanks.
Greetings,
Copy the entire folder to your web root in the Dreamweaver CS4 and create a HTML page from your template, name it "gallery" then open the Dreamweaver CS4 if not already opened, click to open the files of your website at the right hand Corner of the Dreamweaver CS4 page or windows > files to open it; search for the folder of the gallery open it and copy the .swf player file to the space you have created on the gallery page save the page then press F12 on your keyboard or file > preview in browser and choose your browser to view your gallery. You could resize it after all that. It worked for me on my new web design. Good luck.
Best regards,
Brigma.com
Maybe you are looking for
-
Hi I had to have my Mini mac cleared and reset It now has OS X 10.8.5 installed How do I now get hold of Numbers and Pages for my machine . When I went to the app store both Numbers and Pages apps want a OS X 10.10 version??? Help Dave
-
Number formatting in ALV list header
Hi, I am using an ALV with a list header. Code is as follows: FORM ALV_SHOW. DATA G_CALLBACK_PROG LIKE SY-REPID. G_CALLBACK_PROG = SY-REPID. CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY' EXPORTING I_CALLBACK_PROGRAM = G_CALLBACK
-
I have ipod gen 2 8gb. WHere do I find apps that will work?
Gen2 8gb ipod touch. Is there a way to search for apps that will work on that? I know it is older. Most of the apps I find will no longer work on under iOs 3.0. Looking specifically for apps for calorie counter & book on tape. thx
-
Hi Iam trying to add the cookie into local machine.Problems is i written cookie program in cookietest.jsp then i incude this jsp into index.jsp.When iam accessing the index.jsp cookies are not setting But when iam acessing cookietest.jsp cookies are
-
DVD Wont Load and Automatically Ejects After Upgrading to OS X 10.5.7
I took the updates last night for 10.5.7 , iTunes, etc, and now when I insert a DVD (data disc burned from the same MacBook Pro and used to work fine), it just ejects the DVD after a minute or so. I rebooted the MacBook Pro, and it still happens. The