Lost Password?


Go Back   CodeCall Programming Forum > Software Development > General Programming

General Programming Non language specific, Assembly, Linux/Unix, Mac and anything not covered in other topics. Talk about Programming Theory here.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-06-2008, 02:28 PM
shibbythestoner's Avatar   
shibbythestoner shibbythestoner is offline
Programmer
 
Join Date: Jun 2007
Location: Scotland
Age: 17
Posts: 128
Rep Power: 6
shibbythestoner is on a distinguished road
Default Actionscript - dropping a box

Hello all.
In a flash file, I have a box which you can drag across the top and when you click it it duplicates itself. However, the code which is supposed to make this box fall until it hits the "floor" (a movie clip spanning across the bottom of the platform), does not operate, leaving the box suspended in mid-air. Syntax check says no errors, so I was wondering if anyone here could help me out? Here's the code:
Code:
function drop(b){
    b.onEnterFrame=function(){
        _root[b]._y-=20;
        if(_root[b].hitTest(_root["floor"])){
            _root[b].play();
            removeMovieClip(_root[b]);
        }
    }
}
startDrag(box,true,20,30,530,20);
_global.i=-1;
_root["box"].onPress=function(){
    _global.i++;
    duplicateMovieClip(box,("dbox"+i),i);
    drop(("dbox"+i));
}
__________________

Last edited by shibbythestoner; 02-06-2008 at 04:23 PM. Reason: _root[b]._y+=20; should be _root[b]._y-=20; (I think)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #2 (permalink)  
Old 02-08-2008, 07:05 PM
Lop's Avatar   
Lop Lop is offline
Speaks fluent binary
 
Join Date: May 2006
Posts: 1,149
Rep Power: 18
Lop will become famous soon enoughLop will become famous soon enough
Default

I've never seen that type of code before. That is Flash?
__________________
Lop
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-08-2008, 08:11 PM
shibbythestoner's Avatar   
shibbythestoner shibbythestoner is offline
Programmer
 
Join Date: Jun 2007
Location: Scotland
Age: 17
Posts: 128
Rep Power: 6
shibbythestoner is on a distinguished road
Default

It's Flash Actionscript, Lop:
ActionScript - Wikipedia, the free encyclopedia
__________________
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-13-2008, 02:10 PM
shibbythestoner's Avatar   
shibbythestoner shibbythestoner is offline
Programmer
 
Join Date: Jun 2007
Location: Scotland
Age: 17
Posts: 128
Rep Power: 6
shibbythestoner is on a distinguished road
Default

Well never mind, I've messed about a lot more with similar coding since I started this thread and that has worked out fine, so I guess the probem solved itself.
__________________
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
New Member Dropping In. TheLegend Introductions 3 09-25-2007 09:15 AM
Actionscript: loading an external movie question. shibbythestoner Website Design 2 06-24-2007 10:59 AM
Creating an analog clock with ActionScript AfTriX Tutorials 2 01-07-2007 03:19 AM
Actionscript in web design DevilsCharm Website Design 2 07-13-2006 01:12 PM


All times are GMT -5. The time now is 06:12 PM.

Contest Stats

WingedPanther ........ 2753.6
Xav ........ 2704
Brandon W ........ 1702.32
John ........ 1207.73
marwex89 ........ 1175.24
morefood2001 ........ 966.05
dcs ........ 655.75
Steve.L ........ 475.59
orjan ........ 418.58
Aereshaa ........ 383.54

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 98%

Ads