[Flashcoders] unable to implement simple timer functionality

2008-10-17 Thread anuj sharma
Hi All
I am trying to use timer to load 2 different swf files (having pixel
effect).I need little pause before loading another movie. On enter frame it
is loading DVR.swf fine and then i am starting timer to load another
HardDisk.swf file and it is loading the 2nd movie fine but then it is not
stopping the timer, it is puttting both the movies in repeated loop adn keep
on laoding and unloading both of them one by one. After loading the 2nd i
need everythign to be stopped. i I haven't used timer class ever . Can you
guys please help me out in making this thing working .(need these 2 movies
loading one by one after little pause.)
Thanks a lot in advance
Anuj

/Here's my Code**/
import fl.containers.UILoader;

var tBool:Boolean=false;
var tmr:Timer = new Timer(5000);

var myUILoader:UILoader = new UILoader();
myUILoader.maintainAspectRatio=false;
myUILoader.scaleContent = true;
myUILoader.width=800;
myUILoader.height=600;
myUILoader.mouseChildren=false;
myUILoader.source = DVR.swf;
myUILoader.load();
addChild(myUILoader);
tmr.start();
tmr.addEventListener(TimerEvent.TIMER,loadAnother);


function loadAnother(event:TimerEvent):void
{
var myUILoader1:UILoader = new UILoader();
myUILoader1.maintainAspectRatio=false;
myUILoader1.scaleContent = true;
myUILoader1.width=800;
myUILoader1.height=600;
myUILoader1.source = HardDisk.swf;
myUILoader1.load();
addChild(myUILoader1);
if(tmr.running)
{
tmr.stop();
}
tBool=true;
}
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Re: unable to implement simple timer functionality

2008-10-17 Thread anuj sharma
Sorry Guys
My mistake , i fixed that. there was no problem with the timer class,
actually i am using this code in between of frames and forgot to put the
stop frame. Ir's up and running now
Thanks
Anuj

On Fri, Oct 17, 2008 at 5:15 PM, anuj sharma [EMAIL PROTECTED] wrote:

 Hi All
 I am trying to use timer to load 2 different swf files (having pixel
 effect).I need little pause before loading another movie. On enter frame it
 is loading DVR.swf fine and then i am starting timer to load another
 HardDisk.swf file and it is loading the 2nd movie fine but then it is not
 stopping the timer, it is puttting both the movies in repeated loop adn keep
 on laoding and unloading both of them one by one. After loading the 2nd i
 need everythign to be stopped. i I haven't used timer class ever . Can you
 guys please help me out in making this thing working .(need these 2 movies
 loading one by one after little pause.)
 Thanks a lot in advance
 Anuj

 /Here's my Code**/
 import fl.containers.UILoader;

 var tBool:Boolean=false;
 var tmr:Timer = new Timer(5000);

 var myUILoader:UILoader = new UILoader();
 myUILoader.maintainAspectRatio=false;
 myUILoader.scaleContent = true;
 myUILoader.width=800;
 myUILoader.height=600;
 myUILoader.mouseChildren=false;
 myUILoader.source = DVR.swf;
 myUILoader.load();
 addChild(myUILoader);
 tmr.start();
 tmr.addEventListener(TimerEvent.TIMER,loadAnother);


 function loadAnother(event:TimerEvent):void
 {
 var myUILoader1:UILoader = new UILoader();
 myUILoader1.maintainAspectRatio=false;
 myUILoader1.scaleContent = true;
 myUILoader1.width=800;
 myUILoader1.height=600;
 myUILoader1.source = HardDisk.swf;
 myUILoader1.load();
 addChild(myUILoader1);
 if(tmr.running)
 {
 tmr.stop();
 }
 tBool=true;
 }

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] How to avoid little blink while loading another movie ...

2008-09-03 Thread anuj sharma
Thanks I have figured that out by loading new movie just one frame before
finishing the first movie. Your idea will also work.
Thanks

On Wed, Sep 3, 2008 at 4:41 AM, S0 F1 [EMAIL PROTECTED] wrote:

 Can you load it behind another display object that is a copy (perhaps
 bitmap
 snapshot) of the main stage in question?

 This should fix it.
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Re: How to avoid little blink while loading another movie

2008-09-02 Thread anuj sharma
I am sorry i forgot to mention i am using UILoader componenet for loading
that external SWF , if you guys have any other container in mind for this
purpose i would be happy to use that.
Thanks
Anuj

On Tue, Sep 2, 2008 at 11:01 AM, anuj sharma [EMAIL PROTECTED] wrote:

 Hi All
 I am building a simple tween movie in which a line just goes from left to
 right and as soon as it reaches the end point I need to call external swf
 file and need to make the already running tween movie invisible. Everything
 is working fine except when i reach at the end of the movie and calling
 external swf file , it shows a little blink (for a fraction of second) to
 signify that something external has been loaded. I do not want my
 aaplication to show that it is loading some external files. Can i avoid that
 fraction of second of delay (blink showing unloading and loading movies).
 Here's my code which i used at the end of my first tween movie.

 import fl.containers.UILoader;

 mc_FirstLine.visible=false;
 var myUILoader:UILoader=new UILoader();
 myUILoader.height=23.6;
 myUILoader.move(-17,-1);
 myUILoader.source=SecondLine.swf;
 addChild(myUILoader);

 Please let me know if we can , any help and suggestions will be highly
 appreciated.
 Thanks
 Anuj

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Re: How to avoid little blink while loading another movie

2008-09-02 Thread anuj sharma
Hi Sebastian
Thanks for the reply.
Your second point works form me. Just one frame from the end of tween i
added the UILoader and i moved the loader to the main stage after making my
first movie invisible.
Thanks a lot for your help. I appreciate that
Anuj


On Tue, Sep 2, 2008 at 11:21 AM, sebastian [EMAIL PROTECTED] wrote:

 Hi,

 Presumably the blink is caused by the delay between your loading movie
 being called and you setting its state to visible=false.

 You can resolve that in a few ways:

 1. have the swf you load in already be visible=false, pre-set in the
 external file.
 2. load the swf off-stage coordinates and then move it to the stage only
 after you set visible=false
 3. set the alpha of the loading clip to zero, load the child then set
 visible to false and restore the alpha as needed

 Hope this helps, maybe someone else has a better solution.

 anuj sharma wrote:

 I am sorry i forgot to mention i am using UILoader componenet for loading
 that external SWF , if you guys have any other container in mind for this
 purpose i would be happy to use that.
 Thanks
 Anuj

 On Tue, Sep 2, 2008 at 11:01 AM, anuj sharma [EMAIL PROTECTED] wrote:

  Hi All
 I am building a simple tween movie in which a line just goes from left to
 right and as soon as it reaches the end point I need to call external swf
 file and need to make the already running tween movie invisible.
 Everything
 is working fine except when i reach at the end of the movie and calling
 external swf file , it shows a little blink (for a fraction of second) to
 signify that something external has been loaded. I do not want my
 aaplication to show that it is loading some external files. Can i avoid
 that
 fraction of second of delay (blink showing unloading and loading movies).
 Here's my code which i used at the end of my first tween movie.

 import fl.containers.UILoader;

 mc_FirstLine.visible=false;
 var myUILoader:UILoader=new UILoader();
 myUILoader.height=23.6;
 myUILoader.move(-17,-1);
 myUILoader.source=SecondLine.swf;
 addChild(myUILoader);

 Please let me know if we can , any help and suggestions will be highly
 appreciated.
 Thanks
 Anuj

  ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

  ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] hiring

2008-07-16 Thread anuj sharma
Hi
You might want to try this
http://www.actionscript.org/employment/search_positions.php
Sometimes there are international jobs there too and if you register with
them, they keep on sending you weekly openings.
Anuj


On Wed, Jul 16, 2008 at 5:29 AM, Romuald Quantin 
[EMAIL PROTECTED] wrote:

 Hi,



 I'm not sure it is the right place to do that but people have been friendly
 on this list, I hope you can help.



 I'll have to hire a flash/flex developer in London UK for a permanent job.



 Can anyone tell me some good place to post an ad?



 I'm not looking for a general IT job site but some sites like the job
 section in www.thefwa.com http://www.thefwa.com/  where I can find good
 developers.

 Maybe another mailing list?



 Any info?



 Thanks



 Romuald



 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] MouseUp and MouseDown Events in TileList Componenet in AS 3.0

2008-04-28 Thread anuj sharma
Hi Guys
I am trying to implement drag and drop from the tile list component  to the
main stage. I would be successful in loading dynamic videos in the tileList
component and double clicking on any video in the tile list, will open the
main video on the main stage( Code is attached). The main video is loaded in
the UILoader. How ever I have to implement the same functionality with the
drag and drop of the video thumbnails. The user should be able to drag any
thumbnail and drop on the main stage which will do the same thing when he
double clicks on the thumbnail( the difference is in drag-drop case
Video(UILoader) will be placed wherever user left his mouse). I am not sure
in AS 3.0 how will i implement drag and drop using MOUSE UP and MOUSE DOWN
in the tilelist component . Anyone has any idea, please help me out
Thanks
Anuj

/CODE FOR DOUBLE CLICK
myTileList.addEventListener(MouseEvent.DOUBLE_CLICK,OpenVideoOnDoubleClicking);

//Double Clicking  of thumbnail
function OpenVideoOnDoubleClicking(event:MouseEvent):void
{
TileTrack=event.currentTarget;
TileIndex=TileTrack.selectedIndex;
CreateUILoaderObject(TileIndex); //This function will creae UILoader to
the main stage by tracking the index of TileList
}
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Language translation from English to german/russian etc

2008-04-23 Thread anuj sharma
Hi guys
I came under a scenario where I have 15 User interface screens all in
English and they are designed graphically (not using Action Script code at
all). Now my requirements is that I need to convert all of those 15 screens
to 8 more languages which include russian, german, hebrew , japanese and few
more. I need to see how does those screens look with other languages.
Does anyone know any plugin where i can just pass those swf files and new
swf files came with converted language. Somehow like this webpage

http://www.windowslivetranslator.com/Default.aspx

Please let me know if there is any other way too.
Any help will be highly appreciated.
Thanks  a lot.
Anuj
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Re: Language translation from English to german/russian etc

2008-04-23 Thread anuj sharma
Thanks for your help guys, Hmm this seems little trickier than i thought. ok
i will se if I can convince my management to give some time to me to create
XML for languages. Anyone if find any other shorter and easier way please
let me know.
All your help is/will be highly appreciated
Anuj

On Wed, Apr 23, 2008 at 2:13 PM, anuj sharma [EMAIL PROTECTED] wrote:

 Hi guys
 I came under a scenario where I have 15 User interface screens all in
 English and they are designed graphically (not using Action Script code at
 all). Now my requirements is that I need to convert all of those 15 screens
 to 8 more languages which include russian, german, hebrew , japanese and few
 more. I need to see how does those screens look with other languages.
 Does anyone know any plugin where i can just pass those swf files and new
 swf files came with converted language. Somehow like this webpage

 http://www.windowslivetranslator.com/Default.aspx

 Please let me know if there is any other way too.
 Any help will be highly appreciated.
 Thanks  a lot.
 Anuj


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] MouseOver Scaling of elements in Tile List

2008-04-22 Thread anuj sharma
Hi Glen
Thanks for the reply. Your solution worked great but in my case it is not
fulfilling because my video thumbnails are in the tileList container and it
is scaling towards downward direction. As you said they are scaling, I might
need to look for different way. If you know any good resource for scaling in
the container please let me know
Thanks

On Tue, Apr 22, 2008 at 2:13 AM, Glen Pike [EMAIL PROTECTED]
wrote:

 the target property of the MouseEvent is the thing that you are hovering
 over so:

 e.target.scaleX = 1.5;
 e.target.scaleY = 1.5;

 The target is a property of the Event class so I think most events work
 like this...

 Glen

 anuj sharma wrote:

  Hi Guys
  Can anyone help me in scaling TileList elements on mouse hover. Below is
  my
  code. What I did is I put 16 SWfs in Tile List uisng XML and it is
  working
  fine. On Double click of thumbnails I would be able to load videos too.
  I am
  successful in getting the index of selected item  for click and double
  click
  events by  using selectedIndex property. My problem is that I want
  thumbnails to expand and contract with the mouse over and mouse out. I
  am
  not successful in getting the index of hovered thumbnail and I am
  messing up
  things because when i used my logic(which is not right :-)) for scale X
  and
  scale Y it is going to scale the whole tileList component but not the
  hovered thumbnail. i am not sure how to target to get the index of
  hovered
  thumbnail in the tileList.
  Please help me out
  Thanks for your help.
  Anuj
 
 
  //Defining Metadata for loading external thumbnails
  var picsXML:XML = items
 item label=Camera-1 source=video/pic_1.swf /
 item label=Camera-2 source=video/pic_2.swf /
 item label=Camera-3 source=video/pic_3.swf /
 item label=Camera-4 source=video/pic_4.swf /
 item label=Camera-5 source=video/pic_5.swf /
 item label=Camera-6source=video/pic_6.swf /
 item label=Camera-7source=video/pic_7.swf /
 item label=Camera-8source=video/pic_8.swf /
 item label=Camera-9 source=video/pic_8.swf /
 item label=Camera-10 source=video/pic_10.swf /
 item label=Camera-11 source=video/pic_11.swf /
 item label=Camera-12 source=video/pic_12.swf /
 item label=Camera-13 source=video/pic_13.swf /
 item label=Camera-14 source=video/pic_14.swf /
 item label=Camera-15 source=video/pic_15.swf /
 item label=Camera-16 source=video/pic_16.swf /
 /items;
 
 
  var myTileList:TileList=new TileList();
  var TileListLength:Number;
  myTileList.dataProvider = new DataProvider(picsXML);
  myTileList.direction = ScrollBarDirection.HORIZONTAL;
  myTileList.rowHeight = 115;
  myTileList.columnWidth = 200;
  myTileList.width = 800;
  myTileList.height = 135;
  TileListLength=myTileList.length;
  myTileList.move(52,500);
  addChild(myTileList);
 
  //Getting the index of the thumbnails
  myTileList.doubleClickEnabled=true;
  myTileList.addEventListener(MouseEvent.MOUSE_OVER,scale);
  myTileList.addEventListener(MouseEvent.MOUSE_OUT,scaleBack);
 
 
  function scale(e:MouseEvent):void
  {
  myTileList.scaleX=1.5;
  cmyTileList.scaleY=1.5;
  }
 
  function scaleBack(e:MouseEvent):void
  {
  myTileList.scaleX=1;
  cmyTileList.scaleY=1;
  }
  ___
  Flashcoders mailing list
  Flashcoders@chattyfig.figleaf.com
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 
 
 

 --

 Glen Pike
 01326 218440
 www.glenpike.co.uk http://www.glenpike.co.uk

 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] MouseOver Scaling of elements in Tile List

2008-04-21 Thread anuj sharma
Hi Guys
Can anyone help me in scaling TileList elements on mouse hover. Below is my
code. What I did is I put 16 SWfs in Tile List uisng XML and it is working
fine. On Double click of thumbnails I would be able to load videos too. I am
successful in getting the index of selected item  for click and double click
events by  using selectedIndex property. My problem is that I want
thumbnails to expand and contract with the mouse over and mouse out. I am
not successful in getting the index of hovered thumbnail and I am messing up
things because when i used my logic(which is not right :-)) for scale X and
scale Y it is going to scale the whole tileList component but not the
hovered thumbnail. i am not sure how to target to get the index of hovered
thumbnail in the tileList.
Please help me out
Thanks for your help.
Anuj


//Defining Metadata for loading external thumbnails
var picsXML:XML = items
item label=Camera-1 source=video/pic_1.swf /
item label=Camera-2 source=video/pic_2.swf /
item label=Camera-3 source=video/pic_3.swf /
item label=Camera-4 source=video/pic_4.swf /
item label=Camera-5 source=video/pic_5.swf /
item label=Camera-6source=video/pic_6.swf /
item label=Camera-7source=video/pic_7.swf /
item label=Camera-8source=video/pic_8.swf /
item label=Camera-9 source=video/pic_8.swf /
item label=Camera-10 source=video/pic_10.swf /
item label=Camera-11 source=video/pic_11.swf /
item label=Camera-12 source=video/pic_12.swf /
item label=Camera-13 source=video/pic_13.swf /
item label=Camera-14 source=video/pic_14.swf /
item label=Camera-15 source=video/pic_15.swf /
item label=Camera-16 source=video/pic_16.swf /
/items;


var myTileList:TileList=new TileList();
var TileListLength:Number;
myTileList.dataProvider = new DataProvider(picsXML);
myTileList.direction = ScrollBarDirection.HORIZONTAL;
myTileList.rowHeight = 115;
myTileList.columnWidth = 200;
myTileList.width = 800;
myTileList.height = 135;
TileListLength=myTileList.length;
myTileList.move(52,500);
addChild(myTileList);

//Getting the index of the thumbnails
myTileList.doubleClickEnabled=true;
myTileList.addEventListener(MouseEvent.MOUSE_OVER,scale);
myTileList.addEventListener(MouseEvent.MOUSE_OUT,scaleBack);


function scale(e:MouseEvent):void
{
myTileList.scaleX=1.5;
cmyTileList.scaleY=1.5;
}

function scaleBack(e:MouseEvent):void
{
myTileList.scaleX=1;
cmyTileList.scaleY=1;
}
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Checking overlapping of 2 objects of different type. Please help

2008-03-28 Thread anuj sharma
Hi
I am trying to check if objects of 2 different type overlaps or not. I have
a CameraStartDrag which is activated by on press of MovieClip. I have some
container of type Sprite which contains UI Loader component. All i need is
if user takes CameraStartDrag on top of UILoader, the CameraStartDrag's
index should come on top of UILoader. Currently CameraStartDrag is going
back of UILoader. Attached is the code.
Please help me out as this problem is making me crazy.
Thanks


for (var j:Number=1; j=16; j++)
{
var CameraStartDrag;

//Getting all the thumbnails by Name for dragging on stage
CameraStartDrag=getChildByName(Thumbnail_+j);
}
CameraStartDrag.addEventListener(MouseEvent.MOUSE_DOWN,CamStartDragTN);
var container:Sprite=new Sprite();
function CamStartDragTN(event:MouseEvent):void
{
var CameraStartDrag=event.target;
CameraStartDrag.startDrag();
if(container.numChildren0)
{
for (var z:Number=0; z=container.numChildren-1; z++)
{
var Child:DisplayObject=container.getChildAt(z);
if(CameraStartDrag.hitTestObject(Child))
{
trace(Object Hit);
}
}
}
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Re: Checking overlapping of 2 objects of different type. Please help

2008-03-28 Thread anuj sharma
Hi Guys I fixed it I added the container as addChildAt(container,0).
Thanks for ur patience.
Anuj

On Fri, Mar 28, 2008 at 2:17 PM, anuj sharma [EMAIL PROTECTED] wrote:

 Hi
 I am trying to check if objects of 2 different type overlaps or not. I
 have a CameraStartDrag which is activated by on press of MovieClip. I have
 some container of type Sprite which contains UI Loader component. All i need
 is if user takes CameraStartDrag on top of UILoader, the CameraStartDrag's
 index should come on top of UILoader. Currently CameraStartDrag is going
 back of UILoader. Attached is the code.
 Please help me out as this problem is making me crazy.
 Thanks


 for (var j:Number=1; j=16; j++)
 {
 var CameraStartDrag;

 //Getting all the thumbnails by Name for dragging on stage
 CameraStartDrag=getChildByName(Thumbnail_+j);
 }
 CameraStartDrag.addEventListener(MouseEvent.MOUSE_DOWN,CamStartDragTN);
 var container:Sprite=new Sprite();
 function CamStartDragTN(event:MouseEvent):void
 {
 var CameraStartDrag=event.target;
 CameraStartDrag.startDrag();
 if(container.numChildren0)
 {
 for (var z:Number=0; z=container.numChildren-1; z++)
 {
 var Child:DisplayObject=container.getChildAt(z);
 if(CameraStartDrag.hitTestObject(Child))
 {
 trace(Object Hit);
 }
 }
 }

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] ReferenceError: Error #1069:

2008-03-26 Thread anuj sharma
Hi guys
I am getting reference error which is breaking my code. In my code i have
drag gable movieclip which when crossed some coordinates is going to call
external UIloader (containing external SWF) on the main stage. I can create
multiple instances of UIloader  by dragging same movie multiple times.(I am
providing the option of dragging and dropping movieClip as well as UIloader
too). Now when i am trying to drop movieclip on already created UIloader I
am getting this error which is breaking my code. ReferenceError: Error
#1069: Property index not found on flash.display.Stage and there is no
default value.

Actually I have 2 drag and drop functions(on mousedown and mouse up) in my
program. One for movieClip drag drop and other for UILoader drag  drop. It
seems like when i am dropping my movieclip on already existing UIloader,
drop function of UIloader ( instead of MovieClip) has been called . I am not
sure how to fix that.
Any help will be highly appreciated.
I have made everything in AS 3.0 without my custom classes. Attached is the
code to make things little clear.
Thanks
Anuj
/*Code for movieDrop*/

function CamStopDragTN(event:MouseEvent):void
{
var CameraStartDrag=event.currentTarget;


if ((CameraStartDrag.xBoundedX)  (CameraStartDrag.yBoundedY1)
(CameraStartDrag.yBoundedY2) 
(CameraStartDrag!=null) )

{

CameraStartDrag.stopDrag();
var UIcontainer:DisplayObject=CreateUILoaderObject(num);
UIcontainer.x=mouseX-UIcontainer.width/2;
UIcontainer.y=mouseY-UIcontainer.height/2;


CameraStartDrag.x=x1;
CameraStartDrag.y=y1;

}
/*Code for UILoader Drop
function dropUILoader(e:MouseEvent):void
{

if(e.target is UILoader)
{
if(mouseY746)
{

var myUILoader:UILoader = e.target as UILoader;


myUILoader.stopDrag();
myUILoader.mouseChildren=false;

myUILoader.x=mouseX-myUILoader.width/2-23;
myUILoader.y=mouseY-myUILoader.height/2-42;



else
{
myUILoader.unload();
container.removeChild(myUILoader);

}
}
}
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Re: Tricky Scenerio

2008-03-20 Thread anuj sharma
Hi guys
Thanks for replying.
That's my problem. I am kind of confused ' *To be FLEX or not to be FLEX*'.
I start exploring FLEX but it's just lack of guidance and my initial
hesitation to try FLEX with my shrinking deadline.
My whole code is currently on the main timeline( no custom classes yet) in
Flash authoring IDE and working fine except this last flexible grid thing.
If this thing has to be done only in FLEX then I have to go for that.
Please help me out if I have to use FLEX and if my existing code is going to
be merged and working fine in FLEX or not.
I will appreciate your help in this matter.
Regards
Anuj

On Wed, Mar 19, 2008 at 4:54 PM, anuj sharma [EMAIL PROTECTED] wrote:

 Hi Guys
 I am trying to accomplish something which I think is little tricky for me
 in AS 3.0. Please help me out if you guys have any idea how to solve it.
 I am putting multiple instances of UILoader (containing videos) on the
 main stage and we can put them anywhere over the screen(free flow). I have
 provided 1 grid button which will arrange the UILoaders in a grid format. I
 hardcoded my program to move children to specific coordinates. I did not use
 grid becaue i don't want to stuck user from using free flow mode of moving
 UILoaders. So far I am successful. Now my scenerio is that suppose I  have 8
 UILoaders in grid format placed 4 in one row and 4 in second row, and if
 user put 9th UILoader in 2 nd row then all the UILoaders in 2nd row will
 shrink and move to accomodate 9th UIloader. And all the UILoaders in row 2
 including 9th UILoader should be of same size.
 In short in any row if I put UILoader on top of already existed UILoader,
 all the UIloaders shrink symmetrically to let the video accommodated and
 placed.

 For the time being I have no idea how to target this problem. Any help
 will be highly appreciated.
 Thanks
 Anuj



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Tricky Scenerio

2008-03-19 Thread anuj sharma
Hi Guys
I am trying to accomplish something which I think is little tricky for me in
AS 3.0. Please help me out if you guys have any idea how to solve it.
I am putting multiple instances of UILoader (containing videos) on the main
stage and we can put them anywhere over the screen(free flow). I have
provided 1 grid button which will arrange the UILoaders in a grid format. I
hardcoded my program to move children to specific coordinates. I did not use
grid becaue i don't want to stuck user from using free flow mode of moving
UILoaders. So far I am successful. Now my scenerio is that suppose I  have 8
UILoaders in grid format placed 4 in one row and 4 in second row, and if
user put 9th UILoader in 2 nd row then all the UILoaders in 2nd row will
shrink and move to accomodate 9th UIloader. And all the UILoaders in row 2
including 9th UILoader should be of same size.
In short in any row if I put UILoader on top of already existed UILoader,
all the UIloaders shrink symmetrically to let the video accommodated and
placed.

For the time being I have no idea how to target this problem. Any help will
be highly appreciated.
Thanks
Anuj
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Running Independent SWF

2008-03-13 Thread anuj sharma
Hi Bob
Thanks for reply. This is not AIR, its simple swf file created from Flash
authoring timeline. All the code is on main timeline. Also it behaves
similarly on HTML published too, i tried windows exe publishing too.
It seems like in my Flash IDE it is loading external SWF but when i am
trying to run independent swf it is not loading external swfs. I don't know
how to get rid of this problem.
Please help
Thanks
Anuj

On Wed, Mar 12, 2008 at 7:19 PM, Bob Wohl [EMAIL PROTECTED] wrote:

 Is this from opening the swf or is this an air app? Does this behave this
 way when testing from embeding in an html document?


 B.

 On Wed, Mar 12, 2008 at 3:08 PM, anuj sharma [EMAIL PROTECTED] wrote:

  Hi All
  I made a desktop application( in AS 3.0 using Flash IDE) in which I am
  loading bunch of SWFs in my UILoader. The file is working fine from
 Flash
  Authoring tool( IDE). I publish my file using local files only. Now when
 I
  am trying to run my independent SWF file, i am getting error
  Error #2044: Unhandled ioError:. text=Error #2035: URL Not Found. URL:
  file:///video/pic_8.swf.
  The things are working fine if i open fla and hit ctr+Enter.I don't know
  why
  its not working as an independent swf. Also the title of the player is
  showing player 9, which means it is using the player it is supposed to
  use.
  If i change my publish settings to
   network only nothing works at all.
  i am just using XML to load external SWFs and videos in UIloader
  component.
  Any body has any solution for this kind of problem.
  I am putting all my code on main time line in Flash authoring tool and
 my
  Operating system is XP
  Thanks a lot.
  Anuj
  ___
  Flashcoders mailing list
  Flashcoders@chattyfig.figleaf.com
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Running Independent SWF

2008-03-13 Thread anuj sharma
Hi ALL
Thanks for your help. one of guy help me out in figuruign this thing out. I
have to use /.video/pic_8.swf. Now the problem is solved.
Thanks
Anuj

On Thu, Mar 13, 2008 at 1:58 PM, EECOLOR [EMAIL PROTECTED] wrote:

 It is just a guess, but is the url in your swf /video/pic_8.swf? If so,
 you might want to change it to video/pic_8.swf (without the slash at the
 start). The slash at the start is only usefull if you are serving your swf
 from a webserver.


 Greetz Erik


 On 3/13/08, Marc Hoffman [EMAIL PROTECTED] wrote:
 
  Anuj,
 
  I know this is more of a hack than really fixing the problem, but
  have you tried keeping all swf's in the same directory? I am
  suspicious of the URL: file:///video/pic_8.swf. Why so many directory
  levels in the path?
 
 
  - Marc
 
 
 
 
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Re: Debugging issue

2008-03-12 Thread anuj sharma
Thanks for reply.
I am sorry I should be more clear. My OS is XP not VIsta and I am using AS
3.0 in Flash IDE. I haven't used FLEX builder yet. I am going to use FLEX
for my next phase of the project. From coding aspect i put all the code on
my main timeline( No custom classes yet). I googled that error but it
doesn't give that much info about that. I tried publishing using different
settings too. Still no help.
Please let me know if you have any idea about that.
Also weird thing is happening that when i run my file from IDE it's running
fine, but when i try to debug it it gives me that error. Also when i am
trying to launch independent SWF file the program is crashing , it would not
show what it is supposed to show. It seems that there is security or player
issue involved too. I am not clear though. Anybody has any idea
Thanks for ur help guys
Anuj

On Tue, Mar 11, 2008 at 5:51 PM, anuj sharma [EMAIL PROTECTED] wrote:

 Hi
 I am trying to debug my project and it gives me long weird message as
 follows. Its saying some Security Sandbox violation.
 I am loading external videos in myUILoader component using XML.All of
 those directories are in the same folder.
 Does anyone has any idea how would i fix that.

 Any Help will be appreciated.
 Thanks
 Anuj

 Attemping to launch and connect to Player using URL C:\Documents and
 Settings\ASharma\Desktop\VCD Flash Concept\VideoForWeb\Video
 Showcase\VideoShowcaseRev32ObjectRunTimeError.swf
 [SWF] C:\Documents and Settings\ASharma\Desktop\VCD Flash
 Concept\VideoForWeb\Video Showcase\VideoShowcaseRev32ObjectRunTimeError.swf
 - 6647189 bytes after decompression
 *** Security Sandbox Violation ***
 Connection to
 file:///C|/Documents%20and%20Settings/ASharma/Desktop/VCD%20Flash%20Concept/VideoForWeb/Video%20Showcase/Settings.xml
 halted - not permitted from
 file:///C|/Documents%20and%20Settings/ASharma/Desktop/VCD%20Flash%20Concept/VideoForWeb/Video%20Showcase/VideoShowcaseRev32ObjectRunTimeError.swf
 SecurityError: Error #2148: SWF file
 file:///C|/Documents%20and%20Settings/ASharma/Desktop/VCD%20Flash%20Concept/VideoForWeb/Video%20Showcase/VideoShowcaseRev32ObjectRunTimeError.swf
 cannot access local resource
 file:///C|/Documents%20and%20Settings/ASharma/Desktop/VCD%20Flash%20Concept/VideoForWeb/Video%20Showcase/Settings.xml.
 Only local-with-filesystem and trusted local SWF files may access local
 resources.
 at flash.net::URLStream/load()
 at flash.net::URLLoader/load()
 at
 VideoShowcaseRev32ObjectRunTimeError_fla::MainTimeline/frame1()[VideoShowcaseRev32ObjectRunTimeError_fla.MainTimeline::frame1:373]

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Running Independent SWF

2008-03-12 Thread anuj sharma
Hi All
I made a desktop application( in AS 3.0 using Flash IDE) in which I am
loading bunch of SWFs in my UILoader. The file is working fine from Flash
Authoring tool( IDE). I publish my file using local files only. Now when I
am trying to run my independent SWF file, i am getting error
Error #2044: Unhandled ioError:. text=Error #2035: URL Not Found. URL:
file:///video/pic_8.swf.
The things are working fine if i open fla and hit ctr+Enter.I don't know why
its not working as an independent swf. Also the title of the player is
showing player 9, which means it is using the player it is supposed to use.
If i change my publish settings to
 network only nothing works at all.
i am just using XML to load external SWFs and videos in UIloader component.
Any body has any solution for this kind of problem.
I am putting all my code on main time line in Flash authoring tool and my
Operating system is XP
Thanks a lot.
Anuj
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] mouse x and y

2008-03-11 Thread anuj sharma
Hi Throdore.
You can try MOUSE_MOVE and trace mouseX and mouseY and it will give you your
mouse coordinates whenever you move your mouse. Similarly you can use mouseX
and mouseYon mouseUP or DOWN event or CLICK.
Thanks
Anuj

On Tue, Mar 11, 2008 at 4:49 AM, Lehr, Theodore M (N-SGIS) 
[EMAIL PROTECTED] wrote:


 How can I trace the x and y of the mouse? I would want to grab it on a
 click

 Ted
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Is there any grid component in AS 3.0

2008-03-11 Thread anuj sharma
can I use my already AS 3.0 code in Flex . i am not sure how do these things
integrate. Please let me know do I have to create a new application from
scratch in Flex or does my already existing code going to be imported.
Thanks
Anuj

On Mon, Mar 10, 2008 at 6:32 PM, eric e. dolecki [EMAIL PROTECTED] wrote:

 check out Flex.

 On Mon, Mar 10, 2008 at 8:08 PM, anuj sharma [EMAIL PROTECTED] wrote:

  Hi All
  I am looking for a grid container in AS 3.0. With my search I found that
  AS
  3.0 supports Data Grid but for holding data not for visual layout
  perspective. I am looking something for visual layout perspective. My
 aim
  is
  that if user drops 4 objects on the main screen  and hits arrange button
  then 4 objects will be arranged in a 2x2 grid format. Any ideas e(xcept
 to
  manually specifying the coordinates) how would i do that and which
  container
  i will use for that.
  Thanks in advance
  Anuj
  ___
  Flashcoders mailing list
  Flashcoders@chattyfig.figleaf.com
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Is there any grid component in AS 3.0

2008-03-11 Thread anuj sharma
Hi Jason Merill and Eric
Thanks a lot for your suggestions. i will start exploring FLEX in my project
now.
Any suggestions for good online resources or good books for that. I am going
to google that too.
Appreciate your help,
Anuj

On Tue, Mar 11, 2008 at 11:29 AM, Kerry Thompson [EMAIL PROTECTED]
wrote:

 anuj Sharma wrote:

  can I use my already AS 3.0 code in Flex . i am not sure how do these
 things
  integrate. Please let me know do I have to create a new application from
  scratch in Flex or does my already existing code going to be imported.

 Your AS3 code will probably work, but you'll need to make some
 modifications. For example, if you have declared a document class, that
 will
 be the file you will choose as your project file in Flex. Also, if you
 have
 assets in your Flash file, export them, publish it as a swf (no code, no
 timeline), and you can use the swf essentially as a library in Flex.

 I could go into more detail, but this is really a Flex topic, and this is
 a
 Flash list. Check out FlexCoders--it's high volume (a LOT of people are
 switching to Flex, it appears), but there are some bright guys there (look
 for Jason Merrill's posts), and it is, surprisingly enough, more oriented
 towards Flex.

 Cordially,

 Kerry Thompson


 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Is there any grid component in AS 3.0

2008-03-11 Thread anuj sharma
Hi Glenn  Jason
Thank you very much for your help and resources. i will check them out.
Anuj

On Tue, Mar 11, 2008 at 1:39 PM, Glen Pike [EMAIL PROTECTED]
wrote:

 Look at the Flex Quick Starts on Adobe Devnet...

 http://www.adobe.com/devnet/flex/

 Total Training do a couple of Flex 2 courses.  I liked James Talbot, but
 I found Leo Schuman's voice very sleep inducing and having been through
 the RIA one first, then the Visual Programming one was too basic
 sometimes - even though it expected a certain level of knowledge, the
 guy kept going over stuff below this.

 http://www.totaltraining.com/prod/adobe/flex.asp

 If you get Flex Builder - the full version, not SDK - you can follow all
 the tutorials in that, even on the trial, that's a good place to start.


 anuj sharma wrote:
  Hi Jason Merill and Eric
  Thanks a lot for your suggestions. i will start exploring FLEX in my
 project
  now.
  Any suggestions for good online resources or good books for that. I am
 going
  to google that too.
  Appreciate your help,
  Anuj
 
  On Tue, Mar 11, 2008 at 11:29 AM, Kerry Thompson 
 [EMAIL PROTECTED]
  wrote:
 
 
  anuj Sharma wrote:
 
 
  can I use my already AS 3.0 code in Flex . i am not sure how do these
 
  things
 
  integrate. Please let me know do I have to create a new application
 from
  scratch in Flex or does my already existing code going to be imported.
 
  Your AS3 code will probably work, but you'll need to make some
  modifications. For example, if you have declared a document class, that
  will
  be the file you will choose as your project file in Flex. Also, if you
  have
  assets in your Flash file, export them, publish it as a swf (no code,
 no
  timeline), and you can use the swf essentially as a library in Flex.
 
  I could go into more detail, but this is really a Flex topic, and this
 is
  a
  Flash list. Check out FlexCoders--it's high volume (a LOT of people are
  switching to Flex, it appears), but there are some bright guys there
 (look
  for Jason Merrill's posts), and it is, surprisingly enough, more
 oriented
  towards Flex.
 
  Cordially,
 
  Kerry Thompson
 
 
  ___
  Flashcoders mailing list
  Flashcoders@chattyfig.figleaf.com
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 
  ___
  Flashcoders mailing list
  Flashcoders@chattyfig.figleaf.com
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 
 

 --

 Glen Pike
 01736 759321
 www.glenpike.co.uk http://www.glenpike.co.uk
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Is there any grid component in AS 3.0

2008-03-11 Thread anuj sharma
One more question guys. I installed Flex 3.0 builder. It is 60 days free
trial. For my purpose do you think I should go for Builder 2.0 and not 3.0as
3.0 is kind of new. What would you recommend guys. i am also finding books
and online material hard to find for 3.0. Please let me know.
Thanks
Anuj

On Tue, Mar 11, 2008 at 2:10 PM, anuj sharma [EMAIL PROTECTED] wrote:

 Hi Glenn  Jason
 Thank you very much for your help and resources. i will check them out.
 Anuj


 On Tue, Mar 11, 2008 at 1:39 PM, Glen Pike [EMAIL PROTECTED]
 wrote:

  Look at the Flex Quick Starts on Adobe Devnet...
 
  http://www.adobe.com/devnet/flex/
 
  Total Training do a couple of Flex 2 courses.  I liked James Talbot, but
  I found Leo Schuman's voice very sleep inducing and having been through
  the RIA one first, then the Visual Programming one was too basic
  sometimes - even though it expected a certain level of knowledge, the
  guy kept going over stuff below this.
 
  http://www.totaltraining.com/prod/adobe/flex.asp
 
  If you get Flex Builder - the full version, not SDK - you can follow all
  the tutorials in that, even on the trial, that's a good place to start.
 
 
  anuj sharma wrote:
   Hi Jason Merill and Eric
   Thanks a lot for your suggestions. i will start exploring FLEX in my
  project
   now.
   Any suggestions for good online resources or good books for that. I am
  going
   to google that too.
   Appreciate your help,
   Anuj
  
   On Tue, Mar 11, 2008 at 11:29 AM, Kerry Thompson 
  [EMAIL PROTECTED]
   wrote:
  
  
   anuj Sharma wrote:
  
  
   can I use my already AS 3.0 code in Flex . i am not sure how do
  these
  
   things
  
   integrate. Please let me know do I have to create a new application
  from
   scratch in Flex or does my already existing code going to be
  imported.
  
   Your AS3 code will probably work, but you'll need to make some
   modifications. For example, if you have declared a document class,
  that
   will
   be the file you will choose as your project file in Flex. Also, if
  you
   have
   assets in your Flash file, export them, publish it as a swf (no code,
  no
   timeline), and you can use the swf essentially as a library in Flex.
  
   I could go into more detail, but this is really a Flex topic, and
  this is
   a
   Flash list. Check out FlexCoders--it's high volume (a LOT of people
  are
   switching to Flex, it appears), but there are some bright guys there
  (look
   for Jason Merrill's posts), and it is, surprisingly enough, more
  oriented
   towards Flex.
  
   Cordially,
  
   Kerry Thompson
  
  
   ___
   Flashcoders mailing list
   Flashcoders@chattyfig.figleaf.com
   http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
  
  
   ___
   Flashcoders mailing list
   Flashcoders@chattyfig.figleaf.com
   http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
  
  
  
 
  --
 
  Glen Pike
  01736 759321
  www.glenpike.co.uk http://www.glenpike.co.uk
  ___
  Flashcoders mailing list
  Flashcoders@chattyfig.figleaf.com
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Debugging issue

2008-03-11 Thread anuj sharma
Hi
I am trying to debug my project and it gives me long weird message as
follows. Its saying some Security Sandbox violation.
I am loading external videos in myUILoader component using XML.All of those
directories are in the same folder.
Does anyone has any idea how would i fix that.

Any Help will be appreciated.
Thanks
Anuj

Attemping to launch and connect to Player using URL C:\Documents and
Settings\ASharma\Desktop\VCD Flash Concept\VideoForWeb\Video
Showcase\VideoShowcaseRev32ObjectRunTimeError.swf
[SWF] C:\Documents and Settings\ASharma\Desktop\VCD Flash
Concept\VideoForWeb\Video Showcase\VideoShowcaseRev32ObjectRunTimeError.swf
- 6647189 bytes after decompression
*** Security Sandbox Violation ***
Connection to
file:///C|/Documents%20and%20Settings/ASharma/Desktop/VCD%20Flash%20Concept/VideoForWeb/Video%20Showcase/Settings.xml
halted - not permitted from
file:///C|/Documents%20and%20Settings/ASharma/Desktop/VCD%20Flash%20Concept/VideoForWeb/Video%20Showcase/VideoShowcaseRev32ObjectRunTimeError.swf
SecurityError: Error #2148: SWF file
file:///C|/Documents%20and%20Settings/ASharma/Desktop/VCD%20Flash%20Concept/VideoForWeb/Video%20Showcase/VideoShowcaseRev32ObjectRunTimeError.swf
cannot access local resource
file:///C|/Documents%20and%20Settings/ASharma/Desktop/VCD%20Flash%20Concept/VideoForWeb/Video%20Showcase/Settings.xml.
Only local-with-filesystem and trusted local SWF files may access local
resources.
at flash.net::URLStream/load()
at flash.net::URLLoader/load()
at
VideoShowcaseRev32ObjectRunTimeError_fla::MainTimeline/frame1()[VideoShowcaseRev32ObjectRunTimeError_fla.MainTimeline::frame1:373]
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Request some guidance

2008-03-10 Thread anuj sharma
Hi guys
I need some guidance from you. I almost reach the final stage of my project.
My scenario is I have multiple instances of UILoaders on the main stage. The
user can drag and drop those UILoaders wherever he wants on the main stage.
The user can put one on top to replace them too.I am successful in
implementing till now.I used AS 3.0. Finally i have to create a new
application using somehow the same code in which if user places UILoader on
top of already existing UILoader, the new UILoader does not get replaced but
moved/ gets away to give place to the placed video on the main stage. in
other words :- Let's say 4 UILoaders are placed in 2x2 matrix position on
the main stage and if you place 5th UILoader in center (on top) of all the 4
loaders, then all the 4 UIloaders will animate to bounce outwards to give
space to 5th UILoader. I used hitTestObject and hitTestPoint in my project
but I am not sure which way to go in this case. How would animation work in
this case and which is the best approach to tackle this kind of situation.
Anybody has any idea how would i do that?
Your help and guidance will be highly appreciated.
Thanks a lot
Anuj
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Is there any grid component in AS 3.0

2008-03-10 Thread anuj sharma
Hi All
I am looking for a grid container in AS 3.0. With my search I found that AS
3.0 supports Data Grid but for holding data not for visual layout
perspective. I am looking something for visual layout perspective. My aim is
that if user drops 4 objects on the main screen  and hits arrange button
then 4 objects will be arranged in a 2x2 grid format. Any ideas e(xcept to
manually specifying the coordinates) how would i do that and which container
i will use for that.
Thanks in advance
Anuj
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] UILoader move not in control (Coordinate issue)

2008-03-06 Thread anuj sharma
Hi
I am trying to move my UILoader across the screen but it is little bouncy.
MY UILoader is in the sprite container and on the mouse down I use stop drag
function where I am leaving my UILoader to mouseX and mouseY. But it is
taking the top left corner of my rectangular shape UIloader as the mouseX
and mouseY. So wherever i leave myUIloader it is bouncing its top left
corner to my mouseX and mouseY. I applied algo in which I used calculations
to calculate the distance between top left corner of my UIloader and my
mouse cursor but that also did not work.
Can anybody please tell me where I am wrong.
Thanks a lot
Anuj
/**CODE**/

function dropUILoader(e:MouseEvent):void
{

if(container is Sprite)
{

if(e.target is UILoader)
{
var myUILoader:UILoader = e.target as UILoader;

myUILoader.move(mouseX,mouseY);
}
}
}
Alternative approach which I tried


//myUILoader.x=mouseX;
//myUILoader.y=mouseY;
//
//var x1:Number=myUILoader.x;
//var y1:Number=myUILoader.y;
//
//var neX:Number=(x1+myUILoader.width)-mouseX;
//var neY:Number=(y1+myUILoader.height)-mouseY;
//
//var neFx:Number=Math.sqrt(neX*neX+neY*neY);
//
//myUILoader.move(mouseX-neFx,mouseY-neFx)
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Hit Object Question

2008-03-05 Thread anuj sharma
Thanks a lot
Its fixed now.
Appreciate it
Anuj

On Wed, Mar 5, 2008 at 2:32 AM, Kenneth Kawamoto [EMAIL PROTECTED]
wrote:

 Something like:

 private function greenTint(e:MouseEvent):void {
var ctfm:ColorTransform = new ColorTransform();
ctfm.color = 0x00ff00;
e.target.transform.colorTransform = ctfm;
 }

 private function redTint(e:MouseEvent):void {
var ctfm:ColorTransform = new ColorTransform();
ctfm.color = 0xff;
e.target.transform.colorTransform = ctfm;
 }

 Kenneth Kawamoto
 http://www.materiaprima.co.uk/

 anuj sharma wrote:
  How do I change the color of one sprite. I am sorry but I am little
  unclear of how does it work both toggling or change Sprite color. I am
  little new to this language .
  Please help me out
  Thanks
  Anuj
 
  On Tue, Mar 4, 2008 at 1:29 PM, Kenneth Kawamoto
  [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote:
 
  To make your approach work, you can draw a rectangle in ldrBdr and
  bdrRep (one in red and one in green) and toggle the alpha of one of
 them
  sits above the other (if you addChild() it goes above everything
 already
  in the display list).
 
  Or just change the colour of one border Sprite instead.
 
  Kenneth Kawamoto
  http://www.materiaprima.co.uk/
 
  anuj sharma wrote:
Hi Kenneth
Thanks for the reply. So what's the solution of my problem?
Thanks
Anuj
   
On Tue, Mar 4, 2008 at 1:01 PM, Kenneth Kawamoto
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED] wrote:
   
I think it's a typo but your BdrRep has no rectangle drawn,
  and even if
you did have the rectangle, toggling the alpha of Sprite
  underneath will
not give you any visual feedbacks...
   
Kenneth Kawamoto
http://www.materiaprima.co.uk/
   
anuj sharma wrote:
  Hi all
  I am trying to implement hit object in my project. I have
  sprite
class and I
  am loading multiple instances of UI Loader in my sprite
  class and
displaying
  it on the main screen. The user can drag and drop those
  UILoaders
on the
  main stage wherever they want.My aim was that if user
  drops one
UIloader on
  top of already placed UiLoader, then the already placed
  UILoader
will be
  replaced with the dropped UILoader. I am successful in
implementing that by
  hitting hitTestObject method. All of my UIloaders are
 having
green color
  border. Now my requirement is that as soon as the user
 places
UILoader on
  top of already existing UILoader , the  UILoader which is
  going to be
  replaced changes border color from green to red showing
  the user
that the
  UIloader is being replaced and on Mouse release the
  UiLoader is
going to be
  replaced.
  In short on mouse over, the border color has to be changed
  and on
mouse
  release, object has to be replaced. I am adding my
  rectangle(in
Sprite
  Container) as the border to the UILoader. Below is some
  code to
make things
  little clearer
  Please help me in figuring out the problem.
  Any help will be appreciated.
  Thanks
  Anuj
  /*CODE
  //UILoader Being Created
  function
 CreateUILoaderObject(num:Number):DisplayObject
  {
  var myUILoader:UILoader = new UILoader();
  var  container:Sprite=new Sprite();
  myUILoader.name=myUILoader;
  myUILoader.source = /video/pic_+(num+1)+.swf;
  myUILoader.load();
 
  //Defining Border for the Selected Camera
  var ldrBdr:Sprite = new Sprite();
  ldrBdr.name = border;
  ldrBdr.alpha=0;
  ldrBdr.graphics.lineStyle(2, 0x00ff00);
  ldrBdr.graphics.drawRect(myUILoader.x+23,
  myUILoader.y+45,
  myUILoader.width, myUILoader.height);
 
  //Defining Border for the replaced Camera
  var BdrRep:Sprite=new Sprite();
  BdrRep.name=RepBorder;
  BdrRep.alpha=0;
  ldrBdr.graphics.lineStyle(2, 0x00ff00);
  ldrBdr.graphics.drawRect(myUILoader.x+23,
  myUILoader.y+45,
  myUILoader.width, myUILoader.height);
 
  myUILoader.addChild

[Flashcoders] Weird Behavior of hitTestPoint and removeChild()

2008-03-05 Thread anuj sharma
Hi
I am trying to drag and drop multiple instances of UILoader on stage. My
goal is if user puts UILaoder partially on top of other UILoader , it should
just stay on top of it. If user puts on top of UILoader more than the
central point of other UILoader, the other UILoader will change the color of
its border and on mouse release gets replaced by the placed UILoader.
I am successful in getting all this but I am getting inconsistent results as
an output. Sometimes I have to put exactly on top of other UILoader to
replace it and sometimes I just touch the UILoader and it shows red border
and gets replaced. I used the logic of calculating the center of
rectangle(my UILoader container) and use hitPoint method, and as soon as
dragged UILoader hits the calculated center of UILoader, it gets replaced.
Please help me out in where I am messing things up.Any better idea than this
will also be highly appreciated.
( Following is the function which is telling my UILoader to replace of
stopDrag.)
Thanks a lot
Anuj
/*CODE***/
function dropUILoader(e:MouseEvent):void
{

if(e.targetis UILoader)
{
var myUILoader:UILoader = e.target as UILoader;

if (mouseY746)
{
myUILoader.stopDrag();
//Putting video on top of already existed videos
var trackChild:Number=container.getChildIndex(myUILoader);
var childContainer:DisplayObject= container.getChildAt
(trackChild);
for (var z:Number=0; z=container.numChildren-1; z++)
{
var restChild:DisplayObject=container.getChildAt(z);

if (childContainer!=restChild)
{
if(restChild is UILoader)
{
var cRC:UILoader=restChild as UILoader;

var regcRCx:Number=cRC.x;
var regcRCy:Number=cRC.y;

var regcRCWidth:Number=cRC.width;
var regcRCHeight:Number=cRC.height;


if(childContainer.hitTestPoint(((regcRCx+regcRCWidth)/2),(regcRCy+regcRCHeight)/2)==true)

{
trace(Totally Hit);
container.removeChild(cRC);
}
else
{
trace(Partially Hit);
}
}
}
}
}
else
{
myUILoader.unload();
container.removeChild(myUILoader);
}
}
}
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Re: Weird Behavior of hitTestPoint and removeChild()

2008-03-05 Thread anuj sharma
I am sorry my center formula should be ((regcRCx+regcRCWidth/2),

 (regcRCy+regcRCHeight/2), but with this formula also my code is giving
 inconsisten results. It seems like ti is keeping something in the memory and
 showing deletion stage of



 instance somewhere where I did not intend  to.

Thanks



On Wed, Mar 5, 2008 at 3:02 PM, anuj sharma [EMAIL PROTECTED] wrote:

 Hi
 I am trying to drag and drop multiple instances of UILoader on stage. My
 goal is if user puts UILaoder partially on top of other UILoader , it should
 just stay on top of it. If user puts on top of UILoader more than the
 central point of other UILoader, the other UILoader will change the color of
 its border and on mouse release gets replaced by the placed UILoader.
 I am successful in getting all this but I am getting inconsistent results
 as an output. Sometimes I have to put exactly on top of other UILoader to
 replace it and sometimes I just touch the UILoader and it shows red border
 and gets replaced. I used the logic of calculating the center of
 rectangle(my UILoader container) and use hitPoint method, and as soon as
 dragged UILoader hits the calculated center of UILoader, it gets replaced.
 Please help me out in where I am messing things up.Any better idea than
 this will also be highly appreciated.
 ( Following is the function which is telling my UILoader to replace of
 stopDrag.)
 Thanks a lot
 Anuj
 /*CODE***/
 function dropUILoader(e:MouseEvent):void
 {

 if(e.targetis UILoader)
 {
 var myUILoader:UILoader = e.target as UILoader;

 if (mouseY746)
 {
 myUILoader.stopDrag();
 //Putting video on top of already existed videos
 var trackChild:Number=container.getChildIndex(myUILoader);
 var childContainer:DisplayObject= container.getChildAt
 (trackChild);
 for (var z:Number=0; z=container.numChildren-1; z++)
 {
 var restChild:DisplayObject=container.getChildAt(z);

 if (childContainer!=restChild)
 {
 if(restChild is UILoader)
 {
 var cRC:UILoader=restChild as UILoader;

 var regcRCx:Number=cRC.x;
 var regcRCy:Number=cRC.y;

 var regcRCWidth:Number=cRC.width;
 var regcRCHeight:Number=cRC.height;

 
 if(childContainer.hitTestPoint(((regcRCx+regcRCWidth)/2),(regcRCy+regcRCHeight)/2)==true)

 {
 trace(Totally Hit);
 container.removeChild(cRC);
 }
 else
 {
 trace(Partially Hit);
 }
 }
 }
 }
 }
 else
 {
 myUILoader.unload();
 container.removeChild(myUILoader);
 }
 }
 }


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Hit Object Question

2008-03-04 Thread anuj sharma
Hi Kenneth
Thanks for the reply. So what's the solution of my problem?
Thanks
Anuj

On Tue, Mar 4, 2008 at 1:01 PM, Kenneth Kawamoto [EMAIL PROTECTED]
wrote:

 I think it's a typo but your BdrRep has no rectangle drawn, and even if
 you did have the rectangle, toggling the alpha of Sprite underneath will
 not give you any visual feedbacks...

 Kenneth Kawamoto
 http://www.materiaprima.co.uk/

 anuj sharma wrote:
  Hi all
  I am trying to implement hit object in my project. I have sprite class
 and I
  am loading multiple instances of UI Loader in my sprite class and
 displaying
  it on the main screen. The user can drag and drop those UILoaders on the
  main stage wherever they want.My aim was that if user drops one UIloader
 on
  top of already placed UiLoader, then the already placed UILoader will be
  replaced with the dropped UILoader. I am successful in implementing that
 by
  hitting hitTestObject method. All of my UIloaders are having green color
  border. Now my requirement is that as soon as the user places UILoader
 on
  top of already existing UILoader , the  UILoader which is going to be
  replaced changes border color from green to red showing the user that
 the
  UIloader is being replaced and on Mouse release the UiLoader is going to
 be
  replaced.
  In short on mouse over, the border color has to be changed and on mouse
  release, object has to be replaced. I am adding my rectangle(in Sprite
  Container) as the border to the UILoader. Below is some code to make
 things
  little clearer
  Please help me in figuring out the problem.
  Any help will be appreciated.
  Thanks
  Anuj
  /*CODE
  //UILoader Being Created
  function CreateUILoaderObject(num:Number):DisplayObject
  {
  var myUILoader:UILoader = new UILoader();
  var  container:Sprite=new Sprite();
  myUILoader.name=myUILoader;
  myUILoader.source = /video/pic_+(num+1)+.swf;
  myUILoader.load();
 
  //Defining Border for the Selected Camera
  var ldrBdr:Sprite = new Sprite();
  ldrBdr.name = border;
  ldrBdr.alpha=0;
  ldrBdr.graphics.lineStyle(2, 0x00ff00);
  ldrBdr.graphics.drawRect(myUILoader.x+23, myUILoader.y+45,
  myUILoader.width, myUILoader.height);
 
  //Defining Border for the replaced Camera
  var BdrRep:Sprite=new Sprite();
  BdrRep.name=RepBorder;
  BdrRep.alpha=0;
  ldrBdr.graphics.lineStyle(2, 0x00ff00);
  ldrBdr.graphics.drawRect(myUILoader.x+23, myUILoader.y+45,
  myUILoader.width, myUILoader.height);
 
  myUILoader.addChild(ldrBdr);
  myUILoader.addChild(BdrRep);
  container.addChild(myUILoader);
 
 
  //Enabling Dragging  Dropping of Video Loader Anywhere
  myUILoader.addEventListener(MouseEvent.MOUSE_DOWN,dragUILoader);
  myUILoader.addEventListener(MouseEvent.MOUSE_UP,dropUILoader);
  myUILoader.addEventListener(MouseEvent.MOUSE_OVER,showBorder);
  myUILoader.addEventListener(MouseEvent.MOUSE_OUT,hideBorder);
  return myUILoader;
  }
 
  //Show the selected Camera with green Border
  function showBorder(e:MouseEvent):void
  {
  e.target.getChildByName(border).alpha=1;
  }
  function hideBorder(e:MouseEvent):void
  {
  e.target.getChildByName(border).alpha=0;
  }
  //UILoader to be replaced
   function dropUILoader(e:MouseEvent):void
  {
 
  if(e.targetis UILoader)
  {
  var myUILoader:UILoader = e.target as UILoader;
 
  if (mouseY746)
  {
  myUILoader.stopDrag();
var trackChild:Number=container.getChildIndex(myUILoader);
 var childContainer:DisplayObject= container.getChildAt
  (trackChild);
  for (var z:Number=0; z=container.numChildren-1;
  z++)
  {
  var restChild:DisplayObject=
 container.getChildAt
  (z);
  if ((childContainer!=restChild)(
  childContainer.hitTestObject(restChild))==true)
  {
  container.removeChild(restChild);
  }
  }
  }
  ___
  Flashcoders mailing list
  Flashcoders@chattyfig.figleaf.com
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Hit Object Question

2008-03-03 Thread anuj sharma
Hi all
I am trying to implement hit object in my project. I have sprite class and I
am loading multiple instances of UI Loader in my sprite class and displaying
it on the main screen. The user can drag and drop those UILoaders on the
main stage wherever they want.My aim was that if user drops one UIloader on
top of already placed UiLoader, then the already placed UILoader will be
replaced with the dropped UILoader. I am successful in implementing that by
hitting hitTestObject method. All of my UIloaders are having green color
border. Now my requirement is that as soon as the user places UILoader on
top of already existing UILoader , the  UILoader which is going to be
replaced changes border color from green to red showing the user that the
UIloader is being replaced and on Mouse release the UiLoader is going to be
replaced.
In short on mouse over, the border color has to be changed and on mouse
release, object has to be replaced. I am adding my rectangle(in Sprite
Container) as the border to the UILoader. Below is some code to make things
little clearer
Please help me in figuring out the problem.
Any help will be appreciated.
Thanks
Anuj
/*CODE
//UILoader Being Created
function CreateUILoaderObject(num:Number):DisplayObject
{
var myUILoader:UILoader = new UILoader();
var  container:Sprite=new Sprite();
myUILoader.name=myUILoader;
myUILoader.source = /video/pic_+(num+1)+.swf;
myUILoader.load();

//Defining Border for the Selected Camera
var ldrBdr:Sprite = new Sprite();
ldrBdr.name = border;
ldrBdr.alpha=0;
ldrBdr.graphics.lineStyle(2, 0x00ff00);
ldrBdr.graphics.drawRect(myUILoader.x+23, myUILoader.y+45,
myUILoader.width, myUILoader.height);

//Defining Border for the replaced Camera
var BdrRep:Sprite=new Sprite();
BdrRep.name=RepBorder;
BdrRep.alpha=0;
ldrBdr.graphics.lineStyle(2, 0x00ff00);
ldrBdr.graphics.drawRect(myUILoader.x+23, myUILoader.y+45,
myUILoader.width, myUILoader.height);

myUILoader.addChild(ldrBdr);
myUILoader.addChild(BdrRep);
container.addChild(myUILoader);


//Enabling Dragging  Dropping of Video Loader Anywhere
myUILoader.addEventListener(MouseEvent.MOUSE_DOWN,dragUILoader);
myUILoader.addEventListener(MouseEvent.MOUSE_UP,dropUILoader);
myUILoader.addEventListener(MouseEvent.MOUSE_OVER,showBorder);
myUILoader.addEventListener(MouseEvent.MOUSE_OUT,hideBorder);
return myUILoader;
}

//Show the selected Camera with green Border
function showBorder(e:MouseEvent):void
{
e.target.getChildByName(border).alpha=1;
}
function hideBorder(e:MouseEvent):void
{
e.target.getChildByName(border).alpha=0;
}
//UILoader to be replaced
 function dropUILoader(e:MouseEvent):void
{

if(e.targetis UILoader)
{
var myUILoader:UILoader = e.target as UILoader;

if (mouseY746)
{
myUILoader.stopDrag();
  var trackChild:Number=container.getChildIndex(myUILoader);
   var childContainer:DisplayObject= container.getChildAt
(trackChild);
for (var z:Number=0; z=container.numChildren-1;
z++)
{
var restChild:DisplayObject=container.getChildAt
(z);
if ((childContainer!=restChild)(
childContainer.hitTestObject(restChild))==true)
{
container.removeChild(restChild);
}
}
}
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Border color change of UILoader

2008-02-29 Thread anuj sharma
Hi Kenneth
Thanks for reply. When i am trying to use ocusRectSkin it is giving me
error.
Can yo please provide some sample code which helps me to implement it.
Appreciate ur help
Anuj

On Fri, Feb 29, 2008 at 2:33 AM, Kenneth Kawamoto [EMAIL PROTECTED]
wrote:

 Can you set the focusRectSkin style?

 --
 Kenneth Kawamoto
 http://www.materiaprima.co.uk/

 anuj sharma wrote:
  Hi
  Does anyone now how to change the border color of the UILoader component
  when user clicks on that. I have put UILoader in the sprite container
 and i
  need to implement that if user selects that UILoader its border color
 will
  be changed (to red may be).
  Please help me out . Here's the my dummy code for that. Basically what I
  need is the border of  UILoader to be shown as soon as mousedown event
 is
  generated and the border to hide as soon as mouseup event is generated.
  Any help or any new idea will be highly appreciated.
  Thanks
  Anuj
 
  /CODE**
  var container:Sprite=new Sprite();
  var myUILoader:UILoader = new UILoader();
  myUILoader.source = XYZ.swf;
  myUILoader.load();
  container.addChild(myUILoader);
   addChild(container);
 
  myUILoader.addEventListener(MouseEvent.MOUSE_DOWN,dragUILoader);
  myUILoader.addEventListener(MouseEvent.MOUSE_UP,dropUILoader);
  myUILoader.addEventListener(MouseEvent.CLICK, moveSelectedVideoOnFront);
 
  function moveSelectedVideoOnFront(event:MouseEvent):void
  {
  //Brings selected UILoader on top
  }
  function dragUILoader(e:MouseEvent):void
  {
  //Allows dragging of the UILoader
  }
  function dropUILoader(e:MouseEvent):void
  {
  //Allows dropping of the UILoader
  }
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Border color change of UILoader

2008-02-28 Thread anuj sharma
Hi
Does anyone now how to change the border color of the UILoader component
when user clicks on that. I have put UILoader in the sprite container and i
need to implement that if user selects that UILoader its border color will
be changed (to red may be).
Please help me out . Here's the my dummy code for that. Basically what I
need is the border of  UILoader to be shown as soon as mousedown event is
generated and the border to hide as soon as mouseup event is generated.
Any help or any new idea will be highly appreciated.
Thanks
Anuj

/CODE**
var container:Sprite=new Sprite();
var myUILoader:UILoader = new UILoader();
myUILoader.source = XYZ.swf;
myUILoader.load();
container.addChild(myUILoader);
 addChild(container);

myUILoader.addEventListener(MouseEvent.MOUSE_DOWN,dragUILoader);
myUILoader.addEventListener(MouseEvent.MOUSE_UP,dropUILoader);
myUILoader.addEventListener(MouseEvent.CLICK, moveSelectedVideoOnFront);

function moveSelectedVideoOnFront(event:MouseEvent):void
{
//Brings selected UILoader on top
}
function dragUILoader(e:MouseEvent):void
{
//Allows dragging of the UILoader
}
function dropUILoader(e:MouseEvent):void
{
//Allows dropping of the UILoader
}
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Re: Help Needed. UILoader coordinate track problem on MOUSE_UP

2008-02-27 Thread anuj sharma
Hi again
I have fixed this problem. Basically I was moving the UIloader but when i
tried to move the container which contains the UIloader then it is moving
wherever i want to. Actually I have the main stage which contains the
container of type Sprite and that container contains UILoader which contains
external SWF. Little tricky :-).
Thus there was problem in moving the whole content. But Now I fixed one
problem and came up with another . While dragging and dropping sometimes my
program gives me the following error

ArgumentError: Error #2025: The supplied DisplayObject must be a child of
the caller.
at flash.display::DisplayObjectContainer/getChildIndex()
at MethodInfo-1092()
I am tracking the number of children using getChildIndex. Anyone has any
idea how would i fix this error.
Any help will be highly appreciated.
Thanks
Anuj

On Tue, Feb 26, 2008 at 3:15 PM, anuj sharma [EMAIL PROTECTED] wrote:

 Hi All
 I am dragging the UI loader component containing external SWfs in them. On
 Mouse Release I use stop drag, and on stop drag- I am using
 myUIloader.move(mouseX,mouseY). However the output is little bouncy, the
 stage is taking the topleft corner of UIloader as main point and on stop
 drag it is moving the top left corner of the UIloader to the point where I
 left my mouse which gives the bouncy effect.(In short it is not dropping
 UIloader where I am leaving my mouse but dropping the top left corner of
 UIloader where I left the mouse.)

 I came up with the weird temporary solution where I use 
 myUIloader.move(mouseX-200,mouseY-200)
 which is not genuine way of solving this problem.
 Can you please help me out for figuring this thing out? All I need is to
 drop my UILoader wherever I left my mouse.
 Guys,I highly appreciate your help in this matter .
 Thanks
 Anuj


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Re: Help Needed. UILoader coordinate track problem on MOUSE_UP

2008-02-27 Thread anuj sharma
Never Mind problem has been fixed. I have to pass the correct container.
Thanks for ur patience  Help
Anuj

On Wed, Feb 27, 2008 at 11:14 AM, anuj sharma [EMAIL PROTECTED] wrote:

 Hi again
 I have fixed this problem. Basically I was moving the UIloader but when i
 tried to move the container which contains the UIloader then it is moving
 wherever i want to. Actually I have the main stage which contains the
 container of type Sprite and that container contains UILoader which contains
 external SWF. Little tricky :-).
 Thus there was problem in moving the whole content. But Now I fixed one
 problem and came up with another . While dragging and dropping sometimes my
 program gives me the following error
 
 ArgumentError: Error #2025: The supplied DisplayObject must be a child of
 the caller.
 at flash.display::DisplayObjectContainer/getChildIndex()
 at MethodInfo-1092()
 I am tracking the number of children using getChildIndex. Anyone has any
 idea how would i fix this error.
 Any help will be highly appreciated.
 Thanks
 Anuj


 On Tue, Feb 26, 2008 at 3:15 PM, anuj sharma [EMAIL PROTECTED] wrote:

  Hi All
  I am dragging the UI loader component containing external SWfs in them.
  On Mouse Release I use stop drag, and on stop drag- I am using
  myUIloader.move(mouseX,mouseY). However the output is little bouncy, the
  stage is taking the topleft corner of UIloader as main point and on stop
  drag it is moving the top left corner of the UIloader to the point where I
  left my mouse which gives the bouncy effect.(In short it is not dropping
  UIloader where I am leaving my mouse but dropping the top left corner of
  UIloader where I left the mouse.)
 
  I came up with the weird temporary solution where I use 
  myUIloader.move(mouseX-200,mouseY-200)
  which is not genuine way of solving this problem.
  Can you please help me out for figuring this thing out? All I need is to
  drop my UILoader wherever I left my mouse.
  Guys,I highly appreciate your help in this matter .
  Thanks
  Anuj
 
 

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Anyone know how to dynamically change the border of UILoader Component

2008-02-26 Thread anuj sharma
Hi All
I am loading multiple instances of UI loader containing external SWFs on my
stage. When user double clicks on the video thumbnail, an instance of
UIloader will be placed on the main stage.The user can place as many
UIloader instances on the main stage. My aim is that if user puts any
UIloader on top of already existed UIloader, the existed loader will be
replaced with the placed loader. I am successful in implementing that by
using hitTestObject method for that. I am planning to provide enough
feedback to the user for this UIloader replacement process, so i was
thinking to change the border of the UIloader as soon as the dragged
UIloader hits the already existed UIloader.
Does anyone know how would I animate UIloader to give enough feedback to the
user that it is being replaced. Creating an invisible movie and moving it
wherever UIloader goes doesn't sound much efficient.
Please help me out in figuring out this problem. Also if anyone has better
idea to give enough feedback to user, that will also be welcome. Just to be
little clear i have provided little pseudo-code(below) of what i am doing
here.
Any help will be highly appreciated.
Thanks
Anuj

/***Abstract Pseudo code for my problem*/
 myUILoader.startDrag();
//Putting video on top of already existed videos
var trackChild:Number=container.getChildIndex(myUILoader);

var childContainer:DisplayObject= container.getChildAt
(trackChild);
for( var z:Number=0;z=container.numChildren-1;z++)
{
var restChild:DisplayObject=container.getChildAt(z);
if(childContainer!=restChild)
{
if((childContainer.hitTestObject(restChild))==true)

{
//Show Animation during replacement
 //how would i give feedback here
container.removeChild(restChild);
}
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Help Needed. UILoader coordinate track problem on MOUSE_UP

2008-02-26 Thread anuj sharma
Hi All
I am dragging the UI loader component containing external SWfs in them. On
Mouse Release I use stop drag, and on stop drag- I am using
myUIloader.move(mouseX,mouseY).
However the output is little bouncy, the stage is taking the topleft corner
of UIloader as main point and on stop drag it is moving the top left corner
of the UIloader to the point where I left my mouse which gives the bouncy
effect.(In short it is not dropping UIloader where I am leaving my mouse but
dropping the top left corner of UIloader where I left the mouse.)

I came up with the weird temporary solution where I use
myUIloader.move(mouseX-200,mouseY-200)
which is not genuine way of solving this problem.
Can you please help me out for figuring this thing out? All I need is to
drop my UILoader wherever I left my mouse.
Guys,I highly appreciate your help in this matter .
Thanks
Anuj
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Flash Video Gallery Problem

2008-02-25 Thread anuj sharma
Hi All
I am developing a video Gallery in AS 3.0.

   -  I am providing thumbnails and XML is loading external FLvs in those
   thumbnails .
   -  The user can either double click or click and drag thumbnail to
   play the main video above the particular line.
   - I am calling external SWFs in the UIloader component for playing the
   main video. That UIloader will be called when the user either double clicks
   on thumbnail or click and drag the thumbnail.
   - Also user can drag the main video wherever he wants, and he can drop
   the main  back to the thumbnails too( which will unload the video player).


My problem is that everything is working fine when i run the FLA file, but
when i closed my application and try to run the individual SWF file, the
file does not work ( its just crashing).
There are no frames I am using so that's for sure that i did not forget to
put stop frame.
All of my code is in the main time line and I haven't used any custom
classes yet, which means everything is in the actions window.
Am i using the right tool for such a big application? Should I switch to
FLEX for compiling this file. i am not that familiar with FLEX working
environment too.
Please help me out what i am doing wrong and i apologize that I could not
mail you the code because the file is very very big. Also if any better tool
is available for this please let me know.
Any kind of help will be highly appreciated.
Thanks a lot
Anuj
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Flash Video Gallery Problem

2008-02-25 Thread anuj sharma
Thanks a lot
I will do that and let you know if problem has been fixed


On Mon, Feb 25, 2008 at 10:49 AM, Merrill, Jason 
[EMAIL PROTECTED] wrote:

 If you are on Windows, you can install Kewbee's Plugin
 Switcher to see which versions of each are running.  Download
 from here:

 Man, use that thing with caution though, it was pretty buggy when I used
 it last (about a year ago) and it didn't account for all versions, and
 it messed up my install somehow.   Cool tool though, if they fixed the
 problems with it, worth checking into.

 Jason Merrill
 Bank of America
 GTO LLD Solutions Design  Development
 eTools  Multimedia

 Bank of America Flash Platform Developer Community


 Are you a Bank of America associate interested in innovative learning
 ideas and technologies?
 Check out our internal  GTO Innovative Learning Blog and  subscribe.

 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Flash Video Gallery Problem

2008-02-25 Thread anuj sharma
Hi Glenn
I am currently focussed on running SWF but not Browser version beacuse in
the end i have to publish an exe of FLA file and give it to the management
for analysis. Also I checked the Kewbee's Plugin Switcher and it shows i
have 3 player versions installed 8.0 r22, 9.0 r115 amd 6.0r21. What i did I
right click on the SWF and try to run with all the players but none of them
work. I am not expert in flash but isn't that true that if Fla file is
working by hitting ctrl+enter, the independent SWF file should also work.
And I used Action Script 3.0, shouldn't my file just work with player
9.0.r115 which is the most updated player. Please help me out in figuring
out where I am wrong.
I will highly appreciate your help.
Thanks a lot
Anuj


On Mon, Feb 25, 2008 at 10:36 AM, Glen Pike [EMAIL PROTECTED]
wrote:

 Hi,

Your standalone Flash Player may be different from the one used by
 the IDE...

If you are on Windows, you can install Kewbee's Plugin Switcher to
 see which versions of each are running.  Download from here:

http://www.pluginswitcher.de/

If you install it, start the program, wait for it to disappear, then
 double click the icon that appears in your taskbar, you can see what
 players are installed.

If you want, you can also use this to switch versions of Flash
 Player for testing in browsers, etc.  This is a bit tricky to set up -
 you have to install a version of the Flash player for your browser, then
 start each browser that uses it, then close the browser, then uninstall
 the player for the browser and repeat for each version of the player you
 want to use.

You can download old flash players from the adobe site - when you
 get upto version 8  9, there are different sub-versions for different
 browsers - this confused me for a while...

http://www.adobe.com/support/flashplayer/  The Archived versions
 link is on the RHS, it was temporarily unavailable when I just looked,
 but try later - direct link here:

http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_14266

Uninstall information here (broken again)
 http://www.adobe.com/go/tn_14157

Glen



 anuj sharma wrote:
  Hi All
  I am developing a video Gallery in AS 3.0.
 
 -  I am providing thumbnails and XML is loading external FLvs in
 those
 thumbnails .
 -  The user can either double click or click and drag thumbnail to
 play the main video above the particular line.
 - I am calling external SWFs in the UIloader component for playing
 the
 main video. That UIloader will be called when the user either double
 clicks
 on thumbnail or click and drag the thumbnail.
 - Also user can drag the main video wherever he wants, and he can
 drop
 the main  back to the thumbnails too( which will unload the video
 player).
 
 
  My problem is that everything is working fine when i run the FLA file,
 but
  when i closed my application and try to run the individual SWF file, the
  file does not work ( its just crashing).
  There are no frames I am using so that's for sure that i did not forget
 to
  put stop frame.
  All of my code is in the main time line and I haven't used any custom
  classes yet, which means everything is in the actions window.
  Am i using the right tool for such a big application? Should I switch to
  FLEX for compiling this file. i am not that familiar with FLEX working
  environment too.
  Please help me out what i am doing wrong and i apologize that I could
 not
  mail you the code because the file is very very big. Also if any better
 tool
  is available for this please let me know.
  Any kind of help will be highly appreciated.
  Thanks a lot
  Anuj
  ___
  Flashcoders mailing list
  Flashcoders@chattyfig.figleaf.com
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 
 

 --

 Glen Pike
 01736 759321
 www.glenpike.co.uk http://www.glenpike.co.uk
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Flash Video Gallery Problem

2008-02-25 Thread anuj sharma
Thanks a lot
I will do that and let you know if problem has been fixed
Anuj

On Mon, Feb 25, 2008 at 10:36 AM, Glen Pike [EMAIL PROTECTED]
wrote:

 Hi,

Your standalone Flash Player may be different from the one used by
 the IDE...

If you are on Windows, you can install Kewbee's Plugin Switcher to
 see which versions of each are running.  Download from here:

http://www.pluginswitcher.de/

If you install it, start the program, wait for it to disappear, then
 double click the icon that appears in your taskbar, you can see what
 players are installed.

If you want, you can also use this to switch versions of Flash
 Player for testing in browsers, etc.  This is a bit tricky to set up -
 you have to install a version of the Flash player for your browser, then
 start each browser that uses it, then close the browser, then uninstall
 the player for the browser and repeat for each version of the player you
 want to use.

You can download old flash players from the adobe site - when you
 get upto version 8  9, there are different sub-versions for different
 browsers - this confused me for a while...

http://www.adobe.com/support/flashplayer/  The Archived versions
 link is on the RHS, it was temporarily unavailable when I just looked,
 but try later - direct link here:

http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_14266

Uninstall information here (broken again)
 http://www.adobe.com/go/tn_14157

Glen



 anuj sharma wrote:
  Hi All
  I am developing a video Gallery in AS 3.0.
 
 -  I am providing thumbnails and XML is loading external FLvs in
 those
 thumbnails .
 -  The user can either double click or click and drag thumbnail to
 play the main video above the particular line.
 - I am calling external SWFs in the UIloader component for playing
 the
 main video. That UIloader will be called when the user either double
 clicks
 on thumbnail or click and drag the thumbnail.
 - Also user can drag the main video wherever he wants, and he can
 drop
 the main  back to the thumbnails too( which will unload the video
 player).
 
 
  My problem is that everything is working fine when i run the FLA file,
 but
  when i closed my application and try to run the individual SWF file, the
  file does not work ( its just crashing).
  There are no frames I am using so that's for sure that i did not forget
 to
  put stop frame.
  All of my code is in the main time line and I haven't used any custom
  classes yet, which means everything is in the actions window.
  Am i using the right tool for such a big application? Should I switch to
  FLEX for compiling this file. i am not that familiar with FLEX working
  environment too.
  Please help me out what i am doing wrong and i apologize that I could
 not
  mail you the code because the file is very very big. Also if any better
 tool
  is available for this please let me know.
  Any kind of help will be highly appreciated.
  Thanks a lot
  Anuj
  ___
  Flashcoders mailing list
  Flashcoders@chattyfig.figleaf.com
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 
 

 --

 Glen Pike
 01736 759321
 www.glenpike.co.uk http://www.glenpike.co.uk
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Re: RangeError: Error #2006: The supplied index is out of bounds.

2008-02-25 Thread anuj sharma
I will loop it and see what will happen
Thanks a lot for all your help
Anuj

On Mon, Feb 25, 2008 at 1:19 PM, anuj sharma [EMAIL PROTECTED] wrote:

 Hi Guys
 I am making an Auto-Arrange button and clicking on which arranges all the
 children of the container( which are on the main stage) in the tile format.
 Basically on clicking, I manually move those child on the stage to
 particular coordinates as shown in my code. I have pasted my code below. My
 problem is that as soon as i click on the auto arrange button I am getting
 error RangeError: Error #2006: The supplied index is out of bounds..
 Please let me know what i am doing wrong and i will appreciate if you let me
 know how would i fix this
 Thanks a lot guys
 Anuj

 **CODE**
 var aa:Number=0;
 var xcoord:Number=-300;
 var ycoord:Number=-200;
 var xcoord1:Number=450;
  var xcoord2:Number=850;
  var xcoord3:Number=1250;
 var ycoord1:Number=350;
  var ycoord2:Number=650;
 //Button Listener
 btn_AA.addEventListener(MouseEvent.CLICK,autoArrange);
 function autoArrange(event:MouseEvent):void
 {
 if(container.getChildAt(aa)!=null)
 {
 container.getChildAt(aa).x=xcoord;
 container.getChildAt(aa).y=ycoord;
 //Arrange Second
 container.getChildAt(aa+1).x=xcoord+xcoord1;
 container.getChildAt(aa+1).y=ycoord;
 //Arrange Third
 container.getChildAt(aa+2).x=xcoord+ xcoord2;
 container.getChildAt(aa+2).y=ycoord;
 //Arrange Forth
 container.getChildAt(aa+3).x=xcoord+xcoord3;
 container.getChildAt(aa+3).y=ycoord;
 //Arrange Fifth
 container.getChildAt(aa+4).x=xcoord;
 container.getChildAt(aa+4).y=ycoord+ycoord1;
 //Arrange Sixth
 container.getChildAt(aa+5).x=xcoord+xcoord1;
 container.getChildAt(aa+5).y=ycoord+ycoord1;
 //Arrange Seventh
 container.getChildAt(aa+6).x=xcoord+ xcoord2;
 container.getChildAt(aa+6).y=ycoord+ycoord1;
 //Arrange Eight
 container.getChildAt(aa+7).x=xcoord+xcoord3;
 container.getChildAt(aa+7).y=ycoord+ycoord1;
 //Arrange Ninth
 container.getChildAt(aa+8).x=xcoord;
 container.getChildAt(aa+8).y=ycoord+ycoord2;
 //Arrange Tenth
 container.getChildAt(aa+9).x=xcoord+xcoord1;
 container.getChildAt(aa+9).y=ycoord+ycoord2;
 //Arrange Eleventh
 container.getChildAt(aa+10).x=xcoord+ xcoord2;
 container.getChildAt(aa+10).y=ycoord+ycoord2;
 }
 }

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] UILoader Component Movement problem

2008-02-21 Thread anuj sharma
Hi All
In my program I am allowing user to drag and drop Video thumbnails on the
main stage. The UIComponent is loading external SWF as soon as user drops
video on the main screen. Also the user can successfully drag and drop the
opened video pane (which is UILoader Component) wherever he wants on the
screen.
My problem is that when user drop the UIComponent on the main screen, the
dropped UIComponenet moves little bit from the mouse position.
I used the code that *on stopDrag,UILoader.move(MouseX,MouseY)*. But it did
not work because the stage is taking UILoader's top left corner as MouseX
and MouseY and move UILoader's top left corner to the cursor position. I
came up with tricky solution in which I use on *stopDrag,UILoader.move
(MouseX-200,MouseY-200)*. This solution was little better in my case but
that's not exactly what i want because this solution is giving inconsistent
and inaccurate results.
Does anyone has better solution? *I just need that if user stops dragging
the UILoader Component , the Component should be placed on the coordinates
wherever he/she left the mouse cursor.*

I will appreciate any kind of help
Thanks a lot.
Anuj
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Double Click Mouse Event not working consistently even after using doubleClickEnabled.

2008-02-20 Thread anuj sharma
Hi All
I am just trying to implement double click mouse event on a simple button
and it is working inconsistently. I need to double click on the button and
need consistent results. Attached is my code .You can copy and paste the
attached code to see the inconsistent behavior. Sometimes double click works
and sometimes I have to double click so many times to make it
work.Pleasehelp me out and let me know if I am missing something.
Thanks a lot.
Regards,
Anuj

/Code***
import fl.controls.Button;
//stage.addEventListener(F
var test:Button=new Button();
test.x=100;
test.y=100;
addChild(test);
//test.dispatchEvent(event:MouseEvent);
test.doubleClickEnabled=true;
test.addEventListener(MouseEvent.DOUBLE_CLICK,aa,true);
test.addEventListener(MouseEvent.DOUBLE_CLICK,aa,false);
function aa(event:MouseEvent):void
{
trace(Double Clicked);

}
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Double Click Mouse Event not working consistently even after using doubleClickEnabled.

2008-02-20 Thread anuj sharma
Hi Bob
Thanks for the reply. Actually I changed my mouse from wireless to wired and
now it is working fine, Stupid of me :-). Also after 1 double click if I
wait little while then it works fine.
Anyway I appreciate your help and things are working fine
Thanks
Anuj

On Feb 20, 2008 10:00 AM, Bob Leisle [EMAIL PROTECTED] wrote:

 Hi Anuj,

 Your code works fine here. Over 100 tries, double-clicking at various
 rates, traced every time other than when I was intentionally so slow
 that it shouldn't have registered as a double-click. It also traced
 reliably using a programmable double-click mouse button.

 hth,
 Bob

 anuj sharma wrote:
  Hi All
  I am just trying to implement double click mouse event on a simple
 button
  and it is working inconsistently. I need to double click on the button
 and
  need consistent results. Attached is my code .You can copy and paste the
  attached code to see the inconsistent behavior. Sometimes double click
 works
  and sometimes I have to double click so many times to make it
  work.Pleasehelp me out and let me know if I am missing something.
  Thanks a lot.
  Regards,
  Anuj
 
  /Code***
  import fl.controls.Button;
  //stage.addEventListener(F
  var test:Button=new Button();
  test.x=100;
  test.y=100;
  addChild(test);
  //test.dispatchEvent(event:MouseEvent);
  test.doubleClickEnabled=true;
  test.addEventListener(MouseEvent.DOUBLE_CLICK,aa,true);
  test.addEventListener(MouseEvent.DOUBLE_CLICK,aa,false);
  function aa(event:MouseEvent):void
  {
  trace(Double Clicked);
 
  }
  ___
  Flashcoders mailing list
  Flashcoders@chattyfig.figleaf.com
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 
 
 

 --
 Thanks,
 ~
 Bob Leisle
 Headsprout Software  Engineering
 http://www.headsprout.com
 Where kids learn to read!

 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders