Mobile Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreMobile Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old February 14th, 2007, 05:32 AM
JMorjaria JMorjaria is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: May 2005
Posts: 541 JMorjaria User rank is Lance Corporal (50 - 100 Reputation Level)JMorjaria User rank is Lance Corporal (50 - 100 Reputation Level)JMorjaria User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 6 Days 12 h 9 m 59 sec
Reputation Power: 4
WAP and Flash

Im looking to use a flash file in WAP. I have a sample of the flash file, however mine will be simpler, hopefully smaller etc.

http://jerryscript.hostrocket.com/flash/draw/basic/SWFDrawing2JPEG.html

I was wondering if it is possible to use flash in WAP and if anyone with experience with this knows whether this type of flash (allows you to draw on screen) works with touch screen phone?

Reply With Quote
  #2  
Old February 14th, 2007, 06:13 AM
jabba_29's Avatar
jabba_29 jabba_29 is offline
Back in HEL
Click here for more information.
 
Join Date: Feb 2002
Location: Finland
Posts: 8,912 jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)  Folding Points: 57777 Folding Title: Beginner FolderFolding Points: 57777 Folding Title: Beginner FolderFolding Points: 57777 Folding Title: Beginner Folder
Time spent in forums: 3 Months 4 Weeks 1 Day 12 h 41 m 36 sec
Reputation Power: 1693
Send a message via ICQ to jabba_29 Send a message via AIM to jabba_29 Send a message via MSN to jabba_29 Send a message via Yahoo to jabba_29 Send a message via Google Talk to jabba_29 Send a message via Skype to jabba_29
Facebook
It isn't possible in WAP1. Here is a list of relevant tags available.
In WAP2 , aka xHTML then it may be, but is really depends on the phone I think.
Here is a comparison chart - perhaps this will help.
Though I again must reiterate that it will depend heavily on your device too.

HTH.
__________________
Cheers,

Jamie

# mdb4u | mobile movie database] | Please help to test and promote
# skiFFie | Home of the 'accessibility module' for Drupal
# Jamie Burns [me] Accessibility Module [drupal]
# guidelines | search | wap resources | not getting help | fold to cure

__________________

Let the might of your compassion arise to bring a quick end
to the flowing stream of the blood and tears .....
Please hear my anguished words of truth.



__________________

Reply With Quote
  #3  
Old February 14th, 2007, 06:50 AM
JMorjaria JMorjaria is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: May 2005
Posts: 541 JMorjaria User rank is Lance Corporal (50 - 100 Reputation Level)JMorjaria User rank is Lance Corporal (50 - 100 Reputation Level)JMorjaria User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 6 Days 12 h 9 m 59 sec
Reputation Power: 4
Thanks, im not a wap developer or flash so have had to hire someone to do both! I think I am using 1...
Code:
header('Content-type: text/vnd.wap.wml');
//This has to be printed via PHP in case short tags are on.
echo '<?xml version="1.0" encoding="utf-8"?>';
?>

<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN" "http://www.wapforum.org/DTD/wml13.dtd">


I am not aiming at a mass audience so can specify which handsets they must use, Im thinking the O2 mini as its touch screen and should support flash, or at least have flash lite.

Reply With Quote
  #4  
Old February 21st, 2007, 07:25 AM
JMorjaria JMorjaria is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: May 2005
Posts: 541 JMorjaria User rank is Lance Corporal (50 - 100 Reputation Level)JMorjaria User rank is Lance Corporal (50 - 100 Reputation Level)JMorjaria User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 6 Days 12 h 9 m 59 sec
Reputation Power: 4
Flash and wap

I have build a flash app and want to embed it in WAP. I thought this part of the process would be simple, however am getting errors.

Code:
<?php
		include_once '../../eheating/includes/session.php';
		include_once '../../eheating/includes/config.php';

	$clientid = (int)($_GET['clientid']);
	$addressid = (int)($_GET['addressid']);
	$jobid = (int)($_GET['jobid']);	


ming_useswfversion(6);
$movie = new SWFMovie();
$movie->setDimension(200,100);
$movie->setBackground(255,255,255);
$movie->setRate(31);

// create a textfield to hold drawing data
$t=new SWFTextField();
$t->setFont(new SWFFont("Arial.fdb"));
$t->setName("data");
$movie->add($t);

// create the canvas image
// canvas
$s=new SWFShape();
$s->setLine(0,0,0,0,255);
$s->movePenTo(1,1);
$s->drawLine(198,0);
$s->drawLine(0,79);
$s->drawLine(-198,0);
$s->drawLine(0,-79);
$i=$movie->add($s);
$i->moveTo(0,0);

// mx actionscript
$strAction = "
drawing=false;
createEmptyMovieClip('_keyListener',1);
Key.addListener(_keyListener);
_keyListener.onKeyDown=function(){
clear();
_root.data='';
};
with(_root){
onMouseDown=function(){
drawing=true;
startX=_xmouse;
startY=_ymouse;
moveTo(startX,startY);};
onMouseUp=function(){drawing=false;};
onMouseMove=function(){
difX=startX-_xmouse;if(difX<0){difX*=(-1);}
difY=startY-_ymouse;if(difY<0){difY*=(-1);}
length=Math.sqrt(difY*difY+difX*difX);
if(drawing==true && length>5 && _ymouse<78){
lineStyle(1);
lineTo(_xmouse,_ymouse);
_root.data+=startX+'_'+startY+'_'+_xmouse+'_'+_ymouse+'-';
startX=_xmouse;
startY=_ymouse;}
updateAfterEvent();};}";
$t=new SWFText();
$t->setFont(new SWFFont("Arial.fdb"));
$t->setHeight(14);
$t->setColor(0,0,0);
$textWidth=$t->getWidth("Submit");
$t->addString("Submit");

$s=new SWFShape();
$s->setRightFill(255,202,104);
$s->drawLine($textWidth+10,0);
$s->drawLine(0,16);
$s->drawLine(-($textWidth+10),0);
$s->drawLine(0,-16);

$b=new SWFButton();
$b->addShape($s, SWFBUTTON_UP | SWFBUTTON_OVER | SWFBUTTON_DOWN | SWFBUTTON_HIT);
$b->setAction(new SWFAction("getURL('create-jpeg.php?clientid=".$clientid."&addressid=".$addressid."jobid=".$jobid."','_self','POST');"));
$i=$movie->add($b);
$i->moveTo(160-($textWidth/2),82);
$i=$movie->add($t);
$i->moveTo(5-($textWidth/2)+160,95);
$t=new SWFText();
$t->setFont(new SWFFont("Arial.fdb"));
$t->setHeight(16);
$t->setColor(255,255,255);
$textWidth=$t->getWidth("Submit");
// add the actions to the movie
$movie->add(new SWFAction(str_replace("\r", "", $strAction)));
// save and output the movie
$movie->save("draw-jpeg.swf");
$revitalizer=rand();


header('Content-type: text/vnd.wap.wml');
//This has to be printed via PHP in case short tags are on.
echo '<?xml version="1.0" encoding="utf-8"?>';
				
?>

<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN" "http://www.wapforum.org/DTD/wml13.dtd">
<wml>
	<card id="search" title="CommuSoft Details">
		<p>

<?php
if($isloggedin == 1) {
	
	echo '<a href="../wmlviewjob.php?clientid='.$clientid.'&addressid='.$addressid.'&jobid='.$jobid.'">back</a><br />';
	echo 'Signed on the '.date("d m Y").'<br />';
	//signing area

print "
<OBJECT BORDER=1 classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0\" ID=objects WIDTH=\"200\" HEIGHT=\"100\">
<PARAM NAME=movie VALUE=\"draw-jpeg.swf?$revitalizer\">
<EMBED src=\"draw-jpeg.swf?$revitalizer\" WIDTH=\"200\" HEIGHT=\"100\" TYPE=\"application/x-shockwave-flash\" PLUGINSPAGE=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\">
</OBJECT>";


}else{
	echo 'Please <a href="http://mobile.commusoft.co.uk">log in</a>';
}
?>

		</p>
	</card>
</wml>


I image it has something to do with <object>

Has anyone done anything like this before? Do they know how I could fix the problem, I think WAP 2.0 maybe able to support flash.

Reply With Quote
  #5  
Old February 21st, 2007, 07:39 AM
jabba_29's Avatar
jabba_29 jabba_29 is offline
Back in HEL
Click here for more information.
 
Join Date: Feb 2002
Location: Finland
Posts: 8,912 jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)  Folding Points: 57777 Folding Title: Beginner FolderFolding Points: 57777 Folding Title: Beginner FolderFolding Points: 57777 Folding Title: Beginner Folder
Time spent in forums: 3 Months 4 Weeks 1 Day 12 h 41 m 36 sec
Reputation Power: 1693
Send a message via ICQ to jabba_29 Send a message via AIM to jabba_29 Send a message via MSN to jabba_29 Send a message via Yahoo to jabba_29 Send a message via Google Talk to jabba_29 Send a message via Skype to jabba_29
Facebook
Threads merged as they are the same thing.
Please don't duplicate post.

Anyhow, what kind of errors are you getting?
Any sort of indication of what is happening would be nice

Reply With Quote
  #6  
Old February 21st, 2007, 08:16 AM
JMorjaria JMorjaria is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: May 2005
Posts: 541 JMorjaria User rank is Lance Corporal (50 - 100 Reputation Level)JMorjaria User rank is Lance Corporal (50 - 100 Reputation Level)JMorjaria User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 6 Days 12 h 9 m 59 sec
Reputation Power: 4
im using firefox to test. The error is just.

XML Parsing Error: not well-formed
Location: http://mobile.commusoft.co.uk/forms/project.php?clientid=4&addressid=4&jobid=14
Line Number 12, Column 79:Location: http://mobile.commusoft.co.uk/forms/project.php?clientid=4&addressid=4&jobid=14
------------------------------------------------------------------------------^

Im thinking that the firefox emulator probably doesnt support flash, I will be using a device that does. I will tell the users which device to purchase, and tell them it needs flash lite 2 installed.

I remember you saying that wap 2 does support it. Is it simple to convert to WAP 2?

Reply With Quote
  #7  
Old February 21st, 2007, 08:26 AM
fatmonk fatmonk is offline
The Monk that is Fat.
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Location: UK
Posts: 72 fatmonk User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 h 14 m 24 sec
Reputation Power: 5
Maybe not directly related, but some phones are shipping with Adobe Flash Lite... http://www.adobe.com/products/flashlite/

If this is on the phone (it can be downloaded from Adobe) or the phone has some other flash player then it should be abl eto play the file. How you coudl embed it in a WAP page is anoher matter though.. sorry can't help with that bit.

-FM

Reply With Quote
  #8  
Old February 21st, 2007, 09:16 AM
jabba_29's Avatar
jabba_29 jabba_29 is offline
Back in HEL
Click here for more information.
 
Join Date: Feb 2002
Location: Finland
Posts: 8,912 jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)  Folding Points: 57777 Folding Title: Beginner FolderFolding Points: 57777 Folding Title: Beginner FolderFolding Points: 57777 Folding Title: Beginner Folder
Time spent in forums: 3 Months 4 Weeks 1 Day 12 h 41 m 36 sec
Reputation Power: 1693
Send a message via ICQ to jabba_29 Send a message via AIM to jabba_29 Send a message via MSN to jabba_29 Send a message via Yahoo to jabba_29 Send a message via Google Talk to jabba_29 Send a message via Skype to jabba_29
Facebook
Tags and attributes must be in lower case.
Attributes must also be quoted. eg
Code:
print "
<OBJECT BORDER=1 classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" 
should be
Code:
print "
<object border=\"1\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" 


Though I am not sure whether these tags are supported for WAP .

To make it WAP 2, see this post in the WAP Resources thread.
You may also need to use the "Flash Satay" approach to embed the object correctly.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreMobile Programming > WAP and Flash


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT