Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash








Getting The Sprite Position During A StartDrag() Operation


hey all,
i need to drag a sprite but also be able to track it's position during the drag. seems that startDrag() doesn't do any updating so AS can't report the sprite.x/sprite.y position during the drag.

is there any way to get the position during a startDrag() or do i have to build my own drag by setting the sprite position to sprite.mouseX/sprite.mouseY on a MOUSE_DOWN event handler?

TIA,
michael




ActionScript.org Forums > ActionScript Forums Group > ActionScript 3.0
Posted on: 04-08-2008, 07:19 PM


View Complete Forum Thread with Replies

Sponsored Links:

StartDrag/panning In A Frame(sprite)
According to Senocular's tutorial -- the event handling:
http://www.senocular.com/flash/tutor...ashcs3/?page=3

There's a DrawingBoard in the middle place of the webpage.

If I would like to make the canvas "pan-able" (say the canvas is much much more bigger than the frame that is showing it), perhaps by clicking on a "hand" icon first, then "drag" on the canvas directly, how do I achieve this?

I know horizontal and vertical flash UI scrollers can be placed to do the similar functionality, but I prefer drag the canvas directly using the mouse, which seems more intuitive.

It's the same function like using Photoshop. when pressing H key or holding Space key to switch to the Hand Mode, you can pan your artwork. The only difference I hope is this should only affect within a "frame" (the area of a "rectangle" or a sprite placed on the Flash Canvas), as supposed to the entire Flash Canvas.

thanks.

View Replies !    View Related
StartDrag/panning In A Frame(or Sprite)
According to Senocular's tutorial -- the event handling:
http://www.senocular.com/flash/tutor...ashcs3/?page=3

There's a DrawingBoard in the middle place of the webpage.

If I would like to make the canvas "pan-able" (say the canvas is much much more bigger than the frame that is showing it), perhaps by clicking on a "hand" icon first, then "drag" on the canvas directly, how do I achieve this?

I know horizontal and vertical flash UI scrollers can be placed to do the similar functionality, but I prefer drag the canvas directly using the mouse, which seems more intuitive.

It's the same function like using Photoshop. when pressing H key or holding Space key to switch to the Hand Mode, you can pan your artwork. The only difference I hope is this should only affect within a "frame" (the area of a "rectangle" or a sprite placed on the Flash Canvas), as supposed to the entire Flash Canvas.

thanks.

View Replies !    View Related
Position Sprite For Printing
Hi,
I'm trying to position a sprite on a page, but for some reason it just isn't working.
I create a printJob and I can get the object printed, but I just can't seem to position the sprite on the printed page.

This is part of my code:


Code:
var mySprite:Sprite = new Sprite();
mySprite.addChild(grids[i]);

myPrintJob.addPage(mySprite);
I'm pulling the object from an array, which works fine, but always puts it in the top left hand corner. Now I want to set the x and y position of it. No matter what I do it just doesn't want to move.

Any help would be much appreciated.

View Replies !    View Related
Position Sprite For Printing
Hi,
I'm trying to position a sprite on a page, but for some reason it just isn't working.
I create a printJob and I can get the object printed, but I just can't seem to position the sprite on the printed page.

This is part of my code:

Code:
var mySprite:Sprite = new Sprite();
mySprite.addChild(grids[i]);

myPrintJob.addPage(mySprite);
I'm pulling the object from an array, which works fine, but always puts it in the top left hand corner. Now I want to set the x and y position of it. No matter what I do it just doesn't want to move.

Any help would be much appreciated.

View Replies !    View Related
StartDrag Save Position
I'm using startDrag and stopDrag along with movie clips to allow the user to drag image thumbnails around within a browser window. They can then click on a smaller button within any thumbnail to be taken to a larger version of the image via loadMovie. When the user returns to the thumbnails, I would like the thumbnails to be right where the user dragged them to earlier.

I've read this is possible via cookies, but I'd prefer to stay in flash and I shudder at the thought of learning how to script a cookie.

thanks

View Replies !    View Related
[FMX] Switch Position Of Mc's (using StartDrag)
Hi there,

me again with another startDrag-problem, hope smb can help me out with the fla on the following url...:

http://cmdstud.khlim.be/~stijn/aankleden.fla

In this file mc's can be dragged to a certain location. the mc's snap to the location when they are near enough. but when one mc is on the right position, you need to be able to put another mc on the same place, while the one who was there in the first place, jumps back to its original position... what i want to say is: you should be able to change the mc's by putting them on to each other, while the underlaying is jumping back to its original position...

i think there's a problem/conflict with the 'hit'-zone of the buttons which are made in the mc's, so i tried to solve the problem by only working with mc's and onClipEvent's, but nothing wanted to work the way it should...


any help would be great, so i already want to say 'thanx to you all!!'

BoRn

View Replies !    View Related
[FlashMX] X,y Position For StartDrag
my new problem. I have a graphic which represents a knob which will be pulled to open a new window. I'm using drag 'n drop for this. However i need to restrict the knob so that it doesn't get dragged around the page, but is restricted to movement in one direction only.------------> like a knob being pulled.
This is the code so far.

pullmc.onPress =function() {
this.startDrag(90,30,100,584);
//these numbers are wrong
}
pullmc.onRelease = function() {
this.stopDrag();
}
my problem is that i don't know how to get the correct values for inside those parenthesis. i know it's left, top, right, bottom. the property inspector only gives x,y. how does this relate to top,right, bottom? This is probably a really stupid question. but I can't figure it out...
thanks for any help.
m

View Replies !    View Related
[FMX] Switch Position Of Mc's (using StartDrag)
Hi there,

me again with another startDrag-problem, hope smb can help me out with the fla on the following url...:

http://cmdstud.khlim.be/~stijn/aankleden.fla

In this file mc's can be dragged to a certain location. the mc's snap to the location when they are near enough. but when one mc is on the right position, you need to be able to put another mc on the same place, while the one who was there in the first place, jumps back to its original position... what i want to say is: you should be able to change the mc's by putting them on to each other, while the underlaying is jumping back to its original position...

i think there's a problem/conflict with the 'hit'-zone of the buttons which are made in the mc's, so i tried to solve the problem by only working with mc's and onClipEvent's, but nothing wanted to work the way it should...


any help would be great, so i already want to say 'thanx to you all!!'

BoRn

View Replies !    View Related
Change The Position Propertys Of A Sprite
Hi

I have created two boxes with code (drawRect). I have placed them in two Sprites and I put them on the stage.

So on the smaller box I have set a startDrag and a stopDrag function.

When i release the mousebutton thig box is supposed to go to the the same x and y coordinates as the the ones the smaller box has.

That´s working.

Problem:
When you add two Sprites to the stage they will never have the same coord-system(if you dont place them on top of each other).

Question:
Is there a way to fix this? Is there a way to give these two Sprites the same coord-system? Like the corrd-system of the stage?

//Micke

View Replies !    View Related
Get X,y Position On Screen, Not From Parent Sprite
i have a sprite that's inside multiple sprites. i don't want to have to add up all the x,y positions to get the xy position on the screen....

like... the x y position should be something like 500,400, but its giving me 10,20 because it's inside a sprite that is around 500x400

i hope that makes sense..

i think there was something like localToGlobal in AS2.0, but idk if that's what that was used for....

ty in advance!

View Replies !    View Related
How Can I Get The Mouse Pointer To Go To Another Position When I Use StartDrag()?
I have developed a simple little movie to test out what I have been learning in Flash.

Basically you click a button to add a line to the stage – extend it to a desired length & then move it around the stage.

It all works fine except that the “startDrag()” event for the line is triggered by a button press. This results in the mouse being centred over the button when the startDrag() begins & not over the line which is the subject of the dragging process, so you have a kind of non intuitive effect of the mouse being away from the clip it is supposed to be dragging – probably best seen by opening the movie.

What I need is a way to get the mouse centred over the clip not the button when the startDrag() event fires. I thought of hiding the mouse & substituting another clip for it & then manipulating that, but though that maybe there was a better solution?

Ps. You have to follow the sequence in numerical order in the movie to get the effect. As the “startDrag()” event is triggered by button 2 you will have to mouseDown over it after pressing button 3 to see what happens.

View Replies !    View Related
How To Trace X-Y Position With Startdrag() And Stopdrag()?
Hi. I have used startdrag() and stopdrag() methods to drag my sprite objects using event.target.startDrag() and event.target.stoptDrag(). I want to trace X-Y positions of my sprite along with dragging. How can I do this? Please help me. Thanks in advance.

View Replies !    View Related
Sprite Appearing In Wrong Position For 1 Frame
Hey I'm just going through the Friends of Ed book, Actionscript 3.0 Animation and just noticed in some of their examples that the ball sprite is appearing the wrong spot, at position 0,0 on the stage for a second, probably 1 frame. I'm just wondering if there was a way to make it go to the position specified straight away, instead of after 1 frame or so.

Here's a sample 2 classes of what I'm using.

Ball Class:


Code:
package {

import flash.display.Sprite;

public class Ball extends Sprite {

private var radius:Number;
private var color:uint;

public function Ball(radius:Number=40,color:uint=0xff0000) {
this.radius=radius;
this.color=color;
init();
}

public function init():void {
graphics.beginFill(color);
graphics.drawCircle(0,0,radius);
graphics.endFill();
}

}
}
Circle Class:


Code:
package {

import flash.display.Sprite;
import flash.events.Event;

public class Circle extends Sprite {

private var ball:Ball;
private var angle:Number=0;
private var centerX:Number=200;
private var centerY:Number=200;
private var radius:Number=50;
private var speed:Number=.1;

public function Circle() {
init();
}

private function init():void {
ball = new Ball();
addChild(ball);
ball.x=0;
addEventListener(Event.ENTER_FRAME,onEnterFrame);
}

public function onEnterFrame(event:Event):void {
ball.x=centerX+Math.sin(angle)*radius;
ball.y=centerY+Math.cos(angle)*radius;
angle+=speed;
}

}
}
Thanks in advance!

View Replies !    View Related
StartDrag() - Object Back To Original Position?
Hey everyone,

Well I have a seemingly simple question here. I have a box , thats right a nice shiney box , and within it contains a smaller blue box which is a movieclip.

Now, when you click this small worthless little box, startDrag(); begins and it follows you around : onClipEvent (mouseDown){

When you release this box, it goes back to its start position , into the centre of the bigger box : onClipEvent(mouseUp){


Thats whats supposed to happen. You click and it follows until you release the mouse and it'll go back to its original position.

Now the problem is this:


After releasing the small box, it goes back to its original position, but continues to follow the mouse from there ... but just from the distance. In other words, startDrag(false); hasnt really worked


Heres the code :

code: onClipEvent (load) {
startX = this._x;
startY = this._y;
}
//
onClipEvent (mouseDown) {
this.startDrag(true);
}
//
onClipEvent (mouseUp) {
this.startDrag(false);
this._x = this.startX;
this._y = this.startY;
}


If anyone could help me out here?

View Replies !    View Related
Loading Sprite Using Loader Need Access To Sprite Type
Hello,

I'm loading a Sprite via a Loader and once loaded I have access to that Sprite via the Loader class. I can manipulate the Sprites alpha, x and y coordinates ect. However, I have a custom function that fades in or out the passed param and it expects a Sprite. When I pass the loaded Sprite (loaded via the Loader class) I get an error:

1067: Implicit coercion of a value of type flash.display:Loader to an unrelated type flash.display:Sprite.

I know that the problem is that it expects a Sprite, but how do I access the Sprite type once the swf is loaded via the Loader?

My Code:
import FadeClip;

var ldrMovieCntr:Loader = new Loader();
addChild(ldrMovieCntr);

var fcLoadedMovie:FadeClip = new FadeClip(); //CUSTOM CLASS
fcLoadedMovie.setClipToFade(ldrMovieCntr); //PASSING IN A TYPE Loader - CLASS EXPECTS A Sprite

Thanks in advanced,

Vic

View Replies !    View Related
HELP: Sprite.addChild(NumericStepper) Resizes Sprite To 100x100
If anyone can help me with this, I would be extremely grateful. It's driving me insane.

If I run this code:

Quote:




var mySprite:Sprite = new Sprite();
trace("mySprite 1:", mySprite.width, mySprite.height);
numericStepper = new NumericStepper();
trace("numericStepper 2:", numericStepper.width, numericStepper.height);
mySprite.addChild(numericStepper);
trace("mySprite 3:", mySprite.width, mySprite.height);




I expect this output:

Quote:




mySprite 1: 0 0
numericStepper 2: 80 22
mySprite 3: 80 22




But I get this output:

Quote:




mySprite 1: 0 0
numericStepper 2: 80 22
mySprite 3: 100 100




If instead I do this:


Quote:




mySprite = new Sprite();
trace("mySprite 1:", mySprite.width, mySprite.height);
numericStepper = new NumericStepper();
trace("numericStepper 2:", numericStepper.width, numericStepper.height);
mySprite.addChild(numericStepper);
trace("mySprite 3:", mySprite.width, mySprite.height);
mySprite.width = 80;
mySprite.height = 22;




Then the numericStepper is drawn as if it is squished to 20% its normal height.
If I pre-set mySprite width and height before adding the numericstepper, the trace output is 0,0 after adding it and it is not displayed at all.

Is there some way I can make the sprite only adjust to correctly fit the numericStepper OR resize it afterwards without distorting the numericStepper component?

As I was typing this, I came across this post:
http://www.kirupa.com/forum/archive/.../t-263027.html

Can anyone help me modify that solution for a numeric stepper?

Thanks!

View Replies !    View Related
Dynamically Creating Sprite Inside Sprite
I'm having issues going from AS2 to AS3, mainly in this part , creating sprites/movieclips inside other sprites/movieclips, back in the days i could just create an emptymovieclip inside another, and easily locate it (fathermc.childmc), now the issue is i cant really locate the child, and from the research i have been doing i think i cannot have multiple child with the same name.

I need this because i usually work with textfields inside movieclips, and at any given time i will need to change the text on a specific movieclip's textfield, and i'm having some trouble with that for now.

Here is an example code


Code:
import flash.display.Sprite;
import flash.events.MouseEvent;

var circle1:Sprite = new Sprite();
circle1.graphics.beginFill(0xFFCC00);
circle1.graphics.drawCircle(0, 0, 40);

var circle3:Sprite = new Sprite();
circle3.graphics.beginFill(0xFF0000);
circle3.graphics.drawCircle(0, 0, 200);
circle3.alpha = 0.5;

function BuildInside(spr:Sprite) {
var circle2:Sprite = new Sprite();
circle2.graphics.beginFill(0xFFCCC0);
circle2.graphics.drawCircle(0, 0, 60);
circle2.alpha = 0.5;
spr.addChild(circle2);
}

addChild(circle1);
addChild(circle3);

BuildInside(circle1);
BuildInside(circle3);

circle1.x = 530;
circle3.x = 230;


//trace(circle1.x + " OK " + circle1.x);

stop();
i know that putting
Code:
var circle2:Sprite = new Sprite();
, inside a function , it will only be available in that function , but how can i make it available globally, do i need to define all of them in advance at the root ?

in this example i cant reach any of the circle2 inside the other circles, probly because of the var defining inside the function again.

thnx in advance for any help in this issue that has been holding back my AS2-AS3 upgrade

View Replies !    View Related
Why Does Sprite.filter Break Sprite.hitArea ?
Check this weird bug:
By adding the dropshadow to the circle, hit area no longer works. If you comment them out they work fine. WTHeck?

Code:
import flash.display.Sprite;
import flash.events.MouseEvent;
import flash.filters.DropShadowFilter;


var circle:Sprite = new Sprite();
circle.graphics.beginFill(0xFFCC00);
circle.graphics.drawCircle(0, 0, 40);

var dShadow:DropShadowFilter = new DropShadowFilter();
circle.filters = [dShadow];

var square:Sprite = new Sprite();
square.graphics.beginFill(0xCCFF00);
square.graphics.drawRect(200, 0, 100, 100);

circle.hitArea = square;
square.mouseEnabled = false;

circle.addEventListener(MouseEvent.CLICK, clicked);

function clicked(event:MouseEvent):void{
trace(event.target == circle); // true
trace(event.target == square); // false
}

addChild(circle);
addChild(square);

View Replies !    View Related
Specify Sprite Width Or Height - Sprite Will Not Display
AS 3

If I set height or width on a sprite - the sprite will not display.

Is this a bug?

Thanks!

dustoff.

View Replies !    View Related
Sprite And Child Sprite, Click Event On Both
Hello.

I have this menu item, which is a Sprite. The menu item then has several other items, also Sprite, as children. All items have a listener for click events. When I click the parent item, it's all ok, but when I click one of the children, both the child and the parent Sprite's event handler functions are triggered.

How can I stop the parent sprite from responding to the click on the child?

Thanks in advance.







Attach Code

var myParent:Sprite = new Sprite();
var myChild1:Sprite = new Sprite();
myParent.addChild(myChild1);

function click_parent ($event:MouseEvent) {
trace ("parent clicked");
}
function click_child ($event:MouseEvent) {
trace ("child clicked");
}
myParent.addEventListener(MouseEvent.CLICK, click_parent);
myChild.addEventListener(MouseEvent.CLICK, click_child);

//(Clicking myParent)
//parent clicked

//(Clicking myChild1)
//child clicked
//parent clicked

View Replies !    View Related
Add Listener When Sprite Hovers Over Sprite
Hi guys,

This is my first time looking for help on these forums so im giving it a go.

I have been trying to find the answer for this for a while with no luck


I have a grid with cells

When i hover over with a mouse it changes the color if the cell .... thats ok

What i want to do is hover over a cell with another object sprite and ofr it also to change color

Is their an event for this or does anyone have suggestions for another option

Thanks for any suggestions.


What i am thing is to substitute MouseEvent.ROLL_OVER for something else that will trigger when an object hovers over.


Some code:

Code:
public function createCell()
{
var temp_cell_object:Sprite = new Sprite();
........
.......
.......
the_cell_object.addEventListener(MouseEvent.ROLL_OVER,setCellBackgroundHighlightOn);
the_cell_object.addEventListener(MouseEvent.ROLL_OUT,setCellBackgroundHighlightOff);
the_cell_object.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
return temp_cell_object;

}

private function setCellBackgroundHighlightOn(evt:MouseEvent)
{
evt.target.transform.colorTransform = new ColorTransform(1, 1, .25, 1, 40, 0, 25, 0);
}
private function setCellBackgroundHighlightOff(evt:MouseEvent)
{
evt.target.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
}

View Replies !    View Related
[CS3] Sprite Collision/gravity Within Another Sprite
I'm doin an assignment based on flash but I jus learnt basic flash bt my assignment has forcen me to script higher than the level tat i had learnt.

This is roughly my idea:



correction: instead of e edge change color when the ball collide it, the ball will change color when it collide with the edges. I'm realli grateful to those who can teach & help me~ My assignment is due in 2 days time on thurs.. Thank you~

View Replies !    View Related
Sprite Collision/gravity Within Another Sprite
I'm doin an assignment based on flash but I jus learnt basic flash bt my assignment has forcen me to script higher than the level tat i had learnt.
This is roughly my idea:

correction: instead of e edge change color when the ball collide it, the ball will change color when it collide with the edges. I'm realli grateful to those who can teach & help me~ My assignment is due in 2 days time on thurs.. Thank you~

View Replies !    View Related
Cannot AddChilld(sprite) Into Another Sprite?
Hi,

First post woo,

Anyways, I'm quite new to AS3, I worked a bit with AS2 but not to a great extent, and I am now trying to teach myself AS3 (with a little help). I am creating a flash portfolio and so far have got images to import via XML and some other things, but I am stuck at one particular point:


I have an AS file called Statics.as that extends Sprite, it will contain all the code to draw the static elements of the portfolio, so far it draws a rounded rectange with gradient fine.

I then used URLRequest() and URLLoader() to load the XML, and then Loader to load the logo of the portfolio. I can add it to the Sprite now with:


Code:
addChild(logoLoader);
But I want to manipulate the x and y coords first. I initially failed as I tried to position it in the top right of the portfolio using:


Code:
logoLoader.x = 720-logoLoader.width -10
(720 being the width of the portfolio, and 10 being the padding from the right)

This did not work, after tracing logoLoader.width it seems that this property is not given and so tells me the width of the logo is 0. Therefore the x coord of the logo was mostly off the screen.

I then tried putting the logo into its own sprite to manipulate using:


Code:
var logoSprite:Sprite = new Sprite;
logoSprite.addChild(logoLoader);
logoSprite.addEventListener(Event.ADDED,logoComplete);
This didn't throw any errors, so I continued with:


Code:
public function logoComplete(evnt:Event)
{
evnt.target.x = 720-evnt.target.width -10;
trace(evnt.target.x);
}
This gave me an x coord value of 382 which is correct, this would position the logo in the top right hand corner in exactly the place I wanted.

But when I tried adding it as a child to the class, I got an error:


1118: Implicit coercion of a value with static type Object to a possibly unrelated type flash.display: DisplayObject.

I believe the problem is that I am trying to add a Sprite as a child into a Sprite. As AS3 is quite new to me, I don't see why this should be a problem or a way around it, so my question is; Is what I am doing, the right way of manipulating the position of an external image before it being added to the stage?

Thankyou for your time,

Any reply is appreciated,

Blekk.

P.S.

A new instance of the AS file Statics.as is added to the stage via the DocumentClass.

Here is all the code relevant to the problem if needed:


Code:
package com.fusedDesign.userinterface
{
import flash.display.*;
import flash.geom.*;
import flash.net.URLRequest;
import flash.net.URLLoader;
import flash.events.*;

public class Statics extends MovieClip
{
public function Statics()
{
drawModule();
drawLogo();
}

public function drawLogo()
{
var urlRequest:URLRequest = new URLRequest("com/fusedDesign/folio/xml.xml");
var urlLoader:URLLoader = new URLLoader();
urlLoader.load(urlRequest);
urlLoader.addEventListener(Event.COMPLETE,xmlComplete);
}

public function xmlComplete(evnt:Event)
{
var imagesXML:XML = new XML(evnt.target.data);
loadImage(imagesXML);
}

public function loadImage(xml:XML)
{
var logoLoader:Loader = new Loader();
var logoRequest:URLRequest = new URLRequest(xml.logo.attribute("href")[0]);
logoLoader.load(logoRequest);
var logo:Sprite = new Sprite();
logo.addChild(logoLoader);
logo.addEventListener(Event.ADDED,logoLoaded);
}

public function logoLoaded(evnt:Event)
{
trace("added");
evnt.target.x = 720-evnt.target.width-10;
evnt.target.y = 10;
addChild(evnt.target);
}
}
}
I have removed the code that draws and adds the rounded rectangle.

View Replies !    View Related
Store A Sprite In A Sprite?
What is the best thing to do when storing a Sprite to call it later?

- save it to an array ("as Sprite") (I only need to store one value!)?
- save the name as String in a string variable then getChildByName?
- save it in a variable type Sprite?

three ways seam to work fine, really don't know if there is another one, neither which one is more correct.

any ideias?
thanks

View Replies !    View Related
Can't Complete The Operation
Hello everyone,

OK I go to test my movie. But I keep gettin this message:

Couldn't complete the operation because there was not enough stackspace.

I know this has to do with memory.
But I'm runnin a G5 1.8 dual mac OS X and 768 MB DDR SDRAM

Workin on flash 7.2
the file size is only 1.9.

So here's the thing When I go to import onto my stage a new odject . The object is a splatter (http://www.hydro74.com/tyranny/e2.html ) -
So when I get the odject ionto my stage, I convert the eps to a graphic. Everything still works - Movie can be tested.
But when I make a copy of the graphic . Or import a different slatter .Then I go to test the movie, Thats when I get the error message. Is the splatter too complex or am I doing something wrong


I've tried copy and paste onto a new doc - but no good. same old message


Thanks for your time and help

View Replies !    View Related
How Can I Do A Mathematical Operation…Please Help
I have two variable in my main clip time_start and time_now
time_now = getTimer();
time_start = getTimer();

and I have a second clip tha load after and I wan to do an operation with this two variables


Code:
time_end = Number(_root.menu.paroy.time_now)-Number(_root.menu.paroy.time_start);
trace(time_end);



I don’t know how can I do this operation please help me.

View Replies !    View Related
XML Exporting, PHP Co-operation?
So, I have written a AS 3 project that basically opens an XML file, and allows the user to edit the contents of the file. I need a way to write the new information over the old file, but I have absolutly no real idea of where I need to start with this. I know the webservice I am using uses PHP scripts, and I have already implemented some form-mail services but I don't know of a free / usefull XML writing utility.

The XML I am trying to write ends up looking like this :


Code:
<PACKAGE label="Sanctuary Units">
<UNIT label="Unit 1" unitNumber="One" unitStatus="Sold" numBedrooms="4" numBathrooms="4" garageFt="690" liveableFt="3392" price="1950000"/>
<UNIT label="Unit 2" unitNumber="Two" unitStatus="Sold" numBedrooms="4" numBathrooms="3.5" garageFt="276" liveableFt="2328" price="1095000"/>
<UNIT label="Unit 3" unitNumber="Three" unitStatus="Sold" numBedrooms="4" numBathrooms="3.5" garageFt="276" liveableFt="2328" price="1095000"/>
<UNIT label="Unit 4" unitNumber="Four" unitStatus="Available Soon" numBedrooms="4" numBathrooms="4" garageFt="344" liveableFt="2379" price="1095000"/>
<UNIT label="Unit 5" unitNumber="Five" unitStatus="Available Soon" numBedrooms="4" numBathrooms="4" garageFt="344" liveableFt="2379" price="1095000"/>
<UNIT label="Unit 6" unitNumber="Six" unitStatus="Available Soon" numBedrooms="4" numBathrooms="3.5" garageFt="276" liveableFt="2334" price="1095000"/>
<UNIT label="Unit 7" unitNumber="Seven" unitStatus="Available Soon" numBedrooms="4" numBathrooms="3.5" garageFt="276" liveableFt="2303" price="1095000"/>
<UNIT label="Unit 8" unitNumber="Eight" unitStatus="Available Soon" numBedrooms="4" numBathrooms="3.5" garageFt="276" liveableFt="2328" price="1095000"/>
<UNIT label="Unit 9" unitNumber="awdawd" unitStatus="awdawd" numBedrooms="4wadawd" numBathrooms="3.5awdawd" garageFt="276awdawd" liveableFt="2334" price="1095000"/>
<UNIT label="Unit 10" unitNumber="Ten" unitStatus="Available Soon" numBedrooms="4" numBathrooms="3.5" garageFt="276" liveableFt="2303" price="1095000"/>
<UNIT label="Unit 11" unitNumber="Eleven" unitStatus="Available Soon" numBedrooms="4" numBathrooms="3.5" garageFt="276" liveableFt="2303" price="1095000"/>
</PACKAGE>
Obvisouly unit 9 was the test case and got the edited information.

I know I need to use the URLRequest modules, but how do I get this kind of information out of flash and onto the disk formatted properly? Any suggestions?

Thanks ahed of time!

View Replies !    View Related
File Operation
Hi friends,
I am preparing an interactive cd in flash for a conference.I want to give an option to save the presentation ppt files to the system.Is it possible? pls help me...
can you suggest any other method...
regards

View Replies !    View Related
Operation Of Task Being Done Here..how?
well
we are learner of flash
we found this nice flash movie...
http://www.euro2008.uefa.com/tournam...#DATE#09/06/08
as we know that this is dynamic...but it seems really smooth and fast on retriveing data
how they are retrieving data..
xml file,php or other dynamic files
we decomplied with the motive of learning but no luck
it is too avance level learning?

View Replies !    View Related
Illegal Operation?
Hello..
For some months, I have been making a game using MX on my laptop, however my laptop is now broken!
I fortunately backed my work up to CD, with the intention to continue making it using my PC instead.
I have flash MX installed on this too, so it shouldnt be a problem....

...I then saved my game to the PC and opened it in flash without problems, it opens ok and i can even edit the work.
The problem arises when I try to publish the fla. file as exe or swf, or when i try to 'test movie/scene'. When I do this, it causes an illegal operation and closes flash.
So basically i can edit my work, but not test it!!!
Any ideas what i can do?
Thanks

View Replies !    View Related
Operation Overloading
Hey - not sure if this would count as an "Advanced Flash Topic", but here it goes:

I'm trying to extend the Object class to create a kind of resource manager. Specifically I'm trying to overload the dot notation for declaring properties... so if I say

Code:

myObj.newNumber = 1 ;
newNumber will be added to myObj as it would to any other object, but then do my stuff, like increment a length property, add that object to an internal catalogue, sort and type check and stuff like that.

cheers

View Replies !    View Related
About Using Keyboard For Button Operation
hi,
plz help me.
i have a big problem.In my movie i put 3d push buttons with numbers like calculator.while u press button 1 i get digit1 typed in text box.(respctively 2,3,4 etc).
now my problem is that i want to operate these buttons with
numeric keys of keyboard.i have got the numbers typed in text box with the help of keyboard(with script "on keypress)
but i want that the buttons in the movie should also get pressed with keyboard.(i.e. when i press numeric key 1 of keyboard,the key 1 of movie should also get pressed like we do it with mouse click)

so plz help me out it's relly urgent.
waiting for u r positive reply

View Replies !    View Related
Illegal Operation Caused In IE
Could anyone tell me what I am doing wrong?
I uploaded my site with 3 flash movies each having a different mp3 song. They looked and played fine in my browser window. The one on the index page starts to screw-up and cuts out after a few moments. Then I get the illegal op pop-up window. A few times, the song kept playing and I actually had to shut off my computer.
The songs take a long time to load, also. The other two movies seem to play fine, except for the long download time.
Each movie is looped, The index movie is the longest, at about 60sec. The mp3's are about 4 min long. I put 300 sec on each of the movies time because the songs would not finish playing. I pushed the button in so the song would play when the movie started. I added the url of the page I want the viewer to go to next. If you click the movie fast enough, you can get to the next page, but going back to the index page, I want the song and movie to start again, it does but then it screws-up and kicks me out again. I have been through the help pages and just can't find my errors.
Any help would be a blessing. Getting very confused pushing on all the buttons in flashkit 3.41...should I download 3.5? Is it very different?
aj at artgallery12@aol.com
http://www.artgallery12.com
(ps I am assuming the smile type I used means "medic quick")

View Replies !    View Related
Illegal Operation In FireFox
Hi

I'm an ardent Firefox user but i keep getting an error message when the Flash site I'm making does a loadVars call to a php page.

Here's a screen shot of the error message - the text translated into English basically says

"The plugin has carried out an illegal operation. We strongly recommend you to re-launch your browser"

I've never had this message before - does it come from Firefox's security settings?
or is it an issue between the flashplayer and Firefox ?

... and what can i do to make it go away ?!

thanks

View Replies !    View Related
Repeating An Operation Many Times
We have a FLV video that is embedded in the FLA file and it is a screensaver, the screensaver should run for 15 minutes which is 900 seconds, the user will have the option of letting the screensaver run for 15 minutes or select play to play the next video. After the last video is played the screensaver will play again. How can I get the screensaver to run continously for 15 minutes?

View Replies !    View Related
[F8] Operation: Random Background?
How can a random background function be made?

I mean Im trying - very hard - to make a game like the game "Tanks", currently Im stuck with programming on the background generating.

By that I mean EASY ways to generate random backgrounds which 'ent too impossible.

Now I dont want to generate the Y position for 400 movieclips (1pixel wide) and then getting the proximity and recheck, reposition. Thank you

THx for any help I could get.
<Tongxn>

View Replies !    View Related
Basic Button Operation
Oh how the mighty have fallen...

I haven't touched Flash in a couple years and I'm stumped.

In my main movie I have a movie called "Intro".

Within that movie called "intro" - I have a button called "CloseButton".

So we have: Main Movie>Intro>CloseButton

Intro lives on frame 5 of the Main Movie.

When CloseButton is pushed (remember it lives within Intro) - I want the main timeline to advance to frame 6.

But I'll be darned if I can get it to work (and I'm ashamed - but my poor brain has dumped much flash so it can store CSS - guess it's not big enough to hold both!

Anyway - any help I will be very thankful.

Thanks!
CB

View Replies !    View Related
Timeline Operation Question
Hello. What i am trying to do here is have a few subnav buttons, that on rollover will play the 4 frame animation inside their movie clip (animated glow). onRelease, when their section is in focus i want the glow to stay on, and button functionality deactivated, until another section is clicked on. I am just trying it between 2 buttons for now, which the rollover states dont work at all for. there are stop(); actions on the 4th frame of the animation inside each clip. here is the code on the main timeline. any help would be great. thanks.

//set initial state
this.updatesButton.gotoAndStop(4);
this.updatesButton.enabled = false;

//rewind all buttons
function reWind() {
updatesButton.enabled = true;
showreelButton.enabled = true;
updatesButton.gotoAndStop(1);
showreelButton.gotoAndStop(1);
}
//updates button controls
this.update****._visible = false;
this.updatesButton.hitArea = update****;

this.updatesButton.onRollOver = function() {
gotoAndPlay(1);
};
this.updatesButton.onRollOut = function(){
gotoAndStop(1);
};
this.updatesButton.onRelease= function(){
reWind();
this.gotoAndStop(4);
this.enabled = false;
}
//showreel button controls
this.showreelHit._visible = false;
this.showreelButton.hitArea = showreelHit;

this.showreelButton.onRollOver = function() {
gotoAndPlay(1);
};
this.showreelButton.onRollOut = function(){
gotoAndStop(1);
};
this.showreelButton.onRelease= function(){
reWind();
this.gotoAndStop(4);
this.enabled = false;
}

View Replies !    View Related
Switch, CurrentLabel And Nav Operation AS3
I am trying to create a navigation system that when clicked on button 'nav1' it will expand, playing a movie, which reveals more buttons in that category. These buttons will each have a RollOver effect and when clicked on will display different SWF content in a designated place.

My problem is that when i press on 'nav1' it plays and opens to reveal the sub buttons like i want, then if i press 'nav2', i want the movie that expanded the buttons to play out, hiding the buttons, then play the into nav2 tween.

Its a little hard to explain without you looking at the setup so please take a look and let me know what anyone thinks.

I may be approaching this wrong from the start. If so could someone suggest something different?

i am trying to use a function to control the buttons that contains a 'switch' that references which frame i am currently on and then play out the tween closeout segment before jumping onto the next segment.

ANY HELP would be useful

I just wanted to use the Mr T head, cause i pity myself

View Replies !    View Related
[CS3] Search Engine Operation?
Hello, I'm wondering how easy it'll be to get a Domain Name Search Engine working. This is what I've got:



How do I make it able to search for available domain names? Is there a way to link it up with the GoDaddy search or something of that sort? Thanks!

View Replies !    View Related
Movie Clip Operation
Guys, can anyone help?

I'm trying to get a series of movie clips to play on the main timeline of my flash project. I've read up about hierarchy but everything I seem to write in the actionscript doesn't work - I don't know what I'm doing wrong!

Basically I have the main timeline with my menu on, with buttons that are supposed to link to the movie clips on the same timeline, but it just isn't working. I have the instance names for the movies but the buttons can't seem to find them!

This is what I have so far:

on (release) {
targetpath("london");
gotoandPlay("1");
}

I hope this is making sense.

Cheers in advance,

Harry_028

View Replies !    View Related
GetURL Unsafe Operation
hi
i am using this script to open the another page from my swf file

on (release) {
getURL("www.goole.com", _blank);
}

but its not working. i don't understand what is the problem. i am using flash 8 and for the internet explorer i've flash player 9. Or this coz of flash player 9 conflicting. i've a attached the zip file for the sample. If some one can help me.
monty

View Replies !    View Related
Performing An External Operation
Hi All

Thanks in advance for any help.

Is it possible to have a button in a SWF that changes a users WINDOWS DESKTOP background? If so how? Lets say there are ten images the user can choose from, and they just click on it to install as a windows background.

Regards
Art

View Replies !    View Related
Illegal Operation In Plugin
In Firefox, I tried to get records from a PHP/mySQL database (the database contained no records but sent back an error message from PHP that I had it put into a dynamic text box using loadvars and which works OK).

I got a Flash error alert box: "Illegal operation in plugin" with advice to restart the browser.

Any idea as to what this problem might be about?

View Replies !    View Related
Since The Operation Flash On The CD Issue
I produced by the project for an electronic album, which contains more than 1,000 pictures, so I used as preparation procedures can not be derived exe format. Some users have not installed flash software, and how to make it possible for the CD automatically run swf format?
Thanks.

View Replies !    View Related
Couldn't Complete Operation
Hello everyone,

OK I go to test my movie. But I keep gettin this message:

Couldn't complete the operation because there was not enough stackspace.

I know this has to do with memory.
But I'm runnin a G5 1.8 dual mac OS X and 768 MB DDR SDRAM

Workin on flash 7.2
the file size is only 1.9.

So here's the thing When I go to import onto my stage a new odject . The object is a splatter (http://www.hydro74.com/tyranny/e2.html ) -
So when I get the odject ionto my stage, I convert the eps to a graphic. Everything still works - Movie can be tested.
But when I make a copy of the graphic . Or import a different slatter .Then I go to test the movie, Thats when I get the error message. Is the splatter too complex or am I doing something wrong


I've tried copy and paste onto a new doc - but no good. same old message


Thanks for your time and help

View Replies !    View Related
Short Hand Operation
Hi all
Can any body tell me how to simplify some code?
This is essentially what I am trying to achieve.

rag1,rag2,rag3,rag4,rag5,rag6,rag7._alpha = 40;

or the long verion
rag1._alpha = 40;
rag2._alpha = 40;
rag3._alpha = 40;
rag4._alpha = 40;
etc

View Replies !    View Related
Couldn't Complete Operation
Hello everyone,

OK I go to test my movie. But I keep gettin this message:

Couldn't complete the operation because there was not enough stackspace.

I know this has to do with memory.
But I'm runnin a G5 1.8 dual mac OS X and 768 MB DDR SDRAM

Workin on flash 7.2
the file size is only 1.9.

So here's the thing When I go to import onto my stage a new odject . The object is a splatter (http://www.hydro74.com/tyranny/e2.html ) -
So when I get the odject ionto my stage, I convert the eps to a graphic. Everything still works - Movie can be tested.
But when I make a copy of the graphic . Or import a different slatter .Then I go to test the movie, Thats when I get the error message. Is the splatter too complex or am I doing something wrong


I've tried copy and paste onto a new doc - but no good. same old message


Thanks for your time and help

View Replies !    View Related
Illegal Operation In Plugin
In Firefox, I tried to get records from a PHP/mySQL database (the database contained no records but sent back an error message from PHP that I had it put into a dynamic text box using loadvars and which works OK).

I got a Flash error alert box: "Illegal operation in plugin" with advice to restart the browser.

Any idea as to what this problem might be about?

View Replies !    View Related
Loading XML Before Any Other Operation Is Performed
Hi Everyone,
I am a newbiee to Flash MX 2004. I am Creating a Chat Application using Flash MX 2004, conneting to the database using XML. I have an XML file were I have the list of users on a particular room/board and other properties of the Users. As soon as I load my flash I do somthing like this.
this.stop();
var flag:Boolean = false;
var userArray:Array = new Array();
var headlineXML = new XML();
headlineXML.ignoreWhite = true;
headlineXML.load("usermap_utf.xml");

Now inside my roots onLoad Function I call the XML's onLoad function something of this Sort.
//roots onLoad
_root.onLoad = function() {
//XML onLaod
headlineXML.onLoad = function(success:Boolean) {
if (success) {
var HeadlineXMLNode = this.firstChild;
if (HeadlineXMLNode.nodeName.toUpperCase() == "BOARD") {
user = HeadlineXMLNode.firstChild;
while (user != null) {
if (user.nodeName.toUpperCase() == "USER") {
element = user.firstChild;
while (element != null) {
if (element.nodeName.toUpperCase() == "USERNAME") {
uName = element.firstChild.nodeValue;
userArray.push(uName);
}
element = element.nextSibling;
}
}
user = user.nextSibling;
}
} else {
trace("ERROR LOADING XML");
}
};//End of XML on Load

trace("I need the Array Here (But in Vain)"+ userArray);
};//End of root Onload

function createUserList(usArray:Array){
// I am not able to get the userArray , I have declared globally here
trace(usArray);
}
createUserList(userArray);

The main issue is that .. I am declaring userArray globally and want the same to be used in rest of my methods... I have tried my level best on resolving this ..but all in Vain .. I know I am doing a very small mistake and has to do with some XML onLoad function but unfortunatly not able to figure out a solution for the same... plz help me out with the same..

Thanx In Advance..

Ajith.............[/color]

View Replies !    View Related
Copyright © 2005-08 www.BigResource.com, All rights reserved