|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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? |
|
#2
|
||||
|
||||
|
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. ![]() __________________ |
|
#3
|
|||
|
|||
|
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. |
|
#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. |
|
#5
|
||||
|
||||
|
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 ![]() |
|
#6
|
|||
|
|||
|
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? |
|
#7
|
|||
|
|||
|
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 |
|
#8
|
||||
|
||||
|
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\" 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. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Mobile Programming > WAP and Flash |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|